OvertureMaps / OvertureMaps/data
division_area bbox values are incorrect for regions crossing the antimeridian
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 47
- Avg merge
- 3h 42m
- Merged PRs (30d)
- 1
Description
Alaska is a perfect example of this. It looks like bbox is being calculated using a simple ST_Envelope(geometry) call, shown in the following query direct from the most recent overture release:
Here is this bbox shown on a map:
The core issue here is in the xmin and xmax which are miscalculated due to Alaska's area geometry spanning across the antimeridian.
We can fix this using PostGIS' ST_WrapX or ST_TransformLongitude to handle the "wraparound" problem by reprojecting the coordinates before calculating the envelope. Here is my suggested fix in action:
And this correct bbox for Alaska rendered on a map:
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.
Assessment
This issue has not been assessed yet.