NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi there, I would like some help in extracting the OSM road line data for the cities of Kigali (Rwanda), Dar es Salaam (Tanzania) and Mombasa (Kenya) for 2012,2017 and 2022. I have the latest 2022 data for each city from Geofabrik, and I know that the 2012 and 2017 data is available from https://planet.openstreetmap.org. However, I have been struggling to understand and correctly execute the necessary steps to download, decompress and extract the data from these very large planet osm files. I have a good knowledge of QGIS and working with .shp files. My knowledge of coding, various programming languages and various file types is very limited. I am using a Mac.

It would be amazing if you could help me to get the 2012 and 2017 road line maps for the cities of Kigali, Dar es Salaam and Mombasa so that I can use them in QGIS for my research purposes. Thank you!

I am currently not sure of the process required and how to go about it. Questions include:

  • Which exact file should I be downloading from https://planet.openstreetmap.org ?
  • How can I de-compress these large files? is the right thing to do? Is it possible to extract the 2012 and 2017 data for the 3 cities without de-compressing the file?
  • How do I extract the 2012 and 2017 data for these 3 cities? I have come across Osmosis, Osmium, JOSM and History Splitter in my search, but I am not sure which is most appropriate to my problem and how to use it (the technicality of the GitHub pages are tricky for me to decipher).

Thank you so much for taking the time to consider my problem - I welcome any help!

asked 15 May '22, 18:30

Cosh99's gravatar image

Cosh99
11113
accept rate: 0%


First, the usual caveat regarding historic data in OSM: You will be looking at "what OSM knew about the place at the time", not "what the place was like at the time". To give an extreme example, for 2008 there will probably be almost zero streets in your cities of interest. Does that mean that all streets that are there now have been built in the last 14 years? No, it just means that they had not been added to OSM at the time.

While the process of "downloading old planet file and extracting an area of interest from that" is possible (you would try to grab an .osm.pbf file and then use the "osmium" command line utility to extract an area of interest from the huge file), a better process might be to download the "history" file for the country in question (from osm-internal.download.geofabrik.de), then use the "osmosis" command line utility to extract from this file a country snapshot for any point in time (repeat the process for multiple times if desired), then again use osmium to extract the city of interest from the time snapshot.

And a second caveat about the 2012 data: In April 2012, OSM changed its data license from "CC-BY-SA" to "ODbL". At that time, all old data was purged from OSM unless the contributors had agreed to re-license their data. This purge affects even the history data. So if you want to go back further than April 2012 and see a complete picture (and not just the data from people who have said yes to the relicensing), you will need to use a different history file that is licensed under the CC-BY-SA license. That, however, is not available in a per-country version from Geofabrik, and also mixing CC-BY-SA licensed data with ODbL data in your project is a sure recipe for headache.

permanent link

answered 15 May '22, 18:44

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

edited 15 May '22, 18:45

Read all the caveats mentioned by Frederik. The easiest way to collect data of this type from September 2012 onwards is via Overpass queries using "Attic" data.

permanent link

answered 16 May '22, 10:28

SK53's gravatar image

SK53 ♦
28.1k48268433
accept rate: 22%

Follow this question

By Email:

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

By RSS:

Answers

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:

×252
×83
×38
×32
×25

question asked: 15 May '22, 18:30

question was seen: 1,175 times

last updated: 16 May '22, 10:28

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum