This application came about as I have a directory full of OpenStreetMap data files and I needed to determine the bounding box for each file. The bounding box defines the geographic area that the map covers. Each of the files I needed to work with is in the PBF Format.
The format is a binary format which makes the files smaller and faster to process, but also harder to process. Fortunately the format is built and designed around the Google Protocol Buffer library. There is an osmpbf library which makes it easier to work with the format as well.
Unfortunately the downside to the format is that there isn’t a great deal of information, at least that I could find, on how to work with the format or even how to work with the osmpbf library.
Fortunately I was able to get some hints from a few other open source applications including the mkgmap Tile Splitter.
Now that I can tell the bounding boxes for all of the files I can work out which ones we need to split into smaller files for ease of processing.