Hey there Andrea

Thanks for the tip. Found the ShapeFileIndexer main() and ran it.

By the way, the little program worked like a breeze, very easy to use, 
fast and with nice feedback. The normal QIX tree was being generated 
with a depth of 10 for my shapefile. I then forced it to generate a tree 
with a depth 20, which gave a 64MB QIX file instead of an 8MB one.

Unfortunately, I got NO performance increase with all that.. :(

It seems to me that the issue is that, when performing a spatial query, 
GeoTools ends up creating a FilteringFeatureReader. And merely asking 
featureCollection.isEmpty() leads to a call to reader.hasNext(), which 
ends up in the loop at FilteringFeatureReader.java, lines 127-134 - 
basically, calling the internal featureReader's next() and checking to 
see if the filter applies.

So I ask: could this be loading ALL features all of the time? A peculiar 
behavior that makes me even more sure of this is that using a spatial 
filter for an area REALLY far away from the shapefile takes the longest 
time, which in theory is surprising since the QIX should rule out that 
area immediately.
In any case, maybe this call in FilteringFeatureReader could be replaced 
by a smarter one?

If you guys want, I can write down a little program that makes this 
issue show up for big shapefiles. On the other hand, I'm not allowed to 
make our particular big shapefile available to you guys. But I guess the 
shapefile used for the QIX tests (with 6 million features and 1.1GB) is 
even bigger, so the issue should show up just the same.

Thanks for all
Milton

Andrea Aime wrote:
> 
> It's ShapeFileIndexer. Has a main method, you can call it using
> -M levels to specify how many levels you want.
> Let me know if that helps.
> 
> Cheers
> Andrea
> 

-- 

Milton Jonathan
Grupo GIS e Meio Ambiente
Tecgraf/PUC-Rio
Tel: +55-21-3527-2502

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to