[postgis-devel] ST_PointOnSurface calculation

Paolo Cavallini cavallini at faunalia.it
Mon Feb 1 22:38:00 PST 2021


thanks a lot Martin for the clarification.
should I open a ticket on the docs?
cheers.

Il 02/02/21 07:29, Martin Davis ha scritto:
> Yes, ST_PointOnSurface computes a point which is guaranteed to lie
> within a polygon.  This is not the case for the centroid, which may lie
> outside a polygon (e.g the centroid of a C-shaped polygon lies outside
> the polygon).
> 
> The description of the algorithm in the GIS-SE question is essentially
> correct.
> 
> And yes, improving the documentation page would be good, as well as
> providing some example diagrams.
> 
> On Mon, Feb 1, 2021 at 10:15 PM Paolo Cavallini <cavallini at faunalia.it
> <mailto:cavallini at faunalia.it>> wrote:
> 
>     Hi all,
>     the description of the function is scanty. I always assumed it
>     calculated the point within a polygon closest to the centorid, but I
>     read it may not be so:
>     https://gis.stackexchange.com/questions/76498/how-is-st-pointonsurface-calculated
>     <https://gis.stackexchange.com/questions/76498/how-is-st-pointonsurface-calculated>
>     Is this confirmed?
>     In case, I suggest describing it in the manpage.
>     Thanks for any clarification.
>     Cheers.
>     -- 
>     Paolo Cavallini
>     www.faunalia.eu <http://www.faunalia.eu> - QGIS.org
>     training, support, development on QGIS, PostGIS and more
>     _______________________________________________
>     postgis-devel mailing list
>     postgis-devel at lists.osgeo.org <mailto:postgis-devel at lists.osgeo.org>
>     https://lists.osgeo.org/mailman/listinfo/postgis-devel
>     <https://lists.osgeo.org/mailman/listinfo/postgis-devel>
> 
> 
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel
> 

-- 
Paolo Cavallini
www.faunalia.eu - QGIS.org
training, support, development on QGIS, PostGIS and more


More information about the postgis-devel mailing list