[postgis-devel] ST_PointOnSurface calculation

Martin Davis mtnclimb at gmail.com
Wed Feb 3 20:15:34 PST 2021


Thanks, those are great suggestions!

On Wed, Feb 3, 2021 at 7:54 PM Imre Samu <pella.samu at gmail.com> wrote:

>
> > I've updated the manual page
>
> Thanks !
>
> > Any further suggestions?  (Diagrams would be good, I know)
>
> just for brainstorming, from a beginner mind.
> No problem if these ideas are rejected.
>
> #1.
> Adding  ST_MaximumInscribedCircle  to the "See also"
>      reason:  in my mind  -  this is similar like the  "Circle on Polygon"
> problem
>
> #2.
> in the tutorial page [1]  19.1. ST_Centroid / ST_PointOnSurface
>  .. there is an example diagram, maybe it can be reused ...
> [1]
> https://postgis.net/workshops/postgis-intro/geometry_returning.html#st-centroid-st-pointonsurface
> or it is possible to crosslink the tutorial page [1] ?
>
> #3. reusing the geometry from [1] .. we can create an example ..
>    when the  ~3 center like example is different.
>
> SELECT
>   ST_AsText(ST_Centroid(geom)) AS "centroid",
>   ST_AsText(ST_PointOnSurface(geom)) AS "pointOnSurface",
>   ST_AsText((SELECT center FROM ST_MaximumInscribedCircle(geom))) AS
> "center_maximumInscribedCircle" -- postgis >= 3.1 Geos >=3.9
> FROM (VALUES
>     ('POLYGON ((30 0, 30 10, 10 10, 10 40, 30 40, 30 50, 0 50, 0 0, 0 0,
> 30 0))'::geometry)
>   ) AS t(geom);
>
> +------------------------------+----------------+-------------------------------+
> |           centroid           | pointOnSurface |
> center_maximumInscribedCircle |
>
> +------------------------------+----------------+-------------------------------+
> | POINT(11.666666666666666 25) | POINT(5 25)    | POINT(5.859375 5.859375)
>      |
>
> +------------------------------+----------------+-------------------------------+
> (1 row)
>
> Regards,
>    Imre
>
>
> Martin Davis <mtnclimb at gmail.com> ezt írta (időpont: 2021. febr. 4., Cs,
> 1:41):
>
>> I've updated the manual page:
>> https://postgis.net/docs/manual-dev/ST_PointOnSurface.html
>>
>> Any further suggestions?  (Diagrams would be good, I know)
>>
>> On Mon, Feb 1, 2021 at 10:15 PM Paolo Cavallini <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
>>> Is this confirmed?
>>> In case, I suggest describing it in the manpage.
>>> Thanks for any clarification.
>>> Cheers.
>>> --
>>> Paolo Cavallini
>>> www.faunalia.eu - QGIS.org
>>> training, support, development on QGIS, PostGIS and more
>>> _______________________________________________
>>> postgis-devel mailing list
>>> postgis-devel at lists.osgeo.org
>>> 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
>>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20210203/da5198cf/attachment.html>


More information about the postgis-devel mailing list