[GRASS-user] How to find whether one vector is contained by another

Patton, Eric epatton at nrcan.gc.ca
Wed Oct 11 14:09:06 EDT 2006


A lot of time I get requests to find out what vector navigation tracklines
fall within a certain region. This is easy to do by visual inspection
(turning on and off vectors in gis.m) when the number of vectors is low, but
becomes too much work for large numbers (i.e., 200). What is the best way to
find out if one vector is contained by another, without writing any output?
All I need is a listing of vector names. 

I was thinking maybe set up a bash switch statement to look at a set of
cases between the vector's region extents and the extents of the region in
question. It seems to me there would be a lot of scenarios to consider and
would be really complex (i.e, north_map < north_region && north_map >
south_region && ...)

Is there any existing vector program that performs this functionality
already? If not, what do you think would be the best approach to solve this
problem?

~ Eric.




More information about the grass-user mailing list