[GRASS-dev] v.what and spatial index

Glynn Clements glynn at gclements.plus.com
Thu Sep 7 23:24:07 EDT 2006


Moritz Lennert wrote:

> However, v.what does not have an interactive mode (that's the whole idea 
> of v.what so it fits better into the GUI). This means that since it 
> builds the spatial index everytime you call it, everytime you use the 
> query tool you get the building of the spatial index.
> 
> Now, I see several options from here:

> - Change the query tool in the GUI so that it collects points and then 
> sends the whole series to v.what. This has the big disadvantage that you 
> don't see the results of your clicks immediately (i.e. you "blindly" 
> click on a series of points and then push "go" to see the results for 
> all of these points). It still means that whenever you resuse the query 
> tool spatial index gets rebuilt which can be very annoying if you have 
> to query information out of a map. So, even though this might be a 
> temporary "solution", I don't find it very satisfactory.
> 
> - Reimplement an interactive version of v.what, or rather make it 
> possible to use d.what.vect from the GUI. This would probably mean 
> recoding d.what.vect in whatever the GUI language and call GRASS library 
> functions from there.

The obvious approach is to extend v.what to allow coordinates to be
read from stdin.

BTW, it appears that v.what currently ignores all coordinate pairs
other than the first.

> - Reuse spatial index on disk, possibly making it optional on a 
> per-location or even per-mapset basis, so that those that need can use 
> it and those that would find it annoying could just ignore it.

This is a separate issue to making v.what more efficient; other
modules may benefit from not having to regenerate the spatial index
for each invocation.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list