use of org.geotools.feature.collection.AbstractFeatureVisitor in project chordatlas by twak.
the class Footprints method test.
public static void test() throws IOException, SAXException, ParserConfigurationException {
// create the parser with the gml 2.0 configuration
org.geotools.xml.Configuration configuration = new org.geotools.gml2.GMLConfiguration();
org.geotools.xml.Parser parser = new org.geotools.xml.Parser(configuration);
InputStream xml = new FileInputStream("/home/twak/data/around_ucl_buildings.gml");
// parse
FeatureCollection fc = (FeatureCollection) parser.parse(xml);
fc.accepts(new AbstractFeatureVisitor() {
public void visit(Feature feature) {
System.out.println(feature);
// SimpleFeature f = (Feature) i.next();
//
// Point point = (Point) f.getDefaultGeometry();
// String name = (String) f.getAttribute( "name" );
}
}, new NullProgressListener());
}
Aggregations