[OSM-dev] OSM IDs order in osm.pbf files

Fran├žois Battail francois.battail at sipibox.fr
Tue Apr 21 08:55:32 UTC 2015


Dear List,

I'm developing an application like osm2pgsql but with a very different 
schema, I would like to know if I can assume the following things when 
parsing an osm.pbf file :

1. Records will always be in this order, that is:
   - header,
   - nodes,
   - dense nodes,
   - ways,
   - relations.

2. OSM IDs are always in increasing order when parsing osm.pbf records 
forward.

3. A relation with ID x referencing another relation with ID y is such 
that x > y.

Are these points safe to assume ?

Thanks a lot, best regards.



More information about the dev mailing list