Redis rejects extreme coordinates for south pole location.
Steps to Reproduce
redis-server -v
Redis server v=4.0.8
redis-cli
127.0.0.1:6379> GEOADD antarctica 139.2669926 -89.98289386 amundsenscott_south_pole_station
Actual:
(error) ERR invalid longitude,latitude pair 139.266993,-89.982894
Expected:
(integer) 1
What are you tracking? 馃惂? ;)
Tux has escaped into the real world and joined his kind, gotta find him.
While I can find correlate this coord IRL, this snippet from src/geohash.h holds the answer:
/* Limits from EPSG:900913 / EPSG:3785 / OSGEO:41001 */
#define GEO_LAT_MIN -85.05112878
#define GEO_LAT_MAX 85.05112878
#define GEO_LONG_MIN -180
#define GEO_LONG_MAX 180
After going down the rabbit hole, you should arrive at https://epsg.io/3857.
Also, AFAIR, not handling the poles well is mentioned somewhere in the docs:
The command takes arguments in the standard format x,y so the longitude must be specified before the latitude. There are limits to the coordinates that can be indexed: areas very near to the poles are not indexable. The exact limits, as specified by EPSG:900913 / EPSG:3785 / OSGEO:41001 are the following:
- Valid longitudes are from -180 to 180 degrees.
- Valid latitudes are from -85.05112878 to 85.05112878 degrees.
Most helpful comment
What are you tracking? 馃惂? ;)