Skip to content

empty wkt multipolygon does not roundtrip #38

Description

@senritsu

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 of MULTIPOLYGON EMPTY, and is treated as invalid syntax when re-parsing it, resulting in a null parsing result

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions