What is the structure behind the paths of GeoFabrik's osc.gz files?

I would like to see how much Mapillary imagery helps OpenStreetMap. My first attempt at this analysis is here, but it has the serious mistake of not accounting for changesets. I would like to correct that error and look into changesets. As an example, I looked at Lithuania’s GeoFabrik page.

The line I find most relevant:

  • .osc.gz files that contain all changes in this region, suitable e.g. for Osmosis updates

The .osc.gz link leads me to:

where state.txt is:

# original OSM minutely replication sequence number 5572108

and 000/ contains the empty directories of 001 and 002, and the non-empty 003:

If we download 563.osc.gz and descompress (curl http://download.geofabrik.de/europe/lithuania-updates/000/003/563.osc.gz -o 563.osc.gz, then gzip 563.osc.gz --decompress), we get 563.osc. First few lines:


Which seems nice. The .txt files are similar to the one quoted above. To proceed successfully, it seems I need to understand though how these osc.gz files are structured.

Based on what logic OpenStreetMap edits end up in 563.osc.gz, or another file, ie 564.osc.gz? I am interested in how this path structure is set up, and what changes go to each file.

8 posts - 3 participants

Read full topic

Ce sujet de discussion accompagne la publication sur https://community.openstreetmap.org/t/what-is-the-structure-behind-the-paths-of-geofabriks-osc-gz-files/99065