Hello, I would like to extract all the waterways in a large extent including Europe using Openstreetmap API capabilities. Eventually I would like to include this in a python script. However running it directly through overpass API or one of the openstreetmap-provided mirrors would be the first step in this process.

I tried running the following through Overpass

way(35.359872101102724, -29.628211426818392, 70.90180289857001, 47.014599265244506)["waterway" = "river"];

But got an error:

runtime error: Query ran out of memory in "query" at line 1. It would need at least 531 MB of RAM to continue.

I then tried prepending the above with [maxsize:1073741824]; and then running, but I still got the same memory error.

How can I extract this data and avoid the memory errors? Thanks

asked 25 Oct '18, 13:14

awa5114's gravatar image

accept rate: 0%

This clearly outside of the scope of any of the public Overpass API servers. You should simply download an OSM data extract for Europe and extract whatever you want from that, for example with osmfilter https://wiki.openstreetmap.org/wiki/Osmfilter or one of the other tools available.

permanent link

answered 25 Oct '18, 20:39

SimonPoole's gravatar image

SimonPoole ♦
accept rate: 19%

Indeed that is what I have tried to do. I currently have downloaded several files from the GeoFabrik website: euriope-latest.osm, europe-latest.osm.pbf and albania-latest.osm. I also have all the command line tools osmconvert, osmfilter and osmosis. I have tried various queries on all of them but it takes a very long time, and there is no way of judging how long it will take. Do these query tools provide any possibilities in terms of extracting large datasets aside from just getting it all at once?

(26 Oct '18, 10:19) awa5114

You might also need to include more tag options. I found that to get all the navigable waterways in the UK, I also needed

  • water=river with boat=yes
  • waterway=canal with boat=yes
  • waterway=river with boat=yes

I did it with overpass, in about 8 manual slices- probably not an option for all of Europe.

permanent link
This answer is marked "community wiki".

answered 06 Nov '18, 21:56

spiregrain's gravatar image

accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 25 Oct '18, 13:14

question was seen: 297 times

last updated: 06 Nov '18, 21:56

powered by OSQA