Skip to content

Commit

Permalink
Fix converting from .osc to .pbf
Browse files Browse the repository at this point in the history
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
  • Loading branch information
DavidKarlas committed Oct 31, 2023
1 parent cd892f9 commit 8c40a35
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/osmium/io/writer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ namespace osmium {

m_header = options.header;

// Handle converting from .osc file into .pbf with HistoricalInformation(visible)
m_file.set_has_multiple_object_versions(m_header.has_multiple_object_versions());

m_output = osmium::io::detail::OutputFormatFactory::instance().create_output(*options.pool, m_file, m_output_queue);

std::unique_ptr<osmium::io::Compressor> compressor =
Expand Down

0 comments on commit 8c40a35

Please sign in to comment.