mapbox / mapbox/mercantile

LngLatBbox with lng outside -180/180

Open
#146 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
453
Forks
70
PR merge metrics
No merged PRs in 30d

Description

Longitudes outside the -180/180 range don't seem to be handled:
```py
import mercantile

bbox = mercantile.LngLatBbox(180, 0, 180+360, 1)
list(mercantile.tiles(*bbox, 10)
# [Tile(x=1023, y=509, z=10), Tile(x=1023, y=510, z=10), Tile(x=1023, y=511, z=10)]
```
Should they be translated back to -180/180 ?

Contributor guide

Open the contributing guide

Research direction

Reproduce the example with mercantile.LngLatBbox and mercantile.tiles, then trace how the bounding-box coordinates are consumed. Determine the expected behavior for longitudes outside -180/180 and add coverage showing that behavior before verifying the existing tile results remain correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.