terraplusplus
terraplusplus copied to clipboard
Incorrect handling of the antimeridian
Bug Description
Terra++ is not able to handle generating areas that cross the 180th meridian. The is mainly due to CornerBoundingBox2d not supporting bounding boxes that cross over the meridian. It always considers the "starting" longitude to be the lowest number and the "end" longitude to be the highest. This causes bounding boxes that should be [175, -175] to be [-175, 175], which results in Terra++ trying to download OSM tiles across the entire world.
To Reproduce
- Make a
TerrainPreviewcentered at -16.79326,-179.99903 (a small town that's crossed by the 180th meridian, view on osm ) - Run
TerrainPreview - Force the the program to quit or wait until it has download gigabytes of data it doesn't need, and hasn't downloaded what it actually needs.
Expected behavior There should be a way to handle those areas, maybe by splitting the bounding box in two.
Version:
- Commit 0bf714959400e81663b0d9f2f8a14de4bec40fa2 (latest one on master as of writing this)