Open andrewtapay opened 6 years ago
I think there's a typo in the helper function CellId.uv_to_st in the case that CellId.PROJECTION == 1 (the tangent projection). To wit: this should be an increasing function that maps [-1, 1] to [0, 1], and in the default case it does. For example:
CellId.uv_to_st
CellId.PROJECTION == 1
[-1, 1]
[0, 1]
>>> import s2sphere >>> s2sphere.CellId.uv_to_st(-1) 0.0 >>> s2sphere.CellId.uv_to_st(1) 1.0 >>>
However, if we use the tangent projection, this isn't the case:
>>> s2sphere.CellId.PROJECTION = 1 >>> s2sphere.CellId.uv_to_st(-1) -0.39269908169872414 >>>
I think this PR resolves the issue. Indeed, this function now matches the analogous function in the original C++ library.
This change is
I think there's a typo in the helper function
CellId.uv_to_st
in the case thatCellId.PROJECTION == 1
(the tangent projection). To wit: this should be an increasing function that maps[-1, 1]
to[0, 1]
, and in the default case it does. For example:However, if we use the tangent projection, this isn't the case:
I think this PR resolves the issue. Indeed, this function now matches the analogous function in the original C++ library.
This change is