I am looking for a way to get the road type (e.g. highway or urban street) and the maximum allowed speed for OSM way IDs. I am dealing with a large set of data (~100,000 way IDs) in .csv format. I am trying to implement the data transfer via CURL command and get the result if possible in JSON format. I am completely new to the matter and would be really grateful for any help. I have already figured out that there are the OSM keys "highway=" and "maxspeed=" which might provide my required information. But I don't know how to use them via CURL or any other automatically working data transfer. Many Thanks! John asked 05 Dec '16, 19:50 john123 |
If you have an .osm/.o5m file in hand: Use osmfilter I am not sure what you are using, but create a nested for loop. The first loop searches by "maxspeed=x", with x as the speed, while the second loop searches by a loop with a switch-case function which includes all tag values of a highway. answered 08 Dec '16, 10:41 Wetitpig0 |
I don't know where you got the OSM way ID's from, but be aware that the ways can be deleted in the meantime. So not all IDs will return an answer The following Overpass query gets the data for way 24777894 You could write a loop that makes http calls via curl for each of the IDs you have. http://overpass.osm.rambler.ru/cgi/interpreter?data=%5Bout:json%5D;way(24777894);out; answered 08 Dec '16, 16:40 escada |
How do you get the csv file? Converted from where?