[GRASS-dev] v.what and spatial index

Moritz Lennert mlennert at club.worldonline.be
Thu Aug 10 04:04:37 EDT 2006


Hello,

Trying to use v.what on a fairly large file (124658 areas) I noticed 
that it rebuilds the spatial index at every usage, obviously making it 
extremely inefficient.

This is discussed briefly in bug #3193:

http://www.intevation.de/rt/webrt?serial_num=3193&display=History

And Radim mentions spatial index in his Vector ToDo document:

http://freegis.org/cgi-bin/viewcvs.cgi/grass6/doc/vector/TODO?rev=HEAD&content-type=text/vnd.viewcvs-markup

This is a serious issue when you have to query such large maps frequently.


Radim wrote at the time:

"Writing of the index to disk could be enabled by GRASS variable and/or
v.build option. But that changes vector format which must be supported
in all next version. Before we enable writing of spatial index, it
should be revised if the format can be changed to save some space."

I think that seen the fact that we are quickly moving to new releases 
and then to further development, it might be the time to take this up 
again in order to plan ahead.

In the bug report, Hamish proposes to create the spatial index once per 
session and erase it when leaving the session. I don't know if space is 
such as problem, but for me even this seems inefficient. Once the index 
is created it should stay there even when leaving the session. Or at 
least there should be a configurable option (maybe a GRASS environment 
variable) to leave the index files in place.

Any reactions ?

Moritz




More information about the grass-dev mailing list