-
Type:
Bug
-
Resolution: Done
-
Priority:
Major - P3
-
None
-
Affects Version/s: 3.0.4
-
Component/s: Geo
-
Query
-
ALL
-
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Some very specific $near queries with small (but not negligible) $maxDistance values will unexpectedly return empty results. So far this can only be reproduced in the shell by manually setting the coarsestIndexedLevel and finestIndexedLevel.
Ultimately, this is caused by S2 returning empty coverings for S2Cap regions. The root of this problem seems to be caused by floating point error in the S2Cap::Contains method.
For a full S2Cap (entire sphere) S2Cap::Contains will return false on some points along/near the negative axis. The expected behavior is to return true for any point or geometry, since it is the full sphere.