[GRASS-user] How to find all vectors that overlay a given region
Michael Barton
michael.barton at asu.edu
Wed Sep 19 10:31:00 EDT 2007
On 9/19/07 4:36 AM, "Hamish" <hamish_nospam at yahoo.com> wrote:
> Michael Barton wrote:
>
>> Running v.info will give you the extents of a vector file. You can parse
>> this and compare the extents to the region extents to see if they overlap.
>>
>> You could also use the approach I gave for finding the intersection of 2
>> raster maps.
>>
>> parse g.region -ugp vect=vector1
>> parse g.region -ugp vect=vector2
>>
>> compare the extents of the regions defined by the vectors with extents of
>> the current region
>>
>> parse g.region -ugp
>
> beware the case where the bounding boxes overlap but the vector features
> within
> do not.
Good point. I don't know how to account for that since vectors are not a
continuous field.
Michael
__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton
More information about the grass-user
mailing list