The goal is to find all waterways in Open Street Maps globally.

This is the equivalent for a random area in China in overpass turbo. Instead of doing it for this bounded area, I want to query globally.

Overpass turbo gets overloaded by a global query but I found osmosis in a related related2 question which seem to be able to get the job done.

wget -O- https://planet.openstreetmap.org/planet/planet-latest.osm.bz2 | bzcat | osmosis --rx - <filter args here> --wx my-compressed-output.osm.gz

I struggle however in translating the overpass query to the osmosis query and got lost in osmosis documentation.

How would I filter the waterways in osmosis? I think I need --way-key (--wk) or --way-key-value (--wkv) but like to check before executing a massive query.(50GB download)

Alternative solutions (non osmosis) are welcome too.

enter image description here

  • 3
    I would start with a small country extract from download.geofabrik.de before applying any filter logic to a planet size file. In addition, osmium-tool along with PBF file format are more efficient for the task at hand. – mmd Feb 3 '18 at 17:20
  • 1
    ... or try wiki.openstreetmap.org/wiki/Osmfilter as alternative to osmosis. – stephan75 Feb 14 '18 at 20:13
  • any thoughts on the differences between osmosis and Osmfilter? – RutgerH Feb 15 '18 at 10:40
  • "but like to check before executing a massive query.(50GB download)" I would test it on a smaller download – reducing activity Jul 18 '18 at 9:12

You might wan to try

--tf accept-relations waterway=* --used-way --used-node 

or alternatively accept-ways

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.