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
------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users