[GRASS-dev] v.what and spatial index

Glynn Clements glynn at gclements.plus.com
Tue Sep 12 05:11: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.
> 
> How would this change from the first approach (if v.what could easily be 
> made to accept multiple coordinates) ? This would again mean 'blindly' 
> collecting points before seeing the results, or having to call v.what 
> multiple times.

v.what would read one coordinate pair, perform the lookup, write out
the result(s), repeat until EOF.

gis.m would start one v.what process; each time you click the mouse
button, it would send the coordinates to the v.what process, read the
result, then display it. It would need to restart v.what if the set of
maps changed, but could use a single process to look up multiple
points.

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




More information about the grass-dev mailing list