empty wkt multipolygon does not roundtrip
Opened this issue · 0 comments
senritsu commented
If you start with
const wkt = 'MULTIPOLYGON EMPTY'
and then try to roundtrip it using
const newWkt = stringify(parse(wkt))
you end up with MULTIPOLYGON ()
. which in turn parses to null
(which cannot be stringified anymore).
So in summary:
MULTIPOLYGON EMPTY
parses just fine, to a geometry with empty coordinates array- a multipolygon geometry with empty coordinates array stringifies to
MULTIPOLYGON ()
instead ofMULTIPOLYGON EMPTY
, and is treated as invalid syntax when re-parsing it, resulting in anull
parsing result