Hi there, I have a problem to understand how the API works. These two lines work well:
But when I try to combine them it doesn't:
Any hints for me? Tnx... PS: Seems it worked once: https://wiki.openstreetmap.org/wiki/User:Sparcuser asked 26 Apr '17, 13:51 MeriMapper |
Rather than "node[waterway|historic=wreck]" you need to do something like "(node["waterway"="wreck"];node["historic"="wreck"];);" Also note that the wizard of https://overpass-turbo.eu/ can be very helpful for figuring out what works answered 26 Apr '17, 14:29 Hjart Thanks for your answer! I tried wget -c http://api.openstreetmap.fr/xapi?"(node["waterway"="wreck"];node["historic"="wreck"];);[bbox=-27,29,44,72]" -O EU_Wrecks.osm and got ERROR 400: Bad Request. When I send only the http part in my broser I get: Error in ["(node["waterway"="wreck"];node["historic"="wreck"];)]: Error: Query must start with 'node', 'way', 'relation', or '*' Tested with dozends of variants with or without brackets, quotes, ... :-P
(26 Apr '17, 17:15)
MeriMapper
In the Overpass Turbo wizard mentioned above I wrote "type:node & (waterway=wreck | historic=wreck)", which it then translates to QL code. (when tested from inside JOSM the result is a bit different) What I'm not at all sure about here is how to transform the result into something that will fit into a commandline string like yours
(26 Apr '17, 19:11)
Hjart
|
The Overpass server implements an XAPI compatibility layer. I don't know it well, it may not support the combined query. You can use the Overpass QL to do the query though, I think Hjart has written their answer in the QL. Here's the query in Overpass Turbo: http://overpass-turbo.eu/s/oDz (Click "Run" to see the output) Under "Export" there is a link "raw data directly from Overpass API" that is suitable for use with wget. The query language is documented here: http://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL answered 26 Apr '17, 17:50 maxerickson |