Nearby Places API edge case

Zero-dimensional and one-dimensional bounding boxes behave weirdly on the equator and the prime meridian.

Platform (Android, iOS, Website): API v1

URLs (aka web addresses) of any relevant observations or pages: https://api.inaturalist.org/v1/places/nearby?nelat=52&nelng=0&swlat=52&swlng=0

Screenshots of what you are seeing:

Description of problem (please provide a set of steps we can use to replicate the issue, and make as many as you need.):

Step 1: Get standard places in a point bounding box (e.g. same NE coords as SW coords) for 52 N 1 E (https://api.inaturalist.org/v1/places/nearby?nelat=52&nelng=1&swlat=52&swlng=1) and see Europe, UK, England, and Suffolk.

Step 2: Get standard places in a similar point bounding box instead at 52 N 0 E (https://api.inaturalist.org/v1/places/nearby?nelat=52&nelng=0&swlat=52&swlng=0) and see that it returns all places that cross the 52 N latitude line.

(Step 3: Similarly, it seems like 0 N 0 E returns all places.)

you could just pad your coordinates slightly: https://api.inaturalist.org/v1/places/nearby?nelat=52.0000000001&nelng=0.00000001&swlat=52&swlng=0

1 Like