-
Notifications
You must be signed in to change notification settings - Fork 216
Closed
Milestone
Description
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
GeomTypePOINTand >1MoveTocommands in the geometry field. - A MultiLineString geometry is encoded using
GeomTypeLINESTRINGand >1MoveTo,LineTo*sequences in the geometry field. - A MultiPolygon geometry is encoded using
GeomTypePOLYGONand >1MoveTo,LineTo*,ClosePathsequences 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
Labels
No labels