<div dir="ltr">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).<div><br></div><div>The description of the algorithm in the GIS-SE question is essentially correct.</div><div><br></div><div>And yes, improving the documentation page would be good, as well as providing some example diagrams.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 1, 2021 at 10:15 PM Paolo Cavallini <<a href="mailto:cavallini@faunalia.it">cavallini@faunalia.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
the description of the function is scanty. I always assumed it<br>
calculated the point within a polygon closest to the centorid, but I<br>
read it may not be so:<br>
<a href="https://gis.stackexchange.com/questions/76498/how-is-st-pointonsurface-calculated" rel="noreferrer" target="_blank">https://gis.stackexchange.com/questions/76498/how-is-st-pointonsurface-calculated</a><br>
Is this confirmed?<br>
In case, I suggest describing it in the manpage.<br>
Thanks for any clarification.<br>
Cheers.<br>
-- <br>
Paolo Cavallini<br>
<a href="http://www.faunalia.eu" rel="noreferrer" target="_blank">www.faunalia.eu</a> - QGIS.org<br>
training, support, development on QGIS, PostGIS and more<br>
_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-devel</a><br>
</blockquote></div>