[Xastir] Rtree

James Ewen jewen at shaw.ca
Sun Mar 27 00:12:31 EST 2005


> I think your last comments there are the key.  Rtree appears to work
> best for me when I'm using larger shapefiles or zooming in quite a
> ways into a shapefile.  It helps in quickly finding the shapes in
> the file that fit your view.
>
> If you have smaller shapefiles, Xastir's native code that checks
> whether the bounding rectangle fits within your view will knock any
> that don't fit out of the loading procedure.  Therefore rtree
> doesn't get a chance to do its thing.

I split up my shapefiles just before Tom created the rtree option. I use a 
province wide file at wide zoom levels that only has major highways. When I 
get in closer, I use sections of the full data set. At the worst, I would 
have 4 grids to parse.

When I am zoomed into my local area (about 20 miles across), I can pan in 
about 2 seconds. With rtree enabled, that cuts down to about 1 second, but 
for the first couple of times to display can take 15 to 20 seconds.

That has the local gridsquare data (5.7 MB shapefile) and province wide 
hydrography (2.5 MB shapefile) that needs to be parsed.

Should I change to the full dataset (40 MB shapefile and 492 MB dbf) to get 
the full speed advantages of rtree?

(Speaking of which, what file(s) does rtree index?)

What is considered a large shapefile? How many MB is large?

James 





More information about the Xastir mailing list