I create multiple synthetic OSM PBF files with pyosmium
and later on I want to merge them and use osmium
executable to set some custom headers on the PBF for archiving purposes.
However, calls such as
osmium cat --no-progress example1.pbf example2.pbf --output-header=sorting=blabla -O -o test_data.pbf
are not setting any headers which are viewable with osmium fileinfo
. According to libosmium
's documentation it should be possible to set arbitrary header key/value pairs. The only header I can permanently change is generator
, so this works:
osmium cat --no-progress example1.pbf example2.pbf --output-header=generator=blabla -O -o test_data.pbf
I could imagine that the problem is that the input PBFs don't have the headers that I want to set in the output PBF (input PBFs actually do have the generator
header). However, if that is the problem, how do I use pyosmium
to add headers to the PBFs I create in the first place?