mapbox / mapbox/polyline

precision parsing bug, i think?

Open
#76 0 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
674
Forks
101
PR merge metrics
No merged PRs in 30d

Description

using `polyline.toGeoJSON`, if i pass precision of `5` or omit precision the parsing works fine. but if i try to use precision of `4` it is messing up decimals places of the lat/lon pairs.

example, default precision or precision 5:
response: `[-72.99583, 41.92463]`

if i specify precision `4`
response: `[-729.9583, 419.2463]`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue through polyline.toGeoJSON using precision 4, then compare its coordinate output with omitted precision and precision 5. Trace the precision handling and define done as precision 4 producing correctly scaled latitude and longitude pairs, with a regression check for the reported example.

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
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.