mercantile icon indicating copy to clipboard operation
mercantile copied to clipboard

Raise when nan bounds are passed to tiles

Open samn opened this issue 2 years ago • 0 comments

Otherwise the coordinate could get unintentionally clamped to the globe's extremeties: https://github.com/mapbox/mercantile/blob/fe3762d14001ca400caf7462f59433b906fc25bd/mercantile/init.py#L533-L536

>>> from math import nan
>>> max(nan, -180)
nan
>>> min(nan, 180)
nan
>>> max(-180, nan)
-180
>>> min(180, nan)
180

samn avatar May 30 '23 18:05 samn