I have a dataset of polygons like this one:
I would like to split these polygons in separate parts at their most narrow location (if they have one). For example the two small polygons should not be split. So I would need to identify narrow locations and then split the polygon there.
How could this be done using R?
Best Answer
Given a polygon
pol
, like this:then:
produces this:
Here's the source code for
splitnarrow
. There's a zillion places where this can go wrong, and first you have to determinesdist
andeps
for your polygons.sdist
is the smallest value that splits the single polygon into a multipolygon, andeps
is the smallest value that touches both sides when buffered from the waist intersection point. Finding these could be automated.