[postgis-users] st_intersection of 3D objects

Alexandre Neto senhor.neto at gmail.com
Thu Apr 27 08:28:21 PDT 2023


PostGIS documentation for the st_intersection <https://postgis.net/docs/ST_Intersection.html> states the following

> If working with 3D geometries, you may want to use SFGCAL based ST_3DIntersection <https://postgis.net/docs/ST_3DIntersection.html> which does a proper 3D intersection for 3D geometries. Although this function works with Z-coordinate, it does an averaging of Z-Coordinate.

I have used that averaging in the past, but it seems that I can no longer use it in PostgreSQL 14 and PostGIS 3.3.2 (POSTGIS="3.3.2 4975da8" [EXTENSION] PGSQL="140" GEOS="3.10.2-CAPI-1.16.0" PROJ="8.2.1" LIBXML="2.9.13" LIBJSON="0.15" LIBPROTOBUF="1.3.3" WAGYU="0.5.0 (Internal)")

SELECT ST_AsText(ST_Intersection('POINTZ(0 0 0)'::geometry, 'LINESTRINGZ ( 0 0 5, 0 2 5)'::geometry));

Used to return:

'POINT Z (0 0 2.5)'

but now it returns

'POINT Z (0 0 0)'

Is this expected or a bug.


Alexandre Neto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20230427/cfbe9e92/attachment.htm>

More information about the postgis-users mailing list