[GRASS-user] How to get adjacent areas

Hamish hamish_nospam at yahoo.com
Wed Jun 13 05:12:20 EDT 2007


Moritz Lennert wrote:
> 
> > v.to.db option=sides
> 
> If I understand correctly this only works for boundaries, not for 
> areas/centroids.
> 
> So (again IIUC), to get a list of neighbors of an area you would have
> to:
> 
> - attribute a category value to each boundary
> - use v.to.db option=sides to get the areas adjacent to each boundary
> - for each area:
> 	- search the boundaries to which this area is adjacent
> 	- search the other areas adjacent to these boundaries

Correct.

> Might be worth looking into how difficult it would be to apply the 
> 'sides' option to centroids and find adjacent centroids...

but there may be any number of results. for boundary there are at most
two sides (2 columns to fill).


Hamish




More information about the grass-user mailing list