[OSM-dev] PBF version 1.1, a PBF conformance file, and changes to Osmosis's PBF support

Scott Crosby scott at sacrosby.com
Mon Jan 3 04:08:50 GMT 2011


I am releasing version 1.1 and have just pushed several changes to
osmosis trunk. These changes don't effect the format, but may require
minor changes to software that uses the *.proto definitions.

   Although it has been in trunk for a while, this is the first
release where the generated C/C++ protobuf code is in package OSMPBF.

   I am renaming from 'osmbin.jar' to 'osmpbf.jar'.

   I am licensing the osmpbf source code under the LGPL.

   As previously discussed, I am removing bzip2 compression and
marking lzma compression as a proposed extension, this may require
minor changes to existing software.

   I am renaming the protocol buffer fileformat.BlockHeader to
fileformat.BlobHeader (It has a name confusingly similar to
osmformat.HeaderBlock.). Software will have to be patched to compile
against the new name for this object.

   I have a conformance file. This file exercises all of the features
required to decode the geographic data in PBF files, including offset
and granularity. Note that this test is not exhaustive, in particular,
it does not currently test the metadata storage (timestamps, version
numbers, changeset numbers, etc.) of the PBF format. It is located at
the main PBF repository (https://github.com/scrosby/OSM-binary). As it
is still a work in progress, invoke crosby.binary.test.BuildTestFile
to generate the PBF testfiles. The reference XML output can be
generated with osmosis "" osmosis --read-pbf TestFile1-deflate.osm.pbf
--write-xml file=- "". To generate the corresponding XML output, you
want to use the trunk version of osmosis, which now has deterministic
results when metadata is omitted.

For the osmosis parser, I am replacing the default date when there is
no timestamp metadata in the file. Instead of using the current date,
I am using Date(-1). This makes decoding files from pbf to osm
deterministic, making it easier to do conformance tests. These changes
are now in osmosis trunk. I have also explicitly placed the osmosis
pbf code under the Apache 2.0 license (because it contains a
disclaimer of liability.)

I have tested this code against the old code on the rhode_island.osm
extract and only encountered the expected differences in datestamps.
If there are any problems, please send me an email.

Happy new year to everyone!
Scott



More information about the dev mailing list