[postgis-devel] null values in altitude
Sandro Santilli
strk at keybit.net
Thu Dec 10 02:14:36 PST 2015
On Thu, Dec 10, 2015 at 07:46:19AM +0100, Denis Rouzaud wrote:
> Hi all,
>
> If I understand correctly, Postgis does not handle NULL altitude in 3D
> geometries.
PostGIS generally does not officially support NULL value for any ordinate.
But you might want to experiment with NaN:
select ST_AsEWKT(ST_MakePoint(0,0,'nan'));
> Hence, when using ST_Force3D, it sets the altitude to 0, which I find a
> bit inconvenient (and dangerous).
>
> 1. Is there any ongoing or potential development towards handling null
> altitude in geometries or this is not technically possible?
>
> 2. Do you have any good workaround? Like using -9999 and creating your
> own ST_Force3D?
There's an enhancement ticket to add a parameter to ST_Force3D
and friends to specify the value to use for the missing ordinates:
https://trac.osgeo.org/postgis/ticket/3057
You might want to comment there, would that be sufficient to
your needs ? If so, next would be providing a patch or resources
to implement it.
--strk;
More information about the postgis-devel
mailing list