mapbox / mapbox/tippecanoe

Coordinate rounding is different from Mapnik

Open
#153 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
3.1k
Forks
430
PR merge metrics
No merged PRs in 30d

Description

WGS84 coordinates are usually not exact multiples of tile coordinates. When they are not, Tippecanoe rounds toward the top left, by doing the projection math as precisely as possible and then masking off low-order bits. It looks like Mapnik rounds toward the equator and prime meridian instead.

The symptom is that (at z0) in Tippecanoe [ -1, -1 ] will appear as [ -1.054688, -0.966751 ], but [ 1, 1 ] will appear as [ 0.966797, 1.054628 ]. In Mapnik, they are [ -0.966797, -0.966751 ] and [ 0.966797, 0.966751 ].

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

No file, test, or entry point is named. Locate the coordinate projection and tile-coordinate rounding path, then compare its behavior with the z0 examples in the issue and Mapnik's results. Done means the rounding behavior matches the stated Mapnik outputs without regressing other coordinate conversions.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.