Incorrect results are returned in the web Explore page when you use a custom box where one of the sides runs along the prime meridian. When the western side of the box runs along the prime meridian, it seems like the Explore page issues an incorrect API request. When the eastern side of the box runs along the prime meridian, it seems like Explore page issues the correct request, but the API returns an incorrect result. These two different problematic behaviors can be seen in the two sets below.
Set 1
Explore 1 box western side runs along prime meridian:
Explore 2 box western side runs along antimeridian:
Set 2
Explore 1 box eastern side runs along prime meridian:
Explore 2 eastern side runs along antimeridian:
I’ve marked the problematic items with
above. Notice that Explore 1 in each set is supposed to return items within roughly a square box. But notice that some observations returned may actually fall outside – east or west – of the box. When you compare the counts in Explore 1 vs vs Explore 2, you’ll notice that the counts are the same, and Explore 2 box properly encompasses the observations returned by that page. In other words, Explore 1 is supposed to bring back observations that fall within a box with one side that runs along the prime meridian, but it actually brings back observations that fall within an expanded box with that side shifted to the antimeridian.
It seems that the underlying reason for problems in Explore 1 differs between Set 1 and Set 2. In Set 1, it seems like the page actually changes the underlying API request to use swlng=-180 instead of swlng=0. In Set 2, however, it looks like the underlying v2 query actually returns different results vs v1. The v2 request for nelng=0 seems to be returning results as if nelng=180.
Note that the problems occur not just for observations, but also for observers, species, and identifiers. I assume fixing the problem for observations will fix the everything else, but if not, then observers, species, identifiers, and everything else will need to be fixed, too.



