A WKB geometry POINT EMPTY would be written in WKT as POINT(NaN, NaN)
A WKB geometry MULTIPOINT(1 2,EMPTY,3 4) would be written in WKT as MULTIPOINT(1 2,Nan Nan,3 4)
This PR fixes both issues by calling processor.empty_point in the WKB reader if the parsed WKB coordinates are NaN, and by writing EMPTY instead of {x} {y} ... in the WKT writer if the coordinates given are NaN.
Notes, cause this seems redundant:
An empy point could also just be a point with NaN coordinates. Assuming that NaN coordinates are already supported by all readers (NaN is a f64), we might be able to get rid of the special GeoProcessor::empty_point ?
A coordinate could actually be an untagged point...
Currently:
POINT EMPTY
would be written in WKT asPOINT(NaN, NaN)
MULTIPOINT(1 2,EMPTY,3 4)
would be written in WKT asMULTIPOINT(1 2,Nan Nan,3 4)
This PR fixes both issues by calling
processor.empty_point
in the WKB reader if the parsed WKB coordinates areNaN
, and by writingEMPTY
instead of{x} {y} ...
in the WKT writer if the coordinates given areNaN
.Notes, cause this seems redundant:
NaN
coordinates. Assuming thatNaN
coordinates are already supported by all readers (NaN
is af64
), we might be able to get rid of the specialGeoProcessor::empty_point
?