4

I am trying to obtain few old osm dataset of few specific countries/regions to see subsequent changes till now. I am using planet osm files which I think is the only source of old osm archieves. But after extraction planet osm file it's taking aroung 350GB enormous space. Although there is Osmfilter to extract specific tags, but I want to extract specific countries and regions instead. I have already tried QGIS, Linus-Terminal and PostgreSQL in order to do something further but this huge file is rather killing them. Any help regarding how to proceed?

2

2 Answers 2

5

I would like to explain the steps followed by me.

  1. Download any archieved planet osm file from Planet.OpenStreetMap.org
  2. Make the .poly file covering the area you want to clip from planet.osm file. Follow tips regarding how to make .poly file from here. I personally have used this QGIS tutorial. Note: QGIS installed osmpoly_export plugin is located under Vector tab, rather than Plugins.
  3. Install osmosis, if not already. Use sudo apt-get install osmosis on ubuntu.
  4. Clip desired area based upon .poly file from planet.osm file. Use this code osmosis --read-xml file="planet-latest.osm" --bounding-polygon file="country.poly" --write-xml file="australia.osm". Details here.
  5. If want to extract specific tags, labels etc. then use osmfilter. Install it from Ubuntu Software Center.
  6. Extract desired tags etc. as explained here. One sample code on ubuntu $ osmfilter streets_old.osm --keep="highway=primary" > streets_new.osm
1
  • 1
    I want to add to Point 2 of your answer that, one has to make sure the that the polygon from which we are creating .poly (e.g. administrative boundary) must be in WGS84 before using ''Export OSM Poly'' feature of QGIS.
    – osmjit
    Jul 23, 2016 at 13:49
4

There are various services offering country and area extracts. You can try to get into contact with one of the responsible people and ask how they are doing it. There is also a similar question at help.openstreetmap.org.

Geofabrik offers some background information with technical details and also provides .poly files which you can use for osmosis/osmconvert.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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