What is PBF? #
PBF means βProtocolbuffer Binary Formatβ.
PBF is
- intended as an alternative to the XLM format.
- about half of the size of a gzipped planet.
- about 30% smaller than a bzipped planet.
- about 5x faster to write than a gzipped planet.
- about 6x faster to write than a bzipped planet.
- designed to support future extensibility and flexibility.
What is gzipped/bzipped planet?
Files have the extension *.osm.pbf
.
The reference implementation of PBF is the Osmosis implementation, split into two parts, (1)the Osmosis-specific part contained in the Osmosis repository at and (2)an application-generic part at.
- This application-generic part is used to (1)build the
osmpbf.jar
as used in Osmosis and other Java-based PBF readers and also (2)contains the master definition of the PBF protocol buffer definitions(*.proto
files).
The underlying file format is chosen to support random access at the βfileblockβ granularity. Each βfileblockβ is independently decodable and contains a series of encoded βPrimitiveGroupsβ with each PrimitiveGroup containing ~8k OSM entities in the default configuration.
It means that OSM entities are encoded into fileblocks.