mapbox / polylabel

A fast algorithm for finding the pole of inaccessibility of a polygon (in JavaScript and C++)
Other
1.44k stars 151 forks source link

Handling multi-ring polygons #27

Closed spoilsportmotors closed 7 years ago

spoilsportmotors commented 7 years ago

I don't think this handles - or intends to handle - polygons with multiple rings. Typically, polygon rings with counter-clockwise winding are 'solid' and clockwise windings represent 'holes'.

Any thoughts on the level of effort to extend this library to account for polygons with one or more holes?

mourner commented 7 years ago

It fully supports polygons with holes already, exactly how you describe. You can even see it in action on the illustration in the readme.

spoilsportmotors commented 7 years ago

Thanks - let me go back and look at my data - I thought it was multi-part polys (ESRI geodatabase), but maybe they're malformed.