Closed seangrogan closed 5 years ago
Does the API return the data you expect? I think this may be more a generic Python issue than something specific to this project.
I would do something like
for feature in response.features:
if set(desired_keys) & set(feature.properties.keys()) and \
set(desired_subfeatures) & set(feature.properties.values()):
print(feature.properties)
Or perhaps I am misunderstanding your issue..?
Closing this but feel free to re-open if you feel your issue was not addressed
Hello all;
I think I have two problems here, the first is that when pulling the GeoJOSN file, i am not getting the data I expect. The second, when I try to change the format to 'xml' or 'csv', (to try to debug) i get an error (which seems similar to Issue 96. For the former, I feel like I'm missing something when it comes to interpreting the GEO JOSN file.
What I am specifically trying to do is pull all the roads (and points/ways that pertain to roads) in a search area. I'm leaning on overpass because my area pulls a few too many points for the standard API.
I first call the mapquery as
response = api.get(overpass.MapQuery(west=min_lon,
south=min_lat, east=max_lon, north=max_lat))and then I go through the response with
however, nothing is pulled containing the
desired_subfeatures
, and when ignoring theif i['properties'][j] in desired_subfeatures:
command, it appears only intersections and junctions are pulled. I don't think I can use wayQuery because it requires a specific name of a way to be pulled.If it helps, the coordinates I'm trying to pull are:
Just south of Oklahoma City, Oklahoma.