Hello,

I am trying to extract geometry of feature by iterating  FeatureCollection.

My code is this :
feature.getDefaultGeometryProperty().getValue()

But it is giving the following error :

java.lang.ClassCastException: org.geotools.feature.DefaultFeature$1 cannot be 
cast to com.vividsolutions.jts.geom.Geometry
        at 
org.geotools.feature.DefaultFeature.getDefaultGeometry(DefaultFeature.java:365)
        at 
org.geotools.feature.DefaultFeature.getDefaultGeometry(DefaultFeature.java:67)
        at 
org.geotools.feature.simple.SimpleFeatureImpl.getDefaultGeometryProperty(SimpleFeatureImpl.java:240)


How can I etract geometry from a feature collection? I am using the Geotools2.6

Thanks in advance.
Sunish.




      Yahoo! India has a new look. Take a sneak peek http://in.yahoo.com/trynew
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to