[postgis-devel] ST_PointOnSurface not for PolygonZ?

Tom van Tilburg tom.van.tilburg at gmail.com
Wed Nov 2 08:24:11 PDT 2016


Manual says: "This function supports 3d and will not drop the z-index."

This indeed works as per documentation example:
SELECT ST_AsEWKT(ST_PointOnSurface(ST_GeomFromEWKT('LINESTRING Z(0 5 1, 0 0
1, 0 10 2)')));
Returns: "POINT(0 0 1)"

This doesn't:
SELECT ST_AsEWKT(ST_PointOnSurface(ST_GeomFromEWKT('POLYGON Z((14 14 10,20
10 150,34 6 25,14 14 10))')))
Returns: "POINT(18 12)"

Inspired by:
http://gis.stackexchange.com/questions/216212/how-to-create-points-grid-on-a-3d-surface-with-geometry-polygonz-in-postgis
and:
http://gis.stackexchange.com/questions/201161/postgis-st-pointonsurface-and-st-centroid-dropping-z

I guess GEOS is just not capable of doing this, but the documentation is
not clear about that and implies that PolygonZ would work just as
LinestringZ would work.

Best,
 Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20161102/d1595c36/attachment.html>


More information about the postgis-devel mailing list