Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

Bug in lonlat2quadint when entering MAX_LATITUDE for lat args #11

@umanium

Description

@umanium

Hello,
So I tried to rewrite function lonlat2quadint using Scala and Python. While I'm doing some tests, I got a weird results for edge cases. It looks like the result is wrong when entering MAX_LATITUDE for lat, because if I enter the lat until last decimals, it is very different when I remove last decimal, and result for MIN_LATITUDE is same as MAX_LATITUDE. I don't think this is an expected condition.

>>> import quadkey
>>> print(quadkey.lonlat2quadint(180.0, 85.05112877980659))
4611686018427387903
>>> print(quadkey.lonlat2quadint(180.0, -85.05112877980659))
4611686018427387903
>>> print(quadkey.lonlat2quadint(180.0, 85.0511287798065))
1537228672809129301
>>> print(quadkey.lonlat2quadint(180.0, 85.051128779806))
1537228672809129301

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions