benbovy / spherely

Manipulation and analysis of geometric objects on the sphere.
https://spherely.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
119 stars 8 forks source link

Add Geography `__eq__` object equality? #48

Closed jorisvandenbossche closed 2 weeks ago

jorisvandenbossche commented 1 month ago

Currently two different but equal objects are not "equal":

In [14]: import spherely

In [15]: p1 = spherely.Point(2, 2)

In [16]: p2 = spherely.Point(2, 2)

In [17]: p1 == p2
Out[17]: False
JoelJaeschke commented 3 weeks ago

If this is still a relevant issue, I would like to give this a shot!

jorisvandenbossche commented 3 weeks ago

This is certainly still relevant!

I assume that we would want to do the same as the equals predicate (i.e. using s2geography::s2_intersects)