I believe you can read the shape file as a ShapeFileDataStore and extract
the FeatureSource. A FeatureSource stores the features that you can extract
from using a FeatrueReader.
This link might have some information
http://geotools.codehaus.org/Working+with+JTS+Geometries+from+DataStores
Regards
Ajay Ravichandran
On Tue, Sep 23, 2008 at 9:54 PM, yellowbkpk <[EMAIL PROTECTED]> wrote:
>
> I'd like to iterate through all of the features of a Shapefile (and convert
> them to OpenStreetMap format, but I can do that part once I read them).
>
> I've succesfully followed the tutorial on the webpage to read the
> shapefile,
> but the problem is that once I read it in, I can't break apart any of the
> multi* geometry types.
>
> If I have a MultiPolygon or MultiLineString (for example), how do I fetch
> the pieces of the geometry using the JTS API?
>
> It looks like I could continuously break it down with getGeometryN() and
> getNumGeometries(), but then I would lose the ability to group the points
> into the lines and polygons.
>
> Thanks,
> Ian
> --
> View this message in context:
> http://www.nabble.com/How-to-Iterate-Through-Shapefile--tp19641058p19641058.html
> Sent from the geotools-gt2-users mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users