Examples of KMLConfiguration


Examples of org.geotools.kml.KMLConfiguration

            inputStream = zis;
        } else {
            inputStream = new FileInputStream(kml);
        }
       
        PullParser parser = new PullParser(new KMLConfiguration(), inputStream, KML.Placemark);

        DefaultFeatureCollection newCollection = new DefaultFeatureCollection();
       
        int index = 0;
        SimpleFeature f;
View Full Code Here

Examples of org.geotools.kml.KMLConfiguration

                fos = zos;
            } else {
                fos = new FileOutputStream(kmlFile);
            }
   
            Encoder encoder = new Encoder(new KMLConfiguration());
            encoder.setIndenting(true);
   
            encoder.encode(newCollection, KML.kml, fos);
           
        } finally {
View Full Code Here

Examples of org.geotools.kml.KMLConfiguration

    super(resultPropertyName);
 

  @Override 
  protected GeoPipeFlow process(GeoPipeFlow flow) {
    Encoder encoder = new Encoder(new KMLConfiguration());
    encoder.setIndenting(true);
    try {
      setProperty(flow, encoder.encodeAsString(flow.getGeometry(), KML.Geometry));
    } catch (IOException e) {
      setProperty(flow, e.getMessage());
View Full Code Here

Examples of org.geotools.kml.KMLConfiguration

    FileInputStream fis;
   
    public KMLFeatureReader(String namespace, File file, QName name) throws IOException {
        fis = new FileInputStream(file);
        try {
            parser = new StreamingParser( new KMLConfiguration(), fis, KML.Placemark);
        } catch (Exception e) {
            throw new IOException("Error processing KML file", e);
        }
        forward();
        if (f != null) type = f.getType();
View Full Code Here

Examples of org.geotools.kml.KMLConfiguration

    public KMLPPIO(GeoServer gs) {
        super(FeatureCollection.class, FeatureCollection.class, KMLMapOutputFormat.MIME_TYPE);

        this.gs = gs;
        this.xml = new KMLConfiguration();
        SimpleFeatureTypeBuilder b = new SimpleFeatureTypeBuilder();

        b.setName("puregeometries");

        b.setCRS(DefaultGeographicCRS.WGS84);
View Full Code Here

Examples of org.geotools.kml.KMLConfiguration

        }
        return b.buildFeatureType();
    }

    public Object decode(InputStream input) throws Exception {
        StreamingParser parser = new StreamingParser(new KMLConfiguration(), input, KML.Placemark);
        SimpleFeature f = null;
        ListFeatureCollection features = null;
        HashMap oldftype = null;
        SimpleFeatureType type = null;
        SimpleFeatureBuilder featureBuilder = null;
View Full Code Here

Examples of org.geotools.kml.v22.KMLConfiguration

    public KMLRawReader(InputStream inputStream, KMLRawReader.ReadType readType,
            SimpleFeatureType featureType) {
        if (KMLRawReader.ReadType.SCHEMA_AND_FEATURES.equals(readType)) {
            if (featureType == null) {
                parser = new PullParser(new KMLConfiguration(), inputStream, KML.Placemark,
                        KML.Schema);
            } else {
                parser = new PullParser(new KMLConfiguration(), inputStream, pullParserArgs(
                        featureTypeSchemaNames(featureType), KML.Placemark, KML.Schema));
            }
        } else if (KMLRawReader.ReadType.FEATURES.equals(readType)) {
            if (featureType == null) {
                parser = new PullParser(new KMLConfiguration(), inputStream, KML.Placemark);
            } else {
                parser = new PullParser(new KMLConfiguration(), inputStream, pullParserArgs(
                        featureTypeSchemaNames(featureType), KML.Placemark));
            }
        } else {
            throw new IllegalArgumentException("Unknown parse read type: " + readType.toString());
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.