[geos-devel] Porting polylabel to GEOS and PostGIS

Nikolai Bezdna mofoyoda at gmail.com
Mon Apr 10 01:33:44 PDT 2017


Hello!

I’d like to make a port of polylabel function (https://github.com/mapbox/polylabel <https://github.com/mapbox/polylabel>) to PostGIS. My goal is to have an ST_PoleOfInaccessibility function in PostGIS, that acts a lot like ST_Centroid or ST_PointOnSurface, but finds the visual center of a polygon.
Since it has a C++ version and GEOS is a major PostGIS dependency, I guess it’s a good fit to port it here.
The problem is this hpp has some dependencies on mapbox bits: geometry.hpp (https://github.com/mapbox/geometry.hpp <https://github.com/mapbox/geometry.hpp>) and variant, which I hope could be substituted with GEOS types.
I haven’t ever looked into GEOS code yet and I’m not perfect at C++ either, so I guess this relatively simple task is a good point to start.
Can someone please provide guides on where to start with this port. 
Is it reasonable to have this code in GEOS, or this has to be done with just plpgsql without touching any dependencies?
Any feedback on this topic is appreciated.

Cheers,
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20170410/7aac688f/attachment.html>


More information about the geos-devel mailing list