Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix invalid multipoint geometry encoding #30

Open
anandthakker opened this issue May 14, 2018 · 0 comments
Open

Fix invalid multipoint geometry encoding #30

anandthakker opened this issue May 14, 2018 · 0 comments

Comments

@anandthakker
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant