I am coding in Python, using the package osmnx, and in particular the function geocode_to_gdf from osmnx to get the geometry of some cities in Switzerland. If I send the request "Fribourg, Switzerland", I get the canton as first answer. If I send the request "Aarau, Switzerland", the risk is to get the "Bezirk"/district. To avoid these problems, I send the request as a dictionary: "{'city': 'Aarau, Schweiz'}" or "{'city': 'Fribourg'}". Seems safer and is recommended by the author of the osmnx package on Stackoverflow. I have two questions:
I'm not sure if it is more a question about the data structure in OSM, or a question regarding the package osmnx. asked 24 Jan '23, 09:55 antonind |
Sth. like
is semantically wrong, you should use:
If you only need results from Switzerland, I would also recommend to include If you still get different results for the same request, please trace you requests and check the Nominatim instance that is responding to your requests (e.g. IP address of the responder). Do they differ? answered 24 Jan '23, 11:39 Spiekerooger |