Cloudant Geo Inconsistencies
I am new to IBM Cloudant CouchDB and would like to be able to query records that I have uploaded and tagged with GPS coords.
I would like to be able to query all records that re within 100km of a provided location.
The cloudant website information is inconsistent around geo.
e.g
Page still says geo query is in beta (but support says it is not): tinyurl DOT com SLASH mkcyur2
Missing Tables in the sample (probably because my location (auto picked)and there is no data near me)? tinyurl DOT com SLASH lvxlb4q
API ref does not mention geo (released before geo was launched): https://cloudant.com/wp-content/uploads/Cloudant-API-Reference.pdf
Geo querying may only be for for dedicated customers? https://cloudant.com/blog/announcing-cloudant-geospatial/#.U6wiqRYRpNN
This is how I am inserting geo tagged records with gps and time with python.
import requests
import json
auth = ('username', 'password')
headers = {'Content-type': 'application/json'}
doc = r.json()
doc['event_title'] = "Blah"
doc['event_datetime_utc_epoch'] = 1403768195000
doc['event_lat'] = -31.089675
doc['event_lon'] = 150.932309
post_url = "https://account.cloudant.com/database".format(auth[0])
r = requests.post( post_url, auth=auth, headers=headers, data=json.dumps(doc) )
print json.dumps(r.json(), indent=1)
This is how i query 10 records in Python.
import requests
import json
auth = ('username', 'password')
get_url = "https://account.cloudant.com/database/_all_docs?limit=10".format(auth[0])
r = requests.get(get_url, auth=auth)
print json.dumps(r.json(), indent=1)
I would like to be able to query all records near me (100km radius) and after a certain time (within 30 mins of record saved date)?