Skip to content

Incorrect handling of the antimeridian #41

@SmylerMC

Description

@SmylerMC

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

  1. Make a TerrainPreview centered at -16.79326,-179.99903 (a small town that's crossed by the 180th meridian, view on osm )
  2. Run TerrainPreview
  3. 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 0bf7149 (latest one on master as of writing this)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions