resolve issues in build and with code, now returning geometries and data as expected from obs_getoverpass

This commit is contained in:
John Krauss
2017-01-03 16:37:16 +00:00
parent ff50c5e2bf
commit 000a440417
5 changed files with 69 additions and 7 deletions

View File

@@ -1,4 +1,9 @@
include ../../Makefile.global
# Install the package locally for development
install:
pip install --upgrade ./crankshaft
pip install --upgrade ./observatory
test:
#TODO noop

View File

@@ -18,7 +18,20 @@ way
40.704301, -73.936658))
'''
api = API()
response = api.Get(query, responseformat='json')
'''
(node [amenity] (around:400, 40.704301, -73.936658); way [amenity] (around:400, 40.704301, -73.936658))
'''
return [(el['lat'], el['lon'], el['type'], el['id'], json.dumps(el['tags']), ) for el in response['elements'] if 'lat' in el]
api = API()
response = api.Get(query)
return response['features']
#return [(el['lat'], el['lon'], el['type'], el['id'], json.dumps(el['tags']) )
# for el in response['elements'] if 'lat' in el][0]
def get_overpass_poi(within_geom, geom, filters=None, name=None):
'''
Simplified access to overpass API
'''
pass