With images extraction closeto and radius works.
If I just use map-features and layers=lines I get data from all over the world.
If I try closeto, radius or values-object–road I get nothing even with a radius of 5000000
With images extraction closeto and radius works.
If I just use map-features and layers=lines I get data from all over the world.
If I try closeto, radius or values-object–road I get nothing even with a radius of 5000000
Here is my code:
import json, requests
output = {“type”:“FeatureCollection”,“features”:}
<<< url=('http:// replaced with >>>
url=(‘http://a.mapillary.com/v3/map_features?layers=lines&client_id=<myclient_id>&closeto=-77.22430886992082,39.162861790357354&values=object–Sidewalk&radius=50000’)
r = requests.get(url)
data = r.json()
print data
data_length = len(data[‘features’])
for f in data[‘features’]:
output[‘features’].append(f)
while data_length == 1000:
link = r.links[‘next’][‘url’]
r = requests.get(link)
data = r.json()
for f in data[‘features’]:
output[‘features’].append(f)
print(len(output[‘features’]))
data_length = len(data[‘features’])
with open(‘data.geojson’, ‘w’) as outfile:
json.dump(output, outfile)