Simon Suyadi | 6 Nov 2007 00:37
Favicon

WKT for NaN

Hi,

 

I’m a new software developer. Currently I am implementing some polygon geometry. What happens if I have NaN as floating values and I need to output something to WKT? The WKT spec does not seem to mention anything about NaN.

 

Thank you,

Simon

_______________________________________________
geos-devel mailing list
geos-devel <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-devel
Mateusz Loskot | 7 Nov 2007 05:34
Gravatar

Re: WKT for NaN

Simon Suyadi wrote:
> Hi,
> 
> I'm a new software developer. Currently I am implementing some
> polygon geometry. What happens if I have NaN as floating values and I
> need to output something to WKT? The WKT spec does not seem to
> mention anything about NaN.

Simon,

This is out of scope of the OGC SFS, WKT.
The WKT requires that you put numbers only into it:

"The coordinates are shown as integer values; coordinates may be any
double precision value."

The NaN is not a number but it might be a value or a symbol
but what's defined is that NaN does not compare equally to any number.

In other words, implementor of WKT parser is supposed to take care of
handling NaN.

Cheers
--

-- 
Mateusz Loskot
http://mateusz.loskot.net

Gmane