Skip to content

Fix invalid multipoint geometry encoding #30

@anandthakker

Description

@anandthakker

Multipoint geometries are currently encoded as multiple 1-length MoveTo commands. The vector-tile-js library decodes this fine, but it's incorrect according to the spec:

4.3.4.2. Point Geometry Type
The POINT geometry type encodes a point or multipoint geometry. The geometry command sequence for a point geometry MUST consist of a single MoveTo command with a command count greater than 0.

If the MoveTo command for a POINT geometry has a command count of 1, then the geometry MUST be interpreted as a single point; otherwise the geometry MUST be interpreted as a multipoint geometry, wherein each pair of ParameterIntegers encodes a single point.

https://github.com/mapbox/vector-tile-spec/blob/master/2.1/README.md#4342-point-geometry-type

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions