[Xastir] Rtree

Curt Mills archer at eskimo.com
Sat Mar 26 19:49:33 EST 2005


On Sat, 26 Mar 2005, James Ewen wrote:

> I finally got around to trying out the rtree option.
> 
> It's not on my list of favourites... I find that it slows down the display
> dramatically. Once you've zoomed in and out quite a bit, things speed up a
> little. However, those first couple times take 15-20 times longer to display
> than without rtree. The speed increase once rtree is in place, doesn't make
> much difference for me. It seems that the rtree data clears out of memory
> quite quickly as well.
> 
> It could quite possibly be the way I have my shapefile data split up. I cut
> the province up into Maidenhead grid squares, and also pulled the major
> highways out for the whole province.

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.

Rtree does have to create the tree the first time the file is
loaded, so that first load takes longer.  More memory with largish
shapefiles for you zoom levels of interest mean that rtree really
shines.  The converse is that will less memory or smaller shapefiles
rtree isn't the option for you.

-- 
Curt, WE7U.				archer at eskimo dot com
http://www.eskimo.com/~archer
  Lotto:  A tax on people who are bad at math. - unknown
Windows:  Microsoft's tax on computer illiterates. - WE7U.
The world DOES revolve around me:  I picked the coordinate system!"



More information about the Xastir mailing list