[postgis-devel] POINT EMPTY in WKB
Mateusz Loskot
mateusz at loskot.net
Mon Dec 6 12:03:31 PST 2010
On 06/12/10 18:01, Paul Ramsey wrote:
> A final possibility would be to hack POINT EMPTY into WKB, as
> something like POINT(nan nan nan) or POINT(inf inf inf) or POINT(-0 -0
> -0). There would be a danger there in platforms that have different
> interpretations of what nan, inf or -0 are in binary.
>
> Discussion?
If C/C++ was Fortran, it would be possible to use the well-known
NaN and INF bit patterns to mean uninitialized values:
http://bit.ly/eINabI
In C/C++, this kind of solution is potentially non-portable.
Very similar idea was discussed on Boost ml about using
those bit patterns to mean uninitialized float-point values
for use with Boost.Serialization library:
http://lists.boost.org/Archives/boost/2005/11/96941.php
Although, this thread may turn into a useful resource.
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
Member of ACCU, http://accu.org
More information about the postgis-devel
mailing list