Sunburned Surveyor ha scritto:
> I've been looking over the GeoTools 2.5 Javadoc for the code to access
> ESRI Shapefiles, and I've got a couple of quick questions:
> 
> Question 1:
> I know the typical usage pattern is to obtain a ShapefileDataStore
> from a ShapefileDataStoreFactory, and then use the methods of the
> ShapefileDataStore to access Geotools Feature objects from the
> underlying Shapefiles. If I just want access to the underlying Shape
> (feature geometry) and Object (feature attribute values) data, can I
> just create my ShpFiles object and create my ShapefileReader and
> DbfFileReader directly?

Yes, you can. As far as I remember you're giving up spatial index
support if you do (but maybe you simply do not need it?)

> Question 2:
> What type of Object is returned by the ShapefileReader.Record.Shape
> method? Is it a JTS Geometry or something else? What is the quickest
> way to get this object converted to a JTS Geometry?

All the GeoTools code still assumes JTS geometries everywhere, it's just
the feature api that became more general. So the code should be still
generating a JTS geometry by default.

Cheers
Andrea

-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to