Opened 4 years ago

#4794 new defect

ST_3DIntersection does not behave correctly with line strings when no vertex is seen within the intersecion

Reported by: basilrabi Owned by: pramsey
Priority: medium Milestone: PostGIS SFCGAL
Component: postgis Version: 3.0.x
Keywords: Cc:

Description

-- POSTGIS="3.0.2 2fb2a18" [EXTENSION] PGSQL="130" GEOS="3.7.1-CAPI-1.11.1 27a5e771" SFCGAL="1.3.6" PROJ="Rel. 5.2.0, September 15th, 2018" GDAL="GDAL 2.4.0, released 2018/12/14" LIBXML="2.9.4" LIBJSON="0.12.1" LIBPROTOBUF="1.3.1" WAGYU="0.4.3 (Internal)" TOPOLOGY RASTER

WITH solid AS (
    SELECT ST_MakeSolid(
        ST_Extrude(
            ST_Translate(
                ST_Force3D(
                    ST_GeomFromText('POLYGON ((-1 1,1 1,1 -1,-1 -1,-1 1))')
                ),
                0, 0, -1
            ),
            0, 0, 2
        )
    ) geom
)
SELECT
    ST_AsText(ST_3DIntersection(
        'LINESTRING (-2 0 0,2 0 2)'::geometry,
        solid.geom
    )),
    ST_AsText(ST_3DIntersection(
        'LINESTRING (-2 0 0,0 0 1,2 0 2)'::geometry,
        solid.geom
    ))
FROM solid

The code above returns

POINT Z (-1 0 0.5), LINESTRING Z (-1 0 0.5,0 0 1)

But I think it should be both LINESTRING Z (-1 0 0.5,0 0 1)

Change History (0)

Note: See TracTickets for help on using tickets.