[geos-devel] [GEOS] #1005: Writing POINT EMPTY in WKB

GEOS geos-trac at osgeo.org
Thu Nov 28 18:08:36 PST 2019


#1005: Writing POINT EMPTY in WKB
------------------------+--------------------------
 Reporter:  Mike Taves  |      Owner:  geos-devel@…
     Type:  defect      |     Status:  new
 Priority:  major       |  Milestone:
Component:  Default     |    Version:  master
 Severity:  Annoyance   |   Keywords:
------------------------+--------------------------
 An empty point can be created in GEOS by reading the WKT `POINT EMPTY` or
 the WKB `0101000000000000000000F87F000000000000F87F` (i.e. "POINT(NaN
 NaN)").

 This point can be written back by GEOS as WKT to get `POINT EMPTY`,
 however it cannot be converted back to WKB, as
 [https://github.com/libgeos/geos/blob/030ee891c8bf571f37174b51084e76c01d738950/src/io/WKBWriter.cpp#L126-L127
 WKBWriter.cpp will throw]:
 > `util::IllegalArgumentException("Empty Points cannot be represented in
 WKB")`

 Given that GEOS is happy to read/write `POINT EMPTY` and read the WKB,
 shouldn't it be able to write the WKB geometry too?

 See PostGIS [https://trac.osgeo.org/postgis/ticket/3031 ticket #3031] for
 related discussion.

-- 
Ticket URL: <https://trac.osgeo.org/geos/ticket/1005>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).


More information about the geos-devel mailing list