[R-sig-Geo] Diameter of a polygon
Karl Ove Hufthammer
karl at huftis.org
Wed Apr 13 13:42:24 CEST 2011
Is it possible to easily calculate the diameter of a (large) polygon,
i.e. the longest distance between two points of the polygon? For a
rectangle, this would be the length of a diagonal.
The two points need not be actual vertices of the polygons (or must they
necessarily be so?).
I’m also interested in the shortest length. For a rectangle, this would be
the length of the shortest side.
And perhaps also the longest line that can be placed inside the polygon.
Note that this may easily be shorter than the longest diameter, as the
corresponding diameter line may pass outside the polygon. (Though I guess
for the *shortest* line, it would be identical to the smallest diameter.)
A quick rseek.org search didn’t turn up anything relevant.
--
Karl Ove Hufthammer
More information about the R-sig-Geo
mailing list