Opened 2 months ago

Closed 6 days ago

#5804 closed defect (wontfix)

NULL geometries generated from ST_FORCE3D(geom,NULL)

Reported by: ponceta Owned by: pramsey
Priority: medium Milestone: PostGIS 3.4.4
Component: postgis Version: 3.4.x
Keywords: 3D Cc: ponceta

Description

It is not a recent bug but actually the result of

ST_FORCE3D(geom,NULL) is NULL

On the user side it seems like a bug since is should be equivalent as not providing the altitude value to the ST_FORCE3D function :

ST_FORCE3D(geom) is the 3D geom with 0 as altitude which is the result of ST_FORCE3D(geom,0)

Can we agree that it is a bug?

Change History (3)

comment:1 by ponceta, 2 months ago

To reproduce quickly on postgis side, try :

    'SELECT ST_ASTEXT(ST_FORCE3D(ST_GeomFromText('POINT(2540642.81 1151868.287)',2056)))'

    'SELECT ST_ASTEXT(ST_FORCE3D(ST_GeomFromText('POINT(2540642.81 1151868.287)',2056),0))'

    'SELECT ST_ASTEXT(ST_FORCE3D(ST_GeomFromText('POINT(2540642.81 1151868.287)',2056),NULL))'
Last edited 2 months ago by ponceta (previous) (diff)

comment:2 by pramsey, 3 weeks ago

I can agree it's a bug, and almost certainly a result of leaning too hard on STRICT mode in the function definition.

comment:3 by robe, 6 days ago

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.