You found a geometry Suneesh - GeoTools uses the JTS Geometry class.
Jody
On Mon, Oct 5, 2009 at 6:54 PM, suneesh kumar <[email protected]> wrote:
> 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.
>
>
> ------------------------------
> Keep up with people you care about with Yahoo! India Mail. Learn
> how<http://in.rd.yahoo.com/tagline_galaxy_1/*http://in.overview.mail.yahoo.com/connectmore>
> .
>
>
> ------------------------------------------------------------------------------
> 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
>
>
------------------------------------------------------------------------------
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