[GRASS-dev] v.what and spatial index
Moritz Lennert
mlennert at club.worldonline.be
Wed Sep 13 10:34:12 EDT 2006
Glynn Clements wrote:
> Moritz Lennert wrote:
>
>>>> 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.
>> Here's my attempt at applying what you suggest. It's not very
>> complicated, and seems to work fine here, but I'd appreciate if someone
>> could check that I didn't do anything wrong before committing.
>
> One issue which won't show up when running it directly from the shell,
> but will if you run it via pipes: you need to explicitly set stdin and
> stdout to line-buffered operation with e.g.:
>
> setvbuf(stdin, NULL, _IOLBF, 0);
> setvbuf(stdout, NULL, _IOLBF, 0);
Just to show my ignorance: why stdout ? I'm only using stdin, or ?
Moritz
More information about the grass-dev
mailing list