Jesse is the module maintainer for shapefile, and he does know about the 
FeatureList interface.

You are correct that Shapefile (where the features are ordered by 
number) is a great match for this interface - and indeed is the 
motivation for the interface.

Jesse does have the ability to "seek" in the shapefiles, as you pointed 
out it is needed when using an index. His index is diskbased, but you 
can see how he jumps around the file at a low level by reviewing the code.

Javadocs for FeatureList (and any of the data access classes are your 
best resource).
Jody

> On 7/5/06, *Jody Garnett* <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     Fernando González wrote:
>     > Hi all,
>     >
>     > Is it possible to access a random feature in a DataStore? If it is,
>     > how can I do it? If it isn't, Is there any plan to provide random
>     > access to the data in the future?
>     There is an API included in 2.2.x, as of this time no datastore
>     implementations have implemented it. When you do aquire a
>     FeatureList it
>     will be an in memory construct etc...
>
>
> Currently I'm doing something like that. I get a ShapefileDataStore 
> and I store its features in memory (ArrayList) so I can access any 
> feature. However, I think it is a waste of memory and it only allows 
> you to open shapefiles as you have enough free memory.
>
> I need this stuff because I have built a Quadtree index (from JTS) 
> where I store the indexes of the features in the ArrayList. I can't 
> figure out how to spatially index a datastore without random access. 
> Is there any other way?
>
> I think there must be a way to implement this without reading all 
> features in memory (at least in shapefiles since they provide the .shx 
> file), isn't it?
>
> Where can I find documentation about the API you have mentioned?
>
> May be I can help with this.
>
> Fernando
>
>     That said having a user around that needs this stuff can really help
>     reduce the effort for a datastore developer. What datastore do you
>     need
>     this for ...
>     Jody
>
>



Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to