Fix invalid multipoint geometry encoding
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 206
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the multipoint geometry encoder in the JavaScript library and compare its command sequence with the linked vector-tile specification. Verify that a multipoint is represented by one MoveTo command with a count greater than 1, then run the relevant existing tests or add coverage showing the encoded geometry follows the specification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100