1

I don't find a way to download specific data for Europe (E roads, i.e. roads from motorways/primary/trunk having the key "int_ref" not empty).

I tried several ways (using QGIS x64 on Windows 10), with the plugin QuickOSM:

  • with the script:

    [out:json]; {{geocodeArea:Italy}}->.searchArea; ( way['highway'='trunk'] ['int_ref'~'.'] (area.searchArea); way['highway'='motorway'] ['int_ref'~'.'] (area.searchArea); way['highway'='primary'] ['int_ref'~'.'] (area.searchArea); ); out body;>; out skel qt;

I can't do it for all the European countries (and moreover, often it blocks, saying "bad request", so I have to split into 3 scripts, one for each highway value).

  • opening the .osm.pbf file downloaded from Geofabrik, it work for a small file (tried with Luxembourg), but it take a lot of time (5 minutes), so I guess that for a 30 GB file, there is little hope...

Any hints on how to proceed?

  • Instead of using {{geocodeArea:Italy}} you could also try bounding boxes instead, which is way faster. Best option is to use a Europe extract, though. – mmd Dec 20 '18 at 20:15
  • You may order the OSM data in GIS format at data.nextgis.com. You can choose the whole country or manually add your AOI. – Dmitry Baryshnikov Dec 20 '18 at 20:17
4

The QuickOSM plugin queries the Overpass API, and that will definitely block any attempt to get large-scale data download. Otherwise the service would be permanently overloaded and hence unusuable.

The only way you can go is to download the Geofabrik extract, and filter that on the command line. Feeding the data to QGIS will kill it due to the large amount of data to be kept in memory.

Osmfilter and osmosis are the right tools for your task. The result will open in QGIS.

  • Thank you, I tried with osmconvert to get a o5m file then use the latter with osmfilter: osmfilter fr.o5m --keep= --keep-ways="( highway=motorway =primary =trunk ) and int_ref=*E*" --keep-tags="all highway int_ref" -o=fr.osm – user93619 Dec 21 '18 at 10:39
  • It works fine, however I didn't manage to get the "int_ref" values in a new field, it stays in the "other_tags" field, displayed like " "int_ref"=>"E 70;E 712" ". No way to have only value "E 70;E 712" in a new field, using osmfilter? I can use QGIS but in terms of performances I guess osmfilter is better... – user93619 Dec 21 '18 at 10:52
  • OSMfilter does not change the tags. If you load the osmfilter output directly into QGIS, you need to change the osmconf.ini file to specify the attribute table columns you want. Or import it with QuickOSM, which lets you have choose between osmconf.ini or all fields. – AndreJ Dec 21 '18 at 13:14
  • 1
    These days, I would recommend to use osmium-tool which is faster than the other tools mentioned, and doesn't require a conversion step to o5m format (github.com/osmcode/osmium-tool/blob/master/man/…). Also, osmosis isn't maintained at all anymore. – mmd Dec 22 '18 at 8:42
  • @mmd but you have to compile it yourself. And the prerequisite Visual Studio 2015 seems to be discontinued as well :-( – AndreJ Dec 22 '18 at 11:10

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.