[postgis-users] ST_Force3D and null/unknown altitude

Sandro Santilli strk at keybit.net
Thu Mar 17 01:20:33 PDT 2016

On Thu, Mar 17, 2016 at 08:35:54AM +0100, Denis Rouzaud wrote:

> My preferred approach would be that Postgis handle null altitudes natively.
> If not possible, I think a native Postgis function ST_Force3D(geom,
> null_value) would help.
> Anyway, doing it myself is not a big deal, but I think I'm not the only
> one dealing with this issue.

See https://trac.osgeo.org/postgis/ticket/3057 for adding
a parameter to ST_Force3D (to specify an altitude), but
I don't see how a 3D object with null Z would differ from
a 2D object. The code has been recently tweaked to threat
2D objects as being present at all altitudes when compared
with 3D objects:


More information about the postgis-users mailing list