I am very new with OpenStreetMaps and my feeling is that the learning curve is much too steep.
What I need concretely, is as follows:
I am trying to extract lists of street names by names of populated places from OpenStreetMap / Overpass using e.g. the following Python code:
In this way I can get more or less everything I need, but the problem is how to avoid the ambiguity with the place names: there is a city in Germany called Fulda and a number or places in the US. The code above returns streets in all of them. Is there a possibility to modify the query so that it filters for just one certain country, e.g. Germany?
PS. I have already asked on Stackoverflow, but got no answer, so I hope here it would be a more appropriate place to ask. TIA,
Hi R0bst3r,
thanks a lot, but this entails my next beginner’s question: how should I get the Area ID if I know the name of the populated place and the country? E.g. “Fulda” and “Germany” (or as an ISO country code, “de” or “ger”)? I have played around trying to obtain something like a place id using queroes like
; in the response, you have both osm_id and place_id, but none of them relates to the city (and could thus be used as the area code suggested above) - is that correct?
Hello Mateusz,
and thanks. For instance, the city of Fulda in Germany (not the hamlets of the same name in the US). How can I obtain the wikidata tag? And how do I use it in an Overpass query? Fulda is just an example; I am interested in many places in Europe that have their namesakes in the US and elsewhere. TIA, Stan
@PHerison: What section exactly do you mean? If that ‘Area inside an Area’, replacing ‘London’ to ‘Bonn’ and ‘England’ to ‘Germany’ brings an empty response. Thanks a lot!