Articles in this section

FAQ Why am I getting error code 160 on my geoJSON

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.


Applies To Earliest Version

Pre 4.9

Applies To Latest Version

Current Version
Was this article helpful?
0 out of 0 found this helpful