osmcode / libosmium

Fast and flexible C++ library for working with OpenStreetMap data.
https://osmcode.org/libosmium/
Boost Software License 1.0
472 stars 114 forks source link

Fix converting from .osc to .pbf #366

Open DavidKarlas opened 1 year ago

DavidKarlas commented 1 year ago

Problem was that .pbf never had has_multiple_object_versions set to true, hence it didn't emit HistoricalInformation and didn't write Visible values in protobuf

Please let me know if this belongs here(or elsewhere in this repo) or at https://github.com/osmcode/osmium-tool/blob/583db02ac9193dfb5217f93c823a4975405338ac/src/command_cat.cpp#L160

Once that is clarified I will add tests in correct repository.

P.S: Forgot to mention how to repro this... osmium cat -o output.pbf 055.osc.gz

joto commented 1 year ago

Thanks for the PR. I am not sure yet whether this does fit in here or has to be solved elsewhere. I am concerned about backwards compatibility. I'll need some time to look into this properly.