Better "centerpoint" than centroid for placing a map marker inside a concave region (that may have holes)?

464 Views Asked by At

I'm using the centroid of polygons to attach a marker in a map application. This works definitely fine for convex polygons and quite good for many concave polygons.

However, some polygons (banana, donut) obviously don't produce the desired result: The centroid is in these cases outside the polygons area.

Does anybody know a better approach to find a suitable point within any polygons area (which may contain holes!) to attach a marker?

enter image description here

Disclaimer: This is a cross-post from stackoverflow. I was recommended to re-post it here.