Hello to the community! as a complete newbie in OSM and its API I first tried to read all the docs and helps and this forum, of course. But I have a problem to build a query and I do not know how to solve it without help.. My goal is having a CSV of:
Example CSV header:
My sadly tries:
My sources I tried:
Obviously I have:
If you can help please do so :) Thanks in advance sediosm . . UPDATE: as mentioned I have opened a thread in the german forum here: forum thread . . |
The question has been closed for the following reason "Follow-up on German Forum." by mmd 08 Nov '15, 17:37
I'm afraid, what you're trying to do is not possible with Overpass API. You cannot combine several OSM objects into one CSV line. The only option I see at the moment is to split the response up into multiple lines, like in the following example for pharmacies per country. You probably came across this one, as you mentioned Overpass API by example in your original question. In addition, try to limit the scope of your query to smaller regions and split it up into several requests. Otherwise this will take way too much time. answered 31 Oct '15, 12:30 mmd First of all many thanks for the ultra quick response! :) Hm ok.. that explains why I never got good results. Could you provide a query which gets all cities in Germany with their boundaries as csv? And a second one which gets all cities with their relation to its county (without any boundaries, just their names) as second csv? Would that be possible? If that would work it would be ok for me because i can do a correlation between those both csv locally.. Well and have you taken a look at my overpass_turbo query? Thats multilined but I still not able to get it working...
(31 Oct '15, 16:11)
sediosm
2
In case that you are from Germayn or you can speak at least German, I recommend to ask all your questions in the German sub forum at http://forum.openstreetmap.org/ ... log in there with your existing OSM account. There are specialists about boundaries and data extractions ... there we can develop a solution for you.
(31 Oct '15, 21:16)
stephan75
@stephan75: yes that's something I would also recommend. I believe there are still some topics open here and the forum format is much more suitable to discuss different details or find alternative approaches. We have some users with a dedicate osm2pgsql database and they may also be able to support.
(01 Nov '15, 16:05)
mmd
That sounds great thanks I will do that :) !
(01 Nov '15, 18:27)
sediosm
@sediosm: please mention a link to the follow-up thread here
(01 Nov '15, 19:44)
aseerel4c26 ♦
|
Depending on what you want to achieve, a more user friendly way may be to use Wambacher's boundaries service. There you can select level 6 relations by level 4 area. You can then export to any number of formats. You could link level 6 to level 4 by hand, or you could use a free sowftware like QGIS to do a spacial join (calculate centroid of level 6 within their area, than spatial join of these points with the level 4) You need to log in to the servicce with your OSM user to be able to download data. answered 01 Nov '15, 12:58 joost schouppe SomeoneElse ♦ thanks for your thoughts I didn't mentioned the Wambachers service but I also tried it -> but I need a CSV at the end and regarding QGIS: I do not want to install a special software to doing those joins etc.. nevertheless thanks again for your reply
(01 Nov '15, 18:26)
sediosm
|