I will see how well I do at answering without looking at the code :-)

There are two implementations around; one uses an index and one does not.

The one that uses an index will return a different FeatureReader 
depending on the request being processed (for example if all they want 
back is FeatureIDs it is quicker to just traverse the shp file - and not 
even open the dbf).

Sunburned Surveyor wrote:
> I had a few minutes tonight to sit down and look over the API docs for 
> the ShapeFileDataStore and related classes included in GeoTools 2.2.3. 
> (I'm hoping to use this code as part of my FeatureCache for OpenJUMP.) 
> I have a few of questions I would like to ask the GeoTools developers:
>  
> [1] What implementation of the FeatureReader interface is returned by 
> the ShapefileDataStore getFeatureReader() method?
Depends on the query used.
> [2] Is the ShapefileDataStore currently being used by UDig?
The indexed one is.
> [3] Are there any major changes planned for this class, or for the 
> FeatureReader interface in the near future?
I would like to use a straight Iterator<Feature> you can see this by 
going FeatureSource.getFeatures().iterator() ... but unless other people 
are interested it will not happen promptly.

We *are* planning to change the FeatureModel used by GeoTools (so the 
instances returned by the FeatureReader will be slightly different.
> [4] If I put together some documentation that explained how to use the 
> GeoTools ShapeFileData store class, would there be an appropriate 
> place for it at GeoTools, and how would I go about contributing it?
There is a User Guide wiki space; right now you have to ask first (so I 
can warn you that we may need you to sign something for OSGeo and that 
we do not have our documentation license sorted out yet). You can also 
place docbook straight into the shapefile module.

In general if client code has to know anything Shapefile specific then 
we have a problem. I would like client code to just use DataStore / 
FeatureSource / FeatureStore / FeatureCollection - and never look at a 
FeatureReader.

Cheers,
Jody


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to