Skip to content

small error in tms bounds calculation #175

@dcherian

Description

@dcherian

The right for bounds should be exactly 180; and IIUC left and right for xy_bounds should have the same absolute value and opposite sign.

import morecantile

tms = morecantile.tms.get("WebMercatorQuad")
tile = morecantile.Tile(x=0,y=0,z=0)
print(tms.bounds(tile))
# BoundingBox(left=-180.0, bottom=-85.0511287798066, right=180.00000000000009, top=85.0511287798066)
print(tms.xy_bounds(tile))
# BoundingBox(left=-20037508.342789244, bottom=-20037508.34278925, right=20037508.34278925, top=20037508.342789244)

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