From: Imran R. <ra...@gm...> - 2010-10-19 12:51:44
|
Dear List. I am trying to visualize a collection of features. I have created featureSource out of featureCollection using DataUtilities method. Now when I try to view features I`m getting the following error. I am assuming that after creating a simplefeaturecollection we have to set the bounds? am I missing something here. java.lang.ClassCastException: java.lang.String cannot be cast to com.vividsolutions.jts.geom.Geometry at org.geotools.data.collection.CollectionDataStore.getBoundsInternal(CollectionDataStore.java:162) at org.geotools.data.collection.CollectionDataStore.getBounds(CollectionDataStore.java:143) at org.geotools.data.AbstractFeatureSource.getBounds(AbstractFeatureSource.java:308) at org.geotools.data.AbstractFeatureSource.getBounds(AbstractFeatureSource.java:276) at org.geotools.map.FeatureLayer.getBounds(FeatureLayer.java:189) at org.geotools.map.MapContext.getLayerBounds(MapContext.java:463) at org.geotools.map.DefaultMapContext.getViewport(DefaultMapContext.java:524) at org.geotools.map.MapContent.addMapBoundsListener(MapContent.java:628) at org.geotools.map.MapContext.addMapBoundsListener(MapContext.java:596) at org.geotools.swing.JMapPane.setMapContext(JMapPane.java:460) at org.geotools.swing.JMapFrame.<init>(JMapFrame.java:171) at org.geotools.swing.JMapFrame.<init>(JMapFrame.java:151) at org.geotools.swing.JMapFrame.showMap(JMapFrame.java:122) at gui.GtMapFrame.<init>(GtMapFrame.java:37) regards, Imran -- I.R |