From: ballibum <bal...@we...> - 2011-05-13 06:52:44
|
Thanks for answering, i've tested your idea, but it does not work. That is my code: public static Geometry big_geom (SimpleFeatureCollection featureCollection) { Geometry big_geom = null; FeatureIterator iterator_polygone = featureCollection.features(); try { while(iterator_polygone.hasNext()) { SimpleFeature feature_polygon = (SimpleFeature) iterator_polygone.next(); Geometry the_geom = (Geometry) feature_polygon.getDefaultGeometry(); big_geom = big_geom.union(the_geom); } } finally { featureCollection.close( iterator_polygone ); } return big_geom; } I got the following error: Exception in thread "main" java.lang.NullPointerException at main.funktionen.big_geom(funktionen.java:165) at main.funktionen.Flaeche(funktionen.java:130) at main.start.main(start.java:48) -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/difference-between-layer-a-and-layer-b-tp6358222p6358322.html Sent from the geotools-gt2-users mailing list archive at Nabble.com. |