Hello,I have a polygon layer for which I would like to produce a Polygon graph. I've been trying to use the PolygonGraphGenerator, but this one builds a "geometry" graph, while I would like to build it on features. I could see that there is a FeatureGraphGenerator, that decorates a graph generator that builds a graph from geometries. But it does not seem to work if the GraphGenerator is a PolygonGraphGenerator, apparently because the PolygonGraphGenerator methods take a Polygon object as parameters:
/Exception in thread "main" java.lang.ClassCastException: org.geotools.feature.simple.SimpleFeatureImpl cannot be cast to com.vividsolutions.jts.geom.Polygon at org.geotools.graph.build.polygon.PolygonGraphGenerator.find(PolygonGraphGenerator.java:157) at org.geotools.graph.build.polygon.PolygonGraphGenerator.get(PolygonGraphGenerator.java:125) at org.geotools.graph.build.polygon.PolygonGraphGenerator.add(PolygonGraphGenerator.java:108) at org.geotools.graph.build.feature.FeatureGraphGenerator.add(FeatureGraphGenerator.java:59)/
Could somebody give me advice on this? Thanks in advance, Cheers Emmanuel
------------------------------------------------------------------------------ Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________ GeoTools-GT2-Users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
