Package org.geotools.kml

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


                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

    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

    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

    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

        }
        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

TOP

Related Classes of org.geotools.kml.KMLConfiguration

Copyright © 2018 www.massapicom. 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.