<html><body><div><div><span>Hi,</span></div><br><div><a target="_blank" rel="noopener noreferrer" href="https://postgis.net/docs/ST_Intersection.html">PostGIS documentation for the st_intersection</a><span> states the following</span></div><br><blockquote style="margin:8px 0;padding:8px 16px 8px 6px;color:#8C8C8C;border-left:solid 2px #CCC"><div><span>If working with 3D geometries, you may want to use SFGCAL based </span><a target="_blank" rel="noopener noreferrer" href="https://postgis.net/docs/ST_3DIntersection.html">ST_3DIntersection</a><span> which does a proper 3D intersection for 3D geometries. </span><b><span>Although this function works with Z-coordinate, it does an averaging of Z-Coordinate.</span></b></div></blockquote><br><div><span>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)")</span></div><br><div><code style="padding:0 4px;background-color:#F5F5F5;border-radius:4px;font-weight:500"><span>SELECT ST_AsText(ST_Intersection('POINTZ(0 0 0)'::geometry, 'LINESTRINGZ ( 0 0 5, 0 2 5)'::geometry));</span></code></div><br><div><span>Used to return:</span></div><br><div><code style="padding:0 4px;background-color:#F5F5F5;border-radius:4px;font-weight:500"><span>'POINT Z (0 0 2.5)'</span></code></div><br><div><span>but now it returns </span></div><br><div><code style="padding:0 4px;background-color:#F5F5F5;border-radius:4px;font-weight:500"><span>'POINT Z (0 0 0)'</span></code></div><br><div><span>Is this expected or a bug.</span></div><br><div><span>Greetings,</span></div><br><div><span>Alexandre Neto</span></div></div></body></html>