[GRASSLIST:6788] neighbors of polygons

Daniel Isenegger disen at geo.unizh.ch
Mon May 16 06:59:07 EDT 2005


Hi,
i work with grass 5.7 having the attribute data in postgres-DB.

in a polygon-shapefile containing several hundred of polygons i want to 
analyze for each polygon which neighboring polygons it has. Conceptually 
i see there 2 cases:
1) neighboring polygons sharing a common boundary with the current 
polygon: these polygons should be selectable by identifying the 
identifiers of the border-lines of the current polygon and search over 
all border-lines of all polygons for those identifiers.
here my question is: how to identify the identifiers of all border-lines 
of a polygon?

2) neighboring polygons not sharing a border with the current polygon: 
here i thought of creating buffers with increasing sizes around the 
current polygon and looking for
- easy case: centers of other polygons located within these buffers
- computationally more challenging case: arbitrary point of a polygon 
located within these buffers
here my questions: this method is not very elegant (conceptual and 
technical). do you have better ideas for solving a problem like this


Many thanks
dani

ps i tried to do an approach to do this with v.to.db, but didn't 
progress much




More information about the grass-user mailing list