[R-sig-Geo] Polygon width
Paulo Flores Ribeiro
paulo.flores.mail at gmail.com
Wed Apr 25 12:26:23 CEST 2018
Hello,
I have a shapefile with ca. 25000 polygons. Each polygon has an average
of 40 vertices (nodes). I would like to extract, for each polygon, the
distance separating the two most distant vertices (aka "polygon
diagonal" or "maximum polygon width"). It is not important whether the
polygon is convex or concave, so the lines connecting the vertices can
be inside or outside the polygon. The desired result would be a
two-column array, with a number of rows equal to the number of polygons,
and where the first column is the id of the polygons, and the second the
"maximum width" of the corresponding polygon.
What would be the best way to do this, considering that the calculation
will probably require frequent updates (e.g. due to changes in the shape
of the polygons)?
Thanks in advance,
PauloFR
More information about the R-sig-Geo
mailing list