CartoDB / quadbin-py

Other
1 stars 2 forks source link

fix: latitude clipping #17

Closed jgoizueta closed 8 months ago

jgoizueta commented 8 months ago

Since the latitude to tile y formula is unstable near the limit latitude (85.05112877980659), the latitude was being clipped with a slightler smaller value than the limit (85.051129), but this didn't prevent that latitudes near it were assigned to incorrect tile y values.

To fix this, the clipping now occurs after computing the y. A clipping of the input latitude to -89, 89 is maintained to avoid the formula failing with a division by zero near or at latitude 90.

shortcut-integration[bot] commented 8 months ago

This pull request has been linked to Shortcut Story #373977: Improve precision of long lat conversion near the latitude limits.