Detail
When inserting basic coordinates, some of them are failing with error code 160.
For example, this coordinate inserts successfully:
{"type":
"Point",
"coordinates": [39.77, -89.1]
}
aql> INSERT INTO test.demo (PK, gj) VALUES ('key1', GEOJSON('{"type": "Point", "coordinates": [39.77, -89.1]}'))
OK, 1 record affected.
This coordinate fails to insert with error code 160:
{"type":
"Point",
"coordinates": [39.77, -90.77]
}
aql> INSERT INTO test.demo (PK, gj) VALUES ('key1', GEOJSON('{"type": "Point", "coordinates": [39.77, -90.77]}'))
Error: (160) AEROSPIKE_ERR_SERVER
Answer
GeoJSON objects have bounds. Latitude values can only be between (-90, +90) and longitude can only be between (-180, +180). Aerospike checks GeoJSON in the format of (long, lat), so any latitude value outside the bounds of (-90, 90) will fail.