Pole of Inaccessibility via Shapely's PolyLabel - Contained within the given polygon? #1854
-
I recently wrote code to render a visualization with representative points marked inside a collection of polygons. I used Shapely's Update: Looking at the original algorithm description, it states "a fast algorithm for finding polygon pole of inaccessibility, the most distant internal point from the polygon outline." Based on that statement, it appears the behavior I'm seeing is unexpected, unless the approximation algorithm is not guaranteed to produce an internal point. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
My interpretation of the documentation is also that the center point should always be inside the polygon. In GEOS, this is called Maximum Inscribed Circle, and quoting its docs:
Now, currently we have a custom implementation in Python, and are not using the GEOS function (there is a draft PR for doing that: #1307). Do you have an example of such a polygon where the result is not inside the polygon? |
Beta Was this translation helpful? Give feedback.
My interpretation of the documentation is also that the center point should always be inside the polygon. In GEOS, this is called Maximum Inscribed Circle, and quoting its docs:
Now, currently we have a custom implementation in Python, and …