[Xastir-dev] Optimizing Shapefile drawing

Curt, WE7U archer at eskimo.com
Thu Dec 16 14:14:50 EST 2004


On Thu, 16 Dec 2004, Tom Russo wrote:

> I had an idea today for how to improve the speed of shapefile rendering.
> I wanna run it up the flagpole first.
>
> There is a public-domain (not even GPL) implementation of an algorithm called
> Rtree --- it's used in Grass for their vector-layer query feature ---
> from http://www.superliminal.com/sources/sources.htm


> Doing this could be a huge speed improvement when using very large shapefiles
> (like the ones James Ewen was talking about with street-level maps of entire
> Canadian provinces in one file), because there is no linear search through
> the shapefile for the (possibly) small fraction of shapes that fall within
> the current view.
>
> Generating the rtree is a linear step through the shapefile that pulls out
> bounding boxes for every shape and stores them in a datastructure, so the first
> time the shapefile is rendered it would be slower than it is now, but
> subsequent passes could be much, much quicker.

It sounds like a great idea!  The only thing that would make me
hesitate would be if we were ready at this point to go to an SQL
back-end.  That's a ways off, so these improvements should be
useful for quite a while.

How hard would it be to generalize it to cover ALL types of vector
maps?  In that case we could speed up anything OGR could handle plus
Shapefiles, PocketAPRS, dosAPRS, WinAPRS maps.

--
Curt, WE7U.   APRS Client Comparisons: 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-dev mailing list