[R-sig-Geo] GRASS with R and distances between polygon edges

White.Denis at epamail.epa.gov White.Denis at epamail.epa.gov
Mon Oct 30 17:55:36 CET 2006


Duncan Golicher <dgoliche at sclc.ecosur.mx> wrote on 2006-10-30 08:09:49:

> ...
>
> Also while posting, can anyone suggest a way of measuring the closest
> distance between disjunct polygons in R (forest fragments)? Its easy
to
> use centroids in spdep, but we were interested in the distances
between
> the edges.
>
> Duncan

For many polygons each having possibly many points defining the edges,
it's a time consuming search.  I am not aware of any GIS software or R
packages that do this comprehensively.  One alternative is to use
buffering by some set of fixed distances.  Or, write a program/function
to do the search:  for each polygon, find the minimum distance between
all of its vertices and all of the vertices of each other polygon.
However, this algorithm does not work well with two polygons like this:

|---------------------|
|                     |
|---------------------|

           /\
          /  \
         /____\

A buffering approach would do better.

Denis




More information about the R-sig-Geo mailing list