reading and writing coordinates doesn't return same values
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 674
- Forks
- 101
- PR merge metrics
- No merged PRs in 30d
Description
```
$> echo '{"type":"LineString", "coordinates": [[10,52],[10.1,52.1]]}' | polyline --fromGeoJSON | polyline
[[-0.00002,52],[9.99998,52.1],[10.09998,52.09998]]
```
The rounding errors are probably by design but the coordinates are somehow corrupted.
```@mapbox/polyline@1.0.0```
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
Reproduce the reported command with @mapbox/polyline@1.0.0 and compare the decoded coordinates with the GeoJSON input. Start by tracing the CLI's GeoJSON conversion and the polyline encode/decode path; done means a GeoJSON LineString round trip preserves its coordinates within the intended precision rather than introducing the reported offset.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100