Skip to content

specify how multi geometries are encoded (or move to explicit enumeration values) #30

@jfirebaugh

Description

@jfirebaugh

The spec should say how MultiPoint, MultiLineString, and MultiPolygon geometries are to be encoded. As I understand it, currently:

  • A MultiPoint geometry is encoded using GeomType POINT and >1 MoveTo commands in the geometry field.
  • A MultiLineString geometry is encoded using GeomType LINESTRING and >1 MoveTo, LineTo* sequences in the geometry field.
  • A MultiPolygon geometry is encoded using GeomType POLYGON and >1 MoveTo, LineTo*, ClosePath sequences in the geometry field.

These should be documented. But they have the following deficiencies:

  • It's not possible to encode a MultiPoint geometry with a single point in a way that is distinguishable from a Point geometry. Thus VTs cannot round-trip GeoJSON or other formats in which a singleton MultiPoint is valid. The same is true for singleton MultiLineString and MultiPolygon.
  • It's not possible to reconstruct MultiPolygons without complex heuristics for determining inner/outer rings. (Ref Polygon winding order & holes vs outer rings mapnik-vector-tile#59)

For these reasons, I would rather see the spec adopt explicit MultiPoint, MultiLineString, and MultiPolygon types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions