From 388a451c9893b4f8d110568a8e35709a4adccf6e Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Thu, 29 Jan 2026 15:01:22 +0100 Subject: [PATCH] Update included libosmium to version 2.23.0 --- contrib/libosmium/README.contrib | 2 +- .../include/osmium/area/assembler.hpp | 2 +- .../include/osmium/area/assembler_config.hpp | 2 +- .../include/osmium/area/assembler_legacy.hpp | 4 +- .../osmium/area/detail/basic_assembler.hpp | 12 +- .../area/detail/basic_assembler_with_tags.hpp | 2 +- .../osmium/area/detail/node_ref_segment.hpp | 2 +- .../include/osmium/area/detail/proto_ring.hpp | 4 +- .../osmium/area/detail/segment_list.hpp | 2 +- .../include/osmium/area/detail/vector.hpp | 2 +- .../include/osmium/area/geom_assembler.hpp | 2 +- .../osmium/area/multipolygon_collector.hpp | 2 +- .../osmium/area/multipolygon_manager.hpp | 2 +- .../area/multipolygon_manager_legacy.hpp | 2 +- .../include/osmium/area/problem_reporter.hpp | 2 +- .../area/problem_reporter_exception.hpp | 2 +- .../osmium/area/problem_reporter_ogr.hpp | 2 +- .../osmium/area/problem_reporter_stream.hpp | 2 +- .../libosmium/include/osmium/area/stats.hpp | 2 +- .../libosmium/include/osmium/builder/attr.hpp | 2 +- .../include/osmium/builder/builder.hpp | 2 +- .../osmium/builder/osm_object_builder.hpp | 59 ++-- .../libosmium/include/osmium/diff_handler.hpp | 2 +- .../include/osmium/diff_iterator.hpp | 2 +- .../libosmium/include/osmium/diff_visitor.hpp | 2 +- .../include/osmium/dynamic_handler.hpp | 2 +- .../osmium/experimental/flex_reader.hpp | 2 +- contrib/libosmium/include/osmium/fwd.hpp | 2 +- .../include/osmium/geom/coordinates.hpp | 2 +- .../libosmium/include/osmium/geom/factory.hpp | 2 +- .../libosmium/include/osmium/geom/geojson.hpp | 2 +- .../libosmium/include/osmium/geom/geos.hpp | 2 +- .../include/osmium/geom/haversine.hpp | 2 +- .../osmium/geom/mercator_projection.hpp | 2 +- contrib/libosmium/include/osmium/geom/ogr.hpp | 2 +- .../include/osmium/geom/rapid_geojson.hpp | 2 +- .../include/osmium/geom/relations.hpp | 2 +- .../libosmium/include/osmium/geom/tile.hpp | 2 +- .../libosmium/include/osmium/geom/util.hpp | 2 +- contrib/libosmium/include/osmium/geom/wkb.hpp | 2 +- contrib/libosmium/include/osmium/geom/wkt.hpp | 2 +- contrib/libosmium/include/osmium/handler.hpp | 2 +- .../include/osmium/handler/chain.hpp | 2 +- .../include/osmium/handler/check_order.hpp | 2 +- .../include/osmium/handler/disk_store.hpp | 2 +- .../libosmium/include/osmium/handler/dump.hpp | 2 +- .../handler/node_locations_for_ways.hpp | 2 +- .../osmium/handler/object_relations.hpp | 2 +- .../index/detail/create_map_with_fd.hpp | 2 +- .../osmium/index/detail/mmap_vector_anon.hpp | 2 +- .../osmium/index/detail/mmap_vector_base.hpp | 2 +- .../osmium/index/detail/mmap_vector_file.hpp | 2 +- .../include/osmium/index/detail/tmpfile.hpp | 2 +- .../osmium/index/detail/vector_map.hpp | 2 +- .../osmium/index/detail/vector_multimap.hpp | 2 +- .../libosmium/include/osmium/index/id_set.hpp | 2 +- .../libosmium/include/osmium/index/index.hpp | 2 +- .../libosmium/include/osmium/index/map.hpp | 2 +- .../include/osmium/index/map/all.hpp | 2 +- .../osmium/index/map/dense_file_array.hpp | 2 +- .../osmium/index/map/dense_mem_array.hpp | 2 +- .../osmium/index/map/dense_mmap_array.hpp | 2 +- .../include/osmium/index/map/dummy.hpp | 2 +- .../include/osmium/index/map/flex_mem.hpp | 2 +- .../osmium/index/map/sparse_file_array.hpp | 2 +- .../osmium/index/map/sparse_mem_array.hpp | 2 +- .../osmium/index/map/sparse_mem_map.hpp | 2 +- .../osmium/index/map/sparse_mmap_array.hpp | 2 +- .../include/osmium/index/multimap.hpp | 2 +- .../include/osmium/index/multimap/all.hpp | 2 +- .../include/osmium/index/multimap/hybrid.hpp | 2 +- .../index/multimap/sparse_file_array.hpp | 2 +- .../index/multimap/sparse_mem_array.hpp | 2 +- .../index/multimap/sparse_mem_multimap.hpp | 2 +- .../index/multimap/sparse_mmap_array.hpp | 2 +- .../osmium/index/node_locations_map.hpp | 2 +- .../include/osmium/index/nwr_array.hpp | 2 +- .../include/osmium/index/relations_map.hpp | 2 +- .../include/osmium/io/any_compression.hpp | 2 +- .../libosmium/include/osmium/io/any_input.hpp | 2 +- .../include/osmium/io/any_output.hpp | 2 +- .../include/osmium/io/bzip2_compression.hpp | 20 +- .../include/osmium/io/compression.hpp | 6 +- .../include/osmium/io/debug_output.hpp | 2 +- .../osmium/io/detail/debug_output_format.hpp | 16 +- .../osmium/io/detail/ids_output_format.hpp | 2 +- .../include/osmium/io/detail/input_format.hpp | 2 +- .../include/osmium/io/detail/lz4.hpp | 2 +- .../osmium/io/detail/o5m_input_format.hpp | 2 +- .../osmium/io/detail/opl_input_format.hpp | 2 +- .../osmium/io/detail/opl_output_format.hpp | 2 +- .../osmium/io/detail/opl_parser_functions.hpp | 2 +- .../osmium/io/detail/output_format.hpp | 2 +- .../include/osmium/io/detail/pbf.hpp | 2 +- .../include/osmium/io/detail/pbf_decoder.hpp | 271 +++++++++++++----- .../osmium/io/detail/pbf_input_format.hpp | 11 +- .../osmium/io/detail/pbf_output_format.hpp | 2 +- .../osmium/io/detail/protobuf_tags.hpp | 2 +- .../include/osmium/io/detail/queue_util.hpp | 2 +- .../include/osmium/io/detail/read_thread.hpp | 2 +- .../include/osmium/io/detail/read_write.hpp | 5 +- .../include/osmium/io/detail/string_table.hpp | 2 +- .../include/osmium/io/detail/string_util.hpp | 2 +- .../include/osmium/io/detail/write_thread.hpp | 2 +- .../osmium/io/detail/xml_input_format.hpp | 2 +- .../osmium/io/detail/xml_output_format.hpp | 2 +- .../include/osmium/io/detail/zlib.hpp | 2 +- contrib/libosmium/include/osmium/io/error.hpp | 2 +- contrib/libosmium/include/osmium/io/file.hpp | 2 +- .../include/osmium/io/file_compression.hpp | 2 +- .../include/osmium/io/file_format.hpp | 2 +- .../include/osmium/io/gzip_compression.hpp | 2 +- .../libosmium/include/osmium/io/header.hpp | 2 +- .../include/osmium/io/ids_output.hpp | 2 +- .../include/osmium/io/input_iterator.hpp | 2 +- .../libosmium/include/osmium/io/o5m_input.hpp | 2 +- .../libosmium/include/osmium/io/opl_input.hpp | 2 +- .../include/osmium/io/opl_output.hpp | 2 +- .../include/osmium/io/output_iterator.hpp | 2 +- .../libosmium/include/osmium/io/overwrite.hpp | 2 +- contrib/libosmium/include/osmium/io/pbf.hpp | 2 +- .../libosmium/include/osmium/io/pbf_input.hpp | 2 +- .../include/osmium/io/pbf_output.hpp | 2 +- .../libosmium/include/osmium/io/reader.hpp | 2 +- .../include/osmium/io/reader_iterator.hpp | 2 +- .../osmium/io/reader_with_progress_bar.hpp | 2 +- .../libosmium/include/osmium/io/writer.hpp | 2 +- .../include/osmium/io/writer_options.hpp | 2 +- .../libosmium/include/osmium/io/xml_input.hpp | 2 +- .../include/osmium/io/xml_output.hpp | 2 +- .../include/osmium/memory/buffer.hpp | 6 +- .../include/osmium/memory/callback_buffer.hpp | 2 +- .../include/osmium/memory/collection.hpp | 3 +- .../libosmium/include/osmium/memory/item.hpp | 2 +- .../include/osmium/memory/item_iterator.hpp | 2 +- .../osmium/object_pointer_collection.hpp | 2 +- contrib/libosmium/include/osmium/opl.hpp | 2 +- contrib/libosmium/include/osmium/osm.hpp | 2 +- contrib/libosmium/include/osmium/osm/area.hpp | 2 +- contrib/libosmium/include/osmium/osm/box.hpp | 2 +- .../include/osmium/osm/changeset.hpp | 2 +- contrib/libosmium/include/osmium/osm/crc.hpp | 2 +- .../libosmium/include/osmium/osm/crc_zlib.hpp | 2 +- .../include/osmium/osm/diff_object.hpp | 2 +- .../libosmium/include/osmium/osm/entity.hpp | 2 +- .../include/osmium/osm/entity_bits.hpp | 6 +- .../include/osmium/osm/item_type.hpp | 2 +- .../libosmium/include/osmium/osm/location.hpp | 157 ++++++++-- .../include/osmium/osm/metadata_options.hpp | 6 +- contrib/libosmium/include/osmium/osm/node.hpp | 2 +- .../libosmium/include/osmium/osm/node_ref.hpp | 2 +- .../include/osmium/osm/node_ref_list.hpp | 2 +- .../libosmium/include/osmium/osm/object.hpp | 2 +- .../include/osmium/osm/object_comparisons.hpp | 2 +- .../libosmium/include/osmium/osm/relation.hpp | 2 +- .../libosmium/include/osmium/osm/segment.hpp | 2 +- contrib/libosmium/include/osmium/osm/tag.hpp | 2 +- .../include/osmium/osm/timestamp.hpp | 2 +- .../libosmium/include/osmium/osm/types.hpp | 2 +- .../include/osmium/osm/types_from_string.hpp | 2 +- .../include/osmium/osm/undirected_segment.hpp | 2 +- contrib/libosmium/include/osmium/osm/way.hpp | 2 +- .../include/osmium/relations/collector.hpp | 2 +- .../osmium/relations/detail/member_meta.hpp | 2 +- .../osmium/relations/detail/relation_meta.hpp | 2 +- .../include/osmium/relations/manager_util.hpp | 2 +- .../osmium/relations/members_database.hpp | 2 +- .../osmium/relations/relations_database.hpp | 2 +- .../osmium/relations/relations_manager.hpp | 2 +- .../include/osmium/storage/item_stash.hpp | 2 +- .../libosmium/include/osmium/tags/filter.hpp | 2 +- .../libosmium/include/osmium/tags/matcher.hpp | 2 +- .../libosmium/include/osmium/tags/taglist.hpp | 2 +- .../include/osmium/tags/tags_filter.hpp | 45 ++- .../osmium/thread/function_wrapper.hpp | 2 +- .../libosmium/include/osmium/thread/pool.hpp | 2 +- .../libosmium/include/osmium/thread/queue.hpp | 2 +- .../libosmium/include/osmium/thread/util.hpp | 2 +- .../include/osmium/util/compatibility.hpp | 2 +- .../libosmium/include/osmium/util/config.hpp | 2 +- .../libosmium/include/osmium/util/delta.hpp | 2 +- .../libosmium/include/osmium/util/double.hpp | 2 +- .../libosmium/include/osmium/util/endian.hpp | 2 +- .../libosmium/include/osmium/util/file.hpp | 2 +- .../include/osmium/util/iterator.hpp | 2 +- .../libosmium/include/osmium/util/memory.hpp | 2 +- .../include/osmium/util/memory_mapping.hpp | 2 +- .../libosmium/include/osmium/util/minmax.hpp | 2 +- .../libosmium/include/osmium/util/misc.hpp | 2 +- .../libosmium/include/osmium/util/options.hpp | 2 +- .../include/osmium/util/progress_bar.hpp | 2 +- .../libosmium/include/osmium/util/string.hpp | 2 +- .../include/osmium/util/string_matcher.hpp | 2 +- .../libosmium/include/osmium/util/timer.hpp | 2 +- .../include/osmium/util/verbose_output.hpp | 2 +- contrib/libosmium/include/osmium/version.hpp | 6 +- contrib/libosmium/include/osmium/visitor.hpp | 2 +- 197 files changed, 677 insertions(+), 320 deletions(-) diff --git a/contrib/libosmium/README.contrib b/contrib/libosmium/README.contrib index 955da97f3..7026807c1 100644 --- a/contrib/libosmium/README.contrib +++ b/contrib/libosmium/README.contrib @@ -1,2 +1,2 @@ Source: https://github.com/osmcode/libosmium -Revision: v2.22.0 +Revision: v2.23.0 diff --git a/contrib/libosmium/include/osmium/area/assembler.hpp b/contrib/libosmium/include/osmium/area/assembler.hpp index 3116f47b0..0ecd13612 100644 --- a/contrib/libosmium/include/osmium/area/assembler.hpp +++ b/contrib/libosmium/include/osmium/area/assembler.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/area/assembler_config.hpp b/contrib/libosmium/include/osmium/area/assembler_config.hpp index e81afcfa3..ff5156c9b 100644 --- a/contrib/libosmium/include/osmium/area/assembler_config.hpp +++ b/contrib/libosmium/include/osmium/area/assembler_config.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/area/assembler_legacy.hpp b/contrib/libosmium/include/osmium/area/assembler_legacy.hpp index f30ab329d..537087565 100644 --- a/contrib/libosmium/include/osmium/area/assembler_legacy.hpp +++ b/contrib/libosmium/include/osmium/area/assembler_legacy.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -72,7 +72,7 @@ namespace osmium { */ class AssemblerLegacy : public detail::BasicAssemblerWithTags { - void add_common_tags(osmium::builder::TagListBuilder& tl_builder, std::set& ways) const { + void add_common_tags(osmium::builder::TagListBuilder& tl_builder, const std::set& ways) const { std::map counter; for (const osmium::Way* way : ways) { for (const auto& tag : way->tags()) { diff --git a/contrib/libosmium/include/osmium/area/detail/basic_assembler.hpp b/contrib/libosmium/include/osmium/area/detail/basic_assembler.hpp index 5a378d076..fa2152a2e 100644 --- a/contrib/libosmium/include/osmium/area/detail/basic_assembler.hpp +++ b/contrib/libosmium/include/osmium/area/detail/basic_assembler.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -290,7 +290,7 @@ namespace osmium { } } - ProtoRing* find_enclosing_ring(NodeRefSegment* segment) { + ProtoRing* find_enclosing_ring(NodeRefSegment const* segment) { if (debug()) { std::cerr << " Looking for ring enclosing " << *segment << "\n"; } @@ -553,7 +553,7 @@ namespace osmium { return; } - std::stable_sort(rings.begin(), rings.end(), [](ProtoRing* a, ProtoRing* b) { + std::stable_sort(rings.begin(), rings.end(), [](ProtoRing const* a, ProtoRing const* b) { return a->min_segment() < b->min_segment(); }); @@ -824,7 +824,7 @@ namespace osmium { }); find_inner_outer_complex(); - ProtoRing* outer_ring = find_enclosing_ring(ring_min->ring().min_segment()); + const ProtoRing* outer_ring = find_enclosing_ring(ring_min->ring().min_segment()); const bool ring_min_is_outer = !outer_ring; if (debug()) { std::cerr << " Open ring is " << (ring_min_is_outer ? "outer" : "inner") << " ring\n"; @@ -858,7 +858,7 @@ namespace osmium { if (!open_ring_its.empty()) { ++m_stats.open_rings; if (m_config.problem_reporter) { - for (auto& it : open_ring_its) { + for (const auto& it : open_ring_its) { m_config.problem_reporter->report_ring_not_closed(it->get_node_ref_start(), nullptr); m_config.problem_reporter->report_ring_not_closed(it->get_node_ref_stop(), nullptr); } @@ -912,7 +912,7 @@ namespace osmium { [this, &location](const slocation& lhs, const slocation& rhs) { return lhs.location(m_segment_list, location) < rhs.location(m_segment_list, location); })); - for (auto& loc : locs) { + for (const auto& loc : locs) { if (!m_segment_list[loc.item].is_done()) { count_remaining -= add_new_ring_complex(loc); if (count_remaining == 0) { diff --git a/contrib/libosmium/include/osmium/area/detail/basic_assembler_with_tags.hpp b/contrib/libosmium/include/osmium/area/detail/basic_assembler_with_tags.hpp index 9e4a4072e..8c5b56f43 100644 --- a/contrib/libosmium/include/osmium/area/detail/basic_assembler_with_tags.hpp +++ b/contrib/libosmium/include/osmium/area/detail/basic_assembler_with_tags.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/area/detail/node_ref_segment.hpp b/contrib/libosmium/include/osmium/area/detail/node_ref_segment.hpp index 5ecaf02a4..41f35b4fe 100644 --- a/contrib/libosmium/include/osmium/area/detail/node_ref_segment.hpp +++ b/contrib/libosmium/include/osmium/area/detail/node_ref_segment.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/area/detail/proto_ring.hpp b/contrib/libosmium/include/osmium/area/detail/proto_ring.hpp index ec62dca59..fb8316f9b 100644 --- a/contrib/libosmium/include/osmium/area/detail/proto_ring.hpp +++ b/contrib/libosmium/include/osmium/area/detail/proto_ring.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -195,7 +195,7 @@ namespace osmium { } } - void join_forward(ProtoRing& other) { + void join_forward(const ProtoRing& other) { m_segments.reserve(m_segments.size() + other.m_segments.size()); for (NodeRefSegment* segment : other.m_segments) { add_segment_back(segment); diff --git a/contrib/libosmium/include/osmium/area/detail/segment_list.hpp b/contrib/libosmium/include/osmium/area/detail/segment_list.hpp index ed07fe198..4be4cb1e1 100644 --- a/contrib/libosmium/include/osmium/area/detail/segment_list.hpp +++ b/contrib/libosmium/include/osmium/area/detail/segment_list.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/area/detail/vector.hpp b/contrib/libosmium/include/osmium/area/detail/vector.hpp index 3c1ba31b0..ac5474602 100644 --- a/contrib/libosmium/include/osmium/area/detail/vector.hpp +++ b/contrib/libosmium/include/osmium/area/detail/vector.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/area/geom_assembler.hpp b/contrib/libosmium/include/osmium/area/geom_assembler.hpp index 8ce75a7a6..558eb9767 100644 --- a/contrib/libosmium/include/osmium/area/geom_assembler.hpp +++ b/contrib/libosmium/include/osmium/area/geom_assembler.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/area/multipolygon_collector.hpp b/contrib/libosmium/include/osmium/area/multipolygon_collector.hpp index c983ae18a..c3054c625 100644 --- a/contrib/libosmium/include/osmium/area/multipolygon_collector.hpp +++ b/contrib/libosmium/include/osmium/area/multipolygon_collector.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/area/multipolygon_manager.hpp b/contrib/libosmium/include/osmium/area/multipolygon_manager.hpp index 26b4c06ec..f9b221e3b 100644 --- a/contrib/libosmium/include/osmium/area/multipolygon_manager.hpp +++ b/contrib/libosmium/include/osmium/area/multipolygon_manager.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/area/multipolygon_manager_legacy.hpp b/contrib/libosmium/include/osmium/area/multipolygon_manager_legacy.hpp index adf9eda0c..9077805ab 100644 --- a/contrib/libosmium/include/osmium/area/multipolygon_manager_legacy.hpp +++ b/contrib/libosmium/include/osmium/area/multipolygon_manager_legacy.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/area/problem_reporter.hpp b/contrib/libosmium/include/osmium/area/problem_reporter.hpp index 95e4e8206..2748f9690 100644 --- a/contrib/libosmium/include/osmium/area/problem_reporter.hpp +++ b/contrib/libosmium/include/osmium/area/problem_reporter.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/area/problem_reporter_exception.hpp b/contrib/libosmium/include/osmium/area/problem_reporter_exception.hpp index 216b4b0c4..f9b8699df 100644 --- a/contrib/libosmium/include/osmium/area/problem_reporter_exception.hpp +++ b/contrib/libosmium/include/osmium/area/problem_reporter_exception.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/area/problem_reporter_ogr.hpp b/contrib/libosmium/include/osmium/area/problem_reporter_ogr.hpp index a99e2f1f3..b887e5b16 100644 --- a/contrib/libosmium/include/osmium/area/problem_reporter_ogr.hpp +++ b/contrib/libosmium/include/osmium/area/problem_reporter_ogr.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/area/problem_reporter_stream.hpp b/contrib/libosmium/include/osmium/area/problem_reporter_stream.hpp index d2307a6a3..dd491f958 100644 --- a/contrib/libosmium/include/osmium/area/problem_reporter_stream.hpp +++ b/contrib/libosmium/include/osmium/area/problem_reporter_stream.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/area/stats.hpp b/contrib/libosmium/include/osmium/area/stats.hpp index 2699d7445..4434f48d8 100644 --- a/contrib/libosmium/include/osmium/area/stats.hpp +++ b/contrib/libosmium/include/osmium/area/stats.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/builder/attr.hpp b/contrib/libosmium/include/osmium/builder/attr.hpp index fdc54bb34..8e99c7f20 100644 --- a/contrib/libosmium/include/osmium/builder/attr.hpp +++ b/contrib/libosmium/include/osmium/builder/attr.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/builder/builder.hpp b/contrib/libosmium/include/osmium/builder/builder.hpp index 2206bcd50..57ead29cb 100644 --- a/contrib/libosmium/include/osmium/builder/builder.hpp +++ b/contrib/libosmium/include/osmium/builder/builder.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/builder/osm_object_builder.hpp b/contrib/libosmium/include/osmium/builder/osm_object_builder.hpp index 7e49535d9..aa5b04315 100644 --- a/contrib/libosmium/include/osmium/builder/osm_object_builder.hpp +++ b/contrib/libosmium/include/osmium/builder/osm_object_builder.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -324,7 +324,7 @@ namespace osmium { class ChangesetDiscussionBuilder : public Builder { - osmium::ChangesetComment* m_comment = nullptr; + std::size_t m_comment_offset = std::numeric_limits::max(); void add_user(osmium::ChangesetComment& comment, const char* user, const std::size_t length) { if (length > osmium::max_osm_string_length) { @@ -343,6 +343,19 @@ namespace osmium { add_padding(true); } + bool has_open_comment() const noexcept { + return m_comment_offset != std::numeric_limits::max(); + } + + // Get current comment pointer (recalculated each time to handle buffer reallocation) + osmium::ChangesetComment* get_comment_ptr() { + if (has_open_comment()) { + return &buffer().get( + buffer().committed() + m_comment_offset); + } + return nullptr; + } + public: explicit ChangesetDiscussionBuilder(osmium::memory::Buffer& buffer, Builder* parent = nullptr) : @@ -362,32 +375,46 @@ namespace osmium { ChangesetDiscussionBuilder& operator=(ChangesetDiscussionBuilder&&) = delete; ~ChangesetDiscussionBuilder() { - assert(!m_comment && "You have to always call both add_comment() and then add_comment_text() in that order for each comment!"); + assert(!has_open_comment() && "You have to always call both add_comment() and then add_comment_text() in that order for each comment!"); add_padding(); } void add_comment(osmium::Timestamp date, osmium::user_id_type uid, const char* user) { - assert(!m_comment && "You have to always call both add_comment() and then add_comment_text() in that order for each comment!"); - m_comment = reserve_space_for(); - new (m_comment) osmium::ChangesetComment{date, uid}; + assert(!has_open_comment() && "You have to always call both add_comment() and then add_comment_text() in that order for each comment!"); + + // Store offset instead of pointer to handle buffer reallocation + m_comment_offset = buffer().written() - buffer().committed(); + + auto* comment = reserve_space_for(); + new (comment) osmium::ChangesetComment{date, uid}; add_size(sizeof(ChangesetComment)); - add_user(*m_comment, user, std::strlen(user)); + + add_user(*comment, user, std::strlen(user)); } void add_comment_text(const char* text) { - assert(m_comment && "You have to always call both add_comment() and then add_comment_text() in that order for each comment!"); - osmium::ChangesetComment& comment = *m_comment; - m_comment = nullptr; - add_text(comment, text, std::strlen(text)); + assert(has_open_comment() && "You have to always call both add_comment() and then add_comment_text() in that order for each comment!"); + + // Get fresh pointer each time to handle buffer reallocation + auto* comment = get_comment_ptr(); + + // Invalidate offset to ensure right adding order + m_comment_offset = std::numeric_limits::max(); + + add_text(*comment, text, std::strlen(text)); } void add_comment_text(const std::string& text) { - assert(m_comment && "You have to always call both add_comment() and then add_comment_text() in that order for each comment!"); - osmium::ChangesetComment& comment = *m_comment; - m_comment = nullptr; - add_text(comment, text.c_str(), text.size()); - } + assert(has_open_comment() && "You have to always call both add_comment() and then add_comment_text() in that order for each comment!"); + // Get fresh pointer each time to handle buffer reallocation + auto* comment = get_comment_ptr(); + + // Invalidate offset to ensure right adding order + m_comment_offset = std::numeric_limits::max(); + + add_text(*comment, text.c_str(), text.size()); + } }; // class ChangesetDiscussionBuilder #define OSMIUM_FORWARD(setter) \ diff --git a/contrib/libosmium/include/osmium/diff_handler.hpp b/contrib/libosmium/include/osmium/diff_handler.hpp index 935d6a1a1..2bf4435e4 100644 --- a/contrib/libosmium/include/osmium/diff_handler.hpp +++ b/contrib/libosmium/include/osmium/diff_handler.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/diff_iterator.hpp b/contrib/libosmium/include/osmium/diff_iterator.hpp index c6c725168..577b3e333 100644 --- a/contrib/libosmium/include/osmium/diff_iterator.hpp +++ b/contrib/libosmium/include/osmium/diff_iterator.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/diff_visitor.hpp b/contrib/libosmium/include/osmium/diff_visitor.hpp index 32f0ff328..4a3ec8171 100644 --- a/contrib/libosmium/include/osmium/diff_visitor.hpp +++ b/contrib/libosmium/include/osmium/diff_visitor.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/dynamic_handler.hpp b/contrib/libosmium/include/osmium/dynamic_handler.hpp index 3917309dd..a730f2f6c 100644 --- a/contrib/libosmium/include/osmium/dynamic_handler.hpp +++ b/contrib/libosmium/include/osmium/dynamic_handler.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/experimental/flex_reader.hpp b/contrib/libosmium/include/osmium/experimental/flex_reader.hpp index ad4525f1f..92d830ff1 100644 --- a/contrib/libosmium/include/osmium/experimental/flex_reader.hpp +++ b/contrib/libosmium/include/osmium/experimental/flex_reader.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/fwd.hpp b/contrib/libosmium/include/osmium/fwd.hpp index b80c5d742..608f83b51 100644 --- a/contrib/libosmium/include/osmium/fwd.hpp +++ b/contrib/libosmium/include/osmium/fwd.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/geom/coordinates.hpp b/contrib/libosmium/include/osmium/geom/coordinates.hpp index c734d0dd7..72d3a20ff 100644 --- a/contrib/libosmium/include/osmium/geom/coordinates.hpp +++ b/contrib/libosmium/include/osmium/geom/coordinates.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/geom/factory.hpp b/contrib/libosmium/include/osmium/geom/factory.hpp index 148a3e2e3..0b2438a81 100644 --- a/contrib/libosmium/include/osmium/geom/factory.hpp +++ b/contrib/libosmium/include/osmium/geom/factory.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/geom/geojson.hpp b/contrib/libosmium/include/osmium/geom/geojson.hpp index 41650501b..9ad997370 100644 --- a/contrib/libosmium/include/osmium/geom/geojson.hpp +++ b/contrib/libosmium/include/osmium/geom/geojson.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/geom/geos.hpp b/contrib/libosmium/include/osmium/geom/geos.hpp index d859e6be3..87afe8bf3 100644 --- a/contrib/libosmium/include/osmium/geom/geos.hpp +++ b/contrib/libosmium/include/osmium/geom/geos.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/geom/haversine.hpp b/contrib/libosmium/include/osmium/geom/haversine.hpp index a57170f82..f1bc7a6be 100644 --- a/contrib/libosmium/include/osmium/geom/haversine.hpp +++ b/contrib/libosmium/include/osmium/geom/haversine.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/geom/mercator_projection.hpp b/contrib/libosmium/include/osmium/geom/mercator_projection.hpp index 514152e1c..572d080cf 100644 --- a/contrib/libosmium/include/osmium/geom/mercator_projection.hpp +++ b/contrib/libosmium/include/osmium/geom/mercator_projection.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/geom/ogr.hpp b/contrib/libosmium/include/osmium/geom/ogr.hpp index 603a104cf..f26c01c96 100644 --- a/contrib/libosmium/include/osmium/geom/ogr.hpp +++ b/contrib/libosmium/include/osmium/geom/ogr.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/geom/rapid_geojson.hpp b/contrib/libosmium/include/osmium/geom/rapid_geojson.hpp index 5e415f5b4..f93b9996c 100644 --- a/contrib/libosmium/include/osmium/geom/rapid_geojson.hpp +++ b/contrib/libosmium/include/osmium/geom/rapid_geojson.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/geom/relations.hpp b/contrib/libosmium/include/osmium/geom/relations.hpp index 4a33574ce..d1beb721c 100644 --- a/contrib/libosmium/include/osmium/geom/relations.hpp +++ b/contrib/libosmium/include/osmium/geom/relations.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/geom/tile.hpp b/contrib/libosmium/include/osmium/geom/tile.hpp index 242fd5c27..3dde94ef1 100644 --- a/contrib/libosmium/include/osmium/geom/tile.hpp +++ b/contrib/libosmium/include/osmium/geom/tile.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/geom/util.hpp b/contrib/libosmium/include/osmium/geom/util.hpp index 2341b38d7..4b69da939 100644 --- a/contrib/libosmium/include/osmium/geom/util.hpp +++ b/contrib/libosmium/include/osmium/geom/util.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/geom/wkb.hpp b/contrib/libosmium/include/osmium/geom/wkb.hpp index 30f0b5428..9f7a5973d 100644 --- a/contrib/libosmium/include/osmium/geom/wkb.hpp +++ b/contrib/libosmium/include/osmium/geom/wkb.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/geom/wkt.hpp b/contrib/libosmium/include/osmium/geom/wkt.hpp index 5be2507cc..a5ff4fabe 100644 --- a/contrib/libosmium/include/osmium/geom/wkt.hpp +++ b/contrib/libosmium/include/osmium/geom/wkt.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/handler.hpp b/contrib/libosmium/include/osmium/handler.hpp index cd510c30a..cb3d495d9 100644 --- a/contrib/libosmium/include/osmium/handler.hpp +++ b/contrib/libosmium/include/osmium/handler.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/handler/chain.hpp b/contrib/libosmium/include/osmium/handler/chain.hpp index 869076809..d05df2556 100644 --- a/contrib/libosmium/include/osmium/handler/chain.hpp +++ b/contrib/libosmium/include/osmium/handler/chain.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/handler/check_order.hpp b/contrib/libosmium/include/osmium/handler/check_order.hpp index 643034226..c05652d6a 100644 --- a/contrib/libosmium/include/osmium/handler/check_order.hpp +++ b/contrib/libosmium/include/osmium/handler/check_order.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/handler/disk_store.hpp b/contrib/libosmium/include/osmium/handler/disk_store.hpp index 2d5ec190e..165f09283 100644 --- a/contrib/libosmium/include/osmium/handler/disk_store.hpp +++ b/contrib/libosmium/include/osmium/handler/disk_store.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/handler/dump.hpp b/contrib/libosmium/include/osmium/handler/dump.hpp index c08d79752..a15fb52d4 100644 --- a/contrib/libosmium/include/osmium/handler/dump.hpp +++ b/contrib/libosmium/include/osmium/handler/dump.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/handler/node_locations_for_ways.hpp b/contrib/libosmium/include/osmium/handler/node_locations_for_ways.hpp index 05b36e814..720d1ae81 100644 --- a/contrib/libosmium/include/osmium/handler/node_locations_for_ways.hpp +++ b/contrib/libosmium/include/osmium/handler/node_locations_for_ways.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/handler/object_relations.hpp b/contrib/libosmium/include/osmium/handler/object_relations.hpp index 0dee79edf..d9c318a80 100644 --- a/contrib/libosmium/include/osmium/handler/object_relations.hpp +++ b/contrib/libosmium/include/osmium/handler/object_relations.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/detail/create_map_with_fd.hpp b/contrib/libosmium/include/osmium/index/detail/create_map_with_fd.hpp index 8870f09b2..876fa1f49 100644 --- a/contrib/libosmium/include/osmium/index/detail/create_map_with_fd.hpp +++ b/contrib/libosmium/include/osmium/index/detail/create_map_with_fd.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/detail/mmap_vector_anon.hpp b/contrib/libosmium/include/osmium/index/detail/mmap_vector_anon.hpp index 1b36522c7..4bcf86ef0 100644 --- a/contrib/libosmium/include/osmium/index/detail/mmap_vector_anon.hpp +++ b/contrib/libosmium/include/osmium/index/detail/mmap_vector_anon.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/detail/mmap_vector_base.hpp b/contrib/libosmium/include/osmium/index/detail/mmap_vector_base.hpp index a81cde7fb..9e7ba10f7 100644 --- a/contrib/libosmium/include/osmium/index/detail/mmap_vector_base.hpp +++ b/contrib/libosmium/include/osmium/index/detail/mmap_vector_base.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/detail/mmap_vector_file.hpp b/contrib/libosmium/include/osmium/index/detail/mmap_vector_file.hpp index f7e18e59c..30aa28707 100644 --- a/contrib/libosmium/include/osmium/index/detail/mmap_vector_file.hpp +++ b/contrib/libosmium/include/osmium/index/detail/mmap_vector_file.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/detail/tmpfile.hpp b/contrib/libosmium/include/osmium/index/detail/tmpfile.hpp index 88db24d7d..dc0205f98 100644 --- a/contrib/libosmium/include/osmium/index/detail/tmpfile.hpp +++ b/contrib/libosmium/include/osmium/index/detail/tmpfile.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/detail/vector_map.hpp b/contrib/libosmium/include/osmium/index/detail/vector_map.hpp index 550694b98..db4fb999a 100644 --- a/contrib/libosmium/include/osmium/index/detail/vector_map.hpp +++ b/contrib/libosmium/include/osmium/index/detail/vector_map.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/detail/vector_multimap.hpp b/contrib/libosmium/include/osmium/index/detail/vector_multimap.hpp index a1a5a7320..adbd19882 100644 --- a/contrib/libosmium/include/osmium/index/detail/vector_multimap.hpp +++ b/contrib/libosmium/include/osmium/index/detail/vector_multimap.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/id_set.hpp b/contrib/libosmium/include/osmium/index/id_set.hpp index c5732ea3a..07946662d 100644 --- a/contrib/libosmium/include/osmium/index/id_set.hpp +++ b/contrib/libosmium/include/osmium/index/id_set.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/index.hpp b/contrib/libosmium/include/osmium/index/index.hpp index 9ebb4cce6..8da068e11 100644 --- a/contrib/libosmium/include/osmium/index/index.hpp +++ b/contrib/libosmium/include/osmium/index/index.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/map.hpp b/contrib/libosmium/include/osmium/index/map.hpp index ff2a54d56..ea26c99cb 100644 --- a/contrib/libosmium/include/osmium/index/map.hpp +++ b/contrib/libosmium/include/osmium/index/map.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/map/all.hpp b/contrib/libosmium/include/osmium/index/map/all.hpp index 9f001c30c..28e497d43 100644 --- a/contrib/libosmium/include/osmium/index/map/all.hpp +++ b/contrib/libosmium/include/osmium/index/map/all.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/map/dense_file_array.hpp b/contrib/libosmium/include/osmium/index/map/dense_file_array.hpp index 674464589..8de47e7f0 100644 --- a/contrib/libosmium/include/osmium/index/map/dense_file_array.hpp +++ b/contrib/libosmium/include/osmium/index/map/dense_file_array.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/map/dense_mem_array.hpp b/contrib/libosmium/include/osmium/index/map/dense_mem_array.hpp index 0a90488a3..ea1999e5a 100644 --- a/contrib/libosmium/include/osmium/index/map/dense_mem_array.hpp +++ b/contrib/libosmium/include/osmium/index/map/dense_mem_array.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/map/dense_mmap_array.hpp b/contrib/libosmium/include/osmium/index/map/dense_mmap_array.hpp index 0ee920491..2660c8d46 100644 --- a/contrib/libosmium/include/osmium/index/map/dense_mmap_array.hpp +++ b/contrib/libosmium/include/osmium/index/map/dense_mmap_array.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/map/dummy.hpp b/contrib/libosmium/include/osmium/index/map/dummy.hpp index e29322371..b6ebbfbcb 100644 --- a/contrib/libosmium/include/osmium/index/map/dummy.hpp +++ b/contrib/libosmium/include/osmium/index/map/dummy.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/map/flex_mem.hpp b/contrib/libosmium/include/osmium/index/map/flex_mem.hpp index b282217b2..770be661c 100644 --- a/contrib/libosmium/include/osmium/index/map/flex_mem.hpp +++ b/contrib/libosmium/include/osmium/index/map/flex_mem.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/map/sparse_file_array.hpp b/contrib/libosmium/include/osmium/index/map/sparse_file_array.hpp index 8832682f1..41ac38fd4 100644 --- a/contrib/libosmium/include/osmium/index/map/sparse_file_array.hpp +++ b/contrib/libosmium/include/osmium/index/map/sparse_file_array.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/map/sparse_mem_array.hpp b/contrib/libosmium/include/osmium/index/map/sparse_mem_array.hpp index ce0ef9cb7..39bdd34f1 100644 --- a/contrib/libosmium/include/osmium/index/map/sparse_mem_array.hpp +++ b/contrib/libosmium/include/osmium/index/map/sparse_mem_array.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/map/sparse_mem_map.hpp b/contrib/libosmium/include/osmium/index/map/sparse_mem_map.hpp index b7b798abb..c03cc6935 100644 --- a/contrib/libosmium/include/osmium/index/map/sparse_mem_map.hpp +++ b/contrib/libosmium/include/osmium/index/map/sparse_mem_map.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/map/sparse_mmap_array.hpp b/contrib/libosmium/include/osmium/index/map/sparse_mmap_array.hpp index b616f1921..202ffbba4 100644 --- a/contrib/libosmium/include/osmium/index/map/sparse_mmap_array.hpp +++ b/contrib/libosmium/include/osmium/index/map/sparse_mmap_array.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/multimap.hpp b/contrib/libosmium/include/osmium/index/multimap.hpp index 6c72fdcc5..a70d4631c 100644 --- a/contrib/libosmium/include/osmium/index/multimap.hpp +++ b/contrib/libosmium/include/osmium/index/multimap.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/multimap/all.hpp b/contrib/libosmium/include/osmium/index/multimap/all.hpp index 439762a74..de7359bc8 100644 --- a/contrib/libosmium/include/osmium/index/multimap/all.hpp +++ b/contrib/libosmium/include/osmium/index/multimap/all.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/multimap/hybrid.hpp b/contrib/libosmium/include/osmium/index/multimap/hybrid.hpp index 45e38d954..9311f0c0e 100644 --- a/contrib/libosmium/include/osmium/index/multimap/hybrid.hpp +++ b/contrib/libosmium/include/osmium/index/multimap/hybrid.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/multimap/sparse_file_array.hpp b/contrib/libosmium/include/osmium/index/multimap/sparse_file_array.hpp index 38cf5e4cb..ad2268f63 100644 --- a/contrib/libosmium/include/osmium/index/multimap/sparse_file_array.hpp +++ b/contrib/libosmium/include/osmium/index/multimap/sparse_file_array.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/multimap/sparse_mem_array.hpp b/contrib/libosmium/include/osmium/index/multimap/sparse_mem_array.hpp index c9a24eb79..34030b3ed 100644 --- a/contrib/libosmium/include/osmium/index/multimap/sparse_mem_array.hpp +++ b/contrib/libosmium/include/osmium/index/multimap/sparse_mem_array.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/multimap/sparse_mem_multimap.hpp b/contrib/libosmium/include/osmium/index/multimap/sparse_mem_multimap.hpp index 5899d647a..92c1b1dc8 100644 --- a/contrib/libosmium/include/osmium/index/multimap/sparse_mem_multimap.hpp +++ b/contrib/libosmium/include/osmium/index/multimap/sparse_mem_multimap.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/multimap/sparse_mmap_array.hpp b/contrib/libosmium/include/osmium/index/multimap/sparse_mmap_array.hpp index 7d82c3eac..b599a3c57 100644 --- a/contrib/libosmium/include/osmium/index/multimap/sparse_mmap_array.hpp +++ b/contrib/libosmium/include/osmium/index/multimap/sparse_mmap_array.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/node_locations_map.hpp b/contrib/libosmium/include/osmium/index/node_locations_map.hpp index 3a1035c49..8c80169be 100644 --- a/contrib/libosmium/include/osmium/index/node_locations_map.hpp +++ b/contrib/libosmium/include/osmium/index/node_locations_map.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/nwr_array.hpp b/contrib/libosmium/include/osmium/index/nwr_array.hpp index 001851a11..dc469d55c 100644 --- a/contrib/libosmium/include/osmium/index/nwr_array.hpp +++ b/contrib/libosmium/include/osmium/index/nwr_array.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/relations_map.hpp b/contrib/libosmium/include/osmium/index/relations_map.hpp index 57a214968..0f993bc5a 100644 --- a/contrib/libosmium/include/osmium/index/relations_map.hpp +++ b/contrib/libosmium/include/osmium/index/relations_map.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/any_compression.hpp b/contrib/libosmium/include/osmium/io/any_compression.hpp index ebdb0f87c..e02eee771 100644 --- a/contrib/libosmium/include/osmium/io/any_compression.hpp +++ b/contrib/libosmium/include/osmium/io/any_compression.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/any_input.hpp b/contrib/libosmium/include/osmium/io/any_input.hpp index bb625ed8c..3a8f0522e 100644 --- a/contrib/libosmium/include/osmium/io/any_input.hpp +++ b/contrib/libosmium/include/osmium/io/any_input.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/any_output.hpp b/contrib/libosmium/include/osmium/io/any_output.hpp index a78fff652..509dd947e 100644 --- a/contrib/libosmium/include/osmium/io/any_output.hpp +++ b/contrib/libosmium/include/osmium/io/any_output.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/bzip2_compression.hpp b/contrib/libosmium/include/osmium/io/bzip2_compression.hpp index 99c50cc2a..e1f9e3235 100644 --- a/contrib/libosmium/include/osmium/io/bzip2_compression.hpp +++ b/contrib/libosmium/include/osmium/io/bzip2_compression.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -109,6 +109,9 @@ namespace osmium { file_wrapper() noexcept = default; file_wrapper(const int fd, const char* mode) { + if (fd < 0) { + throw std::system_error{errno, std::system_category(), "file descriptor must be >= 0"}; + } #ifdef _MSC_VER osmium::detail::disable_invalid_parameter_handler diph; #endif @@ -152,7 +155,7 @@ namespace osmium { // Do not close stdout if (fileno(wrapped_file) == 1) { - return; + return; // NOLINT(clang-analyzer-unix.Stream) } if (fclose(wrapped_file) != 0) { @@ -313,7 +316,18 @@ namespace osmium { throw bzip2_error{"bzip2 error: read open failed", bzerror}; } } else { - m_stream_end = true; + // Close current stream and try to open a new one for multi-stream files + ::BZ2_bzReadClose(&bzerror, m_bzfile); + if (bzerror != BZ_OK) { + throw bzip2_error{"bzip2 error: read close failed", bzerror}; + } + // Try to open a new stream - there might be more bzip2 streams concatenated + m_bzfile = ::BZ2_bzReadOpen(&bzerror, m_file.file(), 0, 0, nullptr, 0); + if (!m_bzfile || bzerror != BZ_OK) { + // If we can't open a new stream, we've truly reached the end + m_stream_end = true; + m_bzfile = nullptr; + } } } else { m_stream_end = true; diff --git a/contrib/libosmium/include/osmium/io/compression.hpp b/contrib/libosmium/include/osmium/io/compression.hpp index f21905d34..a49f5157d 100644 --- a/contrib/libosmium/include/osmium/io/compression.hpp +++ b/contrib/libosmium/include/osmium/io/compression.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -207,6 +207,10 @@ namespace osmium { return m_callbacks.insert(cc).second; } + void clear_register() { + m_callbacks.clear(); + } + template std::unique_ptr create_compressor(const osmium::io::file_compression compression, TArgs&&... args) const { const auto callbacks = find_callbacks(compression); diff --git a/contrib/libosmium/include/osmium/io/debug_output.hpp b/contrib/libosmium/include/osmium/io/debug_output.hpp index 87bf29d32..e1999014f 100644 --- a/contrib/libosmium/include/osmium/io/debug_output.hpp +++ b/contrib/libosmium/include/osmium/io/debug_output.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/debug_output_format.hpp b/contrib/libosmium/include/osmium/io/detail/debug_output_format.hpp index 9767690e9..4fe3c1cd7 100644 --- a/contrib/libosmium/include/osmium/io/detail/debug_output_format.hpp +++ b/contrib/libosmium/include/osmium/io/detail/debug_output_format.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -106,6 +106,14 @@ namespace osmium { }; // struct debug_output_options + // Space needed for printing numbers from 0 to num - 1 + inline int print_width(std::size_t num) noexcept { + if (num <= 10) { + return 1; + } + return static_cast(std::log10(num - 1)) + 1; + } + /** * Writes out one buffer with OSM data in Debug format. */ @@ -392,7 +400,7 @@ namespace osmium { *m_out += " (open)\n"; } - const int width = static_cast(std::log10(way.nodes().size())) + 1; + const int width = print_width(way.nodes().size()); int n = 0; for (const auto& node_ref : way.nodes()) { write_diff(); @@ -427,7 +435,7 @@ namespace osmium { output_int(relation.members().size()); *m_out += '\n'; - const int width = static_cast(std::log10(relation.members().size())) + 1; + const int width = print_width(relation.members().size()); int n = 0; for (const auto& member : relation.members()) { write_diff(); @@ -485,7 +493,7 @@ namespace osmium { output_int(changeset.num_comments()); *m_out += '\n'; - const int width = static_cast(std::log10(changeset.num_comments())) + 1; + const int width = print_width(changeset.num_comments()); int n = 0; for (const auto& comment : changeset.discussion()) { write_counter(width, n++); diff --git a/contrib/libosmium/include/osmium/io/detail/ids_output_format.hpp b/contrib/libosmium/include/osmium/io/detail/ids_output_format.hpp index 87448280b..6249705a4 100644 --- a/contrib/libosmium/include/osmium/io/detail/ids_output_format.hpp +++ b/contrib/libosmium/include/osmium/io/detail/ids_output_format.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/input_format.hpp b/contrib/libosmium/include/osmium/io/detail/input_format.hpp index f16a1b77e..403afb53f 100644 --- a/contrib/libosmium/include/osmium/io/detail/input_format.hpp +++ b/contrib/libosmium/include/osmium/io/detail/input_format.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/lz4.hpp b/contrib/libosmium/include/osmium/io/detail/lz4.hpp index 601ffc5af..c8061fdb6 100644 --- a/contrib/libosmium/include/osmium/io/detail/lz4.hpp +++ b/contrib/libosmium/include/osmium/io/detail/lz4.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/o5m_input_format.hpp b/contrib/libosmium/include/osmium/io/detail/o5m_input_format.hpp index 2f6995186..f76a367b1 100644 --- a/contrib/libosmium/include/osmium/io/detail/o5m_input_format.hpp +++ b/contrib/libosmium/include/osmium/io/detail/o5m_input_format.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/opl_input_format.hpp b/contrib/libosmium/include/osmium/io/detail/opl_input_format.hpp index 568110af2..63a5b4d1c 100644 --- a/contrib/libosmium/include/osmium/io/detail/opl_input_format.hpp +++ b/contrib/libosmium/include/osmium/io/detail/opl_input_format.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/opl_output_format.hpp b/contrib/libosmium/include/osmium/io/detail/opl_output_format.hpp index ab5a847b1..9c1723641 100644 --- a/contrib/libosmium/include/osmium/io/detail/opl_output_format.hpp +++ b/contrib/libosmium/include/osmium/io/detail/opl_output_format.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/opl_parser_functions.hpp b/contrib/libosmium/include/osmium/io/detail/opl_parser_functions.hpp index 8fb5c3966..3fa5ed430 100644 --- a/contrib/libosmium/include/osmium/io/detail/opl_parser_functions.hpp +++ b/contrib/libosmium/include/osmium/io/detail/opl_parser_functions.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/output_format.hpp b/contrib/libosmium/include/osmium/io/detail/output_format.hpp index 3a86d497c..7f648cfcf 100644 --- a/contrib/libosmium/include/osmium/io/detail/output_format.hpp +++ b/contrib/libosmium/include/osmium/io/detail/output_format.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/pbf.hpp b/contrib/libosmium/include/osmium/io/detail/pbf.hpp index 0dd5e7550..c6fbcdcc5 100644 --- a/contrib/libosmium/include/osmium/io/detail/pbf.hpp +++ b/contrib/libosmium/include/osmium/io/detail/pbf.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/pbf_decoder.hpp b/contrib/libosmium/include/osmium/io/detail/pbf_decoder.hpp index 6f77dda6b..b03cfb2f3 100644 --- a/contrib/libosmium/include/osmium/io/detail/pbf_decoder.hpp +++ b/contrib/libosmium/include/osmium/io/detail/pbf_decoder.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -81,31 +81,50 @@ namespace osmium { using protozero::data_view; - class varint_range { + template + class values_access { const char* m_data = nullptr; const char* m_end = nullptr; + T m_value = 0; + int m_num_values = 0; + + protected: std::uint64_t next() { return protozero::decode_varint(&m_data, m_end); } + bool has_single_value() const noexcept { + return m_num_values > 0; + } + + T get_and_clear_value() noexcept { + m_num_values = 0; + return m_value; + } + public: - varint_range() = default; + values_access() = default; - explicit varint_range(const data_view& data) : + explicit values_access(const data_view& data) : m_data(data.data()), m_end(data.data() + data.size()) { } + explicit values_access(T value) : + m_value(value), + m_num_values(1) { + } + bool empty() const noexcept { - return m_data == m_end; + return m_data == m_end && m_num_values == 0; } std::size_t size() const noexcept { if (!m_data) { - return 0; + return m_num_values; } // We know that each varint contains exactly one byte with the most @@ -116,23 +135,67 @@ namespace osmium { }); } - std::int32_t next_int32() { + }; // class values_access + + class values_access_int32 : public values_access { + + public: + + using values_access::values_access; + + int32_t next_int32() { + if (has_single_value()) { + return get_and_clear_value(); + } return static_cast(next()); } - std::uint32_t next_uint32() { + }; // class values_access_int32 + + class values_access_uint32 : public values_access { + + public: + + using values_access::values_access; + + uint32_t next_uint32() { + if (has_single_value()) { + return get_and_clear_value(); + } return static_cast(next()); } - std::int32_t next_sint32() { + }; // class values_access_uint32 + + class values_access_sint32 : public values_access { + + public: + + using values_access::values_access; + + int32_t next_sint32() { + if (has_single_value()) { + return get_and_clear_value(); + } return protozero::decode_zigzag32(static_cast(next())); } - std::int64_t next_sint64() { + }; // class values_access_sint32 + + class values_access_sint64 : public values_access { + + public: + + using values_access::values_access; + + int64_t next_sint64() { + if (has_single_value()) { + return get_and_clear_value(); + } return protozero::decode_zigzag64(next()); } - }; // class varint_range + }; // class values_access_sint64 using osm_string_len_type = std::pair; @@ -300,7 +363,7 @@ namespace osmium { return user; } - void build_tag_list(osmium::builder::Builder& parent, varint_range& keys, varint_range& vals) { + void build_tag_list(osmium::builder::Builder& parent, values_access_uint32& keys, values_access_uint32& vals) { if (keys.empty() || vals.empty()) { return; } @@ -325,8 +388,8 @@ namespace osmium { osmium::builder::NodeBuilder builder{m_buffer}; osmium::Node& node = builder.object(); - varint_range keys; - varint_range vals; + values_access_uint32 keys; + values_access_uint32 vals; int64_t lon = std::numeric_limits::max(); int64_t lat = std::numeric_limits::max(); @@ -339,10 +402,16 @@ namespace osmium { node.set_id(pbf_node.get_sint64()); break; case protozero::tag_and_type(OSMFormat::Node::packed_uint32_keys, protozero::pbf_wire_type::length_delimited): - keys = varint_range{pbf_node.get_view()}; + keys = values_access_uint32{pbf_node.get_view()}; + break; + case protozero::tag_and_type(OSMFormat::Node::packed_uint32_keys, protozero::pbf_wire_type::varint): + keys = values_access_uint32{pbf_node.get_uint32()}; break; case protozero::tag_and_type(OSMFormat::Node::packed_uint32_vals, protozero::pbf_wire_type::length_delimited): - vals = varint_range{pbf_node.get_view()}; + vals = values_access_uint32{pbf_node.get_view()}; + break; + case protozero::tag_and_type(OSMFormat::Node::packed_uint32_vals, protozero::pbf_wire_type::varint): + vals = values_access_uint32{pbf_node.get_uint32()}; break; case protozero::tag_and_type(OSMFormat::Node::optional_Info_info, protozero::pbf_wire_type::length_delimited): if (m_read_metadata == osmium::io::read_meta::yes) { @@ -381,11 +450,11 @@ namespace osmium { void decode_way(const data_view& data) { osmium::builder::WayBuilder builder{m_buffer}; - varint_range keys; - varint_range vals; - varint_range refs; - varint_range lats; - varint_range lons; + values_access_uint32 keys; + values_access_uint32 vals; + values_access_sint64 refs; + values_access_sint64 lats; + values_access_sint64 lons; osm_string_len_type user{"", 0}; @@ -396,10 +465,16 @@ namespace osmium { builder.object().set_id(pbf_way.get_int64()); break; case protozero::tag_and_type(OSMFormat::Way::packed_uint32_keys, protozero::pbf_wire_type::length_delimited): - keys = varint_range{pbf_way.get_view()}; + keys = values_access_uint32{pbf_way.get_view()}; + break; + case protozero::tag_and_type(OSMFormat::Way::packed_uint32_keys, protozero::pbf_wire_type::varint): + keys = values_access_uint32{pbf_way.get_uint32()}; break; case protozero::tag_and_type(OSMFormat::Way::packed_uint32_vals, protozero::pbf_wire_type::length_delimited): - vals = varint_range{pbf_way.get_view()}; + vals = values_access_uint32{pbf_way.get_view()}; + break; + case protozero::tag_and_type(OSMFormat::Way::packed_uint32_vals, protozero::pbf_wire_type::varint): + vals = values_access_uint32{pbf_way.get_uint32()}; break; case protozero::tag_and_type(OSMFormat::Way::optional_Info_info, protozero::pbf_wire_type::length_delimited): if (m_read_metadata == osmium::io::read_meta::yes) { @@ -409,13 +484,22 @@ namespace osmium { } break; case protozero::tag_and_type(OSMFormat::Way::packed_sint64_refs, protozero::pbf_wire_type::length_delimited): - refs = varint_range{pbf_way.get_view()}; + refs = values_access_sint64{pbf_way.get_view()}; + break; + case protozero::tag_and_type(OSMFormat::Way::packed_sint64_refs, protozero::pbf_wire_type::varint): + refs = values_access_sint64{pbf_way.get_sint64()}; break; case protozero::tag_and_type(OSMFormat::Way::packed_sint64_lat, protozero::pbf_wire_type::length_delimited): - lats = varint_range{pbf_way.get_view()}; + lats = values_access_sint64{pbf_way.get_view()}; + break; + case protozero::tag_and_type(OSMFormat::Way::packed_sint64_lat, protozero::pbf_wire_type::varint): + lats = values_access_sint64{pbf_way.get_sint64()}; break; case protozero::tag_and_type(OSMFormat::Way::packed_sint64_lon, protozero::pbf_wire_type::length_delimited): - lons = varint_range{pbf_way.get_view()}; + lons = values_access_sint64{pbf_way.get_view()}; + break; + case protozero::tag_and_type(OSMFormat::Way::packed_sint64_lon, protozero::pbf_wire_type::varint): + lons = values_access_sint64{pbf_way.get_sint64()}; break; default: pbf_way.skip(); @@ -450,11 +534,11 @@ namespace osmium { void decode_relation(const data_view& data) { osmium::builder::RelationBuilder builder{m_buffer}; - varint_range keys; - varint_range vals; - varint_range roles; - varint_range refs; - varint_range types; + values_access_uint32 keys; + values_access_uint32 vals; + values_access_int32 roles; + values_access_sint64 refs; + values_access_int32 types; osm_string_len_type user{"", 0}; @@ -465,10 +549,16 @@ namespace osmium { builder.object().set_id(pbf_relation.get_int64()); break; case protozero::tag_and_type(OSMFormat::Relation::packed_uint32_keys, protozero::pbf_wire_type::length_delimited): - keys = varint_range{pbf_relation.get_view()}; + keys = values_access_uint32{pbf_relation.get_view()}; + break; + case protozero::tag_and_type(OSMFormat::Relation::packed_uint32_keys, protozero::pbf_wire_type::varint): + keys = values_access_uint32{pbf_relation.get_uint32()}; break; case protozero::tag_and_type(OSMFormat::Relation::packed_uint32_vals, protozero::pbf_wire_type::length_delimited): - vals = varint_range{pbf_relation.get_view()}; + vals = values_access_uint32{pbf_relation.get_view()}; + break; + case protozero::tag_and_type(OSMFormat::Relation::packed_uint32_vals, protozero::pbf_wire_type::varint): + vals = values_access_uint32{pbf_relation.get_uint32()}; break; case protozero::tag_and_type(OSMFormat::Relation::optional_Info_info, protozero::pbf_wire_type::length_delimited): if (m_read_metadata == osmium::io::read_meta::yes) { @@ -478,13 +568,22 @@ namespace osmium { } break; case protozero::tag_and_type(OSMFormat::Relation::packed_int32_roles_sid, protozero::pbf_wire_type::length_delimited): - roles = varint_range{pbf_relation.get_view()}; + roles = values_access_int32{pbf_relation.get_view()}; + break; + case protozero::tag_and_type(OSMFormat::Relation::packed_int32_roles_sid, protozero::pbf_wire_type::varint): + roles = values_access_int32{pbf_relation.get_int32()}; break; case protozero::tag_and_type(OSMFormat::Relation::packed_sint64_memids, protozero::pbf_wire_type::length_delimited): - refs = varint_range{pbf_relation.get_view()}; + refs = values_access_sint64{pbf_relation.get_view()}; + break; + case protozero::tag_and_type(OSMFormat::Relation::packed_sint64_memids, protozero::pbf_wire_type::varint): + refs = values_access_sint64{pbf_relation.get_sint64()}; break; case protozero::tag_and_type(OSMFormat::Relation::packed_MemberType_types, protozero::pbf_wire_type::length_delimited): - types = varint_range{pbf_relation.get_view()}; + types = values_access_int32{pbf_relation.get_view()}; + break; + case protozero::tag_and_type(OSMFormat::Relation::packed_MemberType_types, protozero::pbf_wire_type::varint): + types = values_access_int32{pbf_relation.get_int32()}; break; default: pbf_relation.skip(); @@ -514,7 +613,7 @@ namespace osmium { build_tag_list(builder, keys, vals); } - void build_tag_list_from_dense_nodes(osmium::builder::NodeBuilder& builder, varint_range& tags) { + void build_tag_list_from_dense_nodes(osmium::builder::NodeBuilder& builder, values_access_int32& tags) { osmium::builder::TagListBuilder tl_builder{builder}; while (!tags.empty()) { const auto idx = tags.next_int32(); @@ -531,25 +630,37 @@ namespace osmium { } void decode_dense_nodes_without_metadata(const data_view& data) { - varint_range ids; - varint_range lats; - varint_range lons; - varint_range tags; + values_access_sint64 ids; + values_access_sint64 lats; + values_access_sint64 lons; + values_access_int32 tags; protozero::pbf_message pbf_dense_nodes{data}; while (pbf_dense_nodes.next()) { switch (pbf_dense_nodes.tag_and_type()) { case protozero::tag_and_type(OSMFormat::DenseNodes::packed_sint64_id, protozero::pbf_wire_type::length_delimited): - ids = varint_range{pbf_dense_nodes.get_view()}; + ids = values_access_sint64{pbf_dense_nodes.get_view()}; + break; + case protozero::tag_and_type(OSMFormat::DenseNodes::packed_sint64_id, protozero::pbf_wire_type::varint): + ids = values_access_sint64{pbf_dense_nodes.get_sint64()}; break; case protozero::tag_and_type(OSMFormat::DenseNodes::packed_sint64_lat, protozero::pbf_wire_type::length_delimited): - lats = varint_range{pbf_dense_nodes.get_view()}; + lats = values_access_sint64{pbf_dense_nodes.get_view()}; + break; + case protozero::tag_and_type(OSMFormat::DenseNodes::packed_sint64_lat, protozero::pbf_wire_type::varint): + lats = values_access_sint64{pbf_dense_nodes.get_sint64()}; break; case protozero::tag_and_type(OSMFormat::DenseNodes::packed_sint64_lon, protozero::pbf_wire_type::length_delimited): - lons = varint_range{pbf_dense_nodes.get_view()}; + lons = values_access_sint64{pbf_dense_nodes.get_view()}; + break; + case protozero::tag_and_type(OSMFormat::DenseNodes::packed_sint64_lon, protozero::pbf_wire_type::varint): + lons = values_access_sint64{pbf_dense_nodes.get_sint64()}; break; case protozero::tag_and_type(OSMFormat::DenseNodes::packed_int32_keys_vals, protozero::pbf_wire_type::length_delimited): - tags = varint_range{pbf_dense_nodes.get_view()}; + tags = values_access_int32{pbf_dense_nodes.get_view()}; + break; + case protozero::tag_and_type(OSMFormat::DenseNodes::packed_int32_keys_vals, protozero::pbf_wire_type::varint): + tags = values_access_int32{pbf_dense_nodes.get_int32()}; break; default: pbf_dense_nodes.skip(); @@ -592,22 +703,25 @@ namespace osmium { void decode_dense_nodes(const data_view& data) { bool has_info = false; - varint_range ids; - varint_range lats; - varint_range lons; - varint_range tags; - varint_range versions; - varint_range timestamps; - varint_range changesets; - varint_range uids; - varint_range user_sids; - varint_range visibles; + values_access_sint64 ids; + values_access_sint64 lats; + values_access_sint64 lons; + values_access_int32 tags; + values_access_int32 versions; + values_access_sint64 timestamps; + values_access_sint64 changesets; + values_access_sint32 uids; + values_access_sint32 user_sids; + values_access_int32 visibles; protozero::pbf_message pbf_dense_nodes{data}; while (pbf_dense_nodes.next()) { switch (pbf_dense_nodes.tag_and_type()) { case protozero::tag_and_type(OSMFormat::DenseNodes::packed_sint64_id, protozero::pbf_wire_type::length_delimited): - ids = varint_range{pbf_dense_nodes.get_view()}; + ids = values_access_sint64{pbf_dense_nodes.get_view()}; + break; + case protozero::tag_and_type(OSMFormat::DenseNodes::packed_sint64_id, protozero::pbf_wire_type::varint): + ids = values_access_sint64{pbf_dense_nodes.get_sint64()}; break; case protozero::tag_and_type(OSMFormat::DenseNodes::optional_DenseInfo_denseinfo, protozero::pbf_wire_type::length_delimited): { @@ -616,22 +730,40 @@ namespace osmium { while (pbf_dense_info.next()) { switch (pbf_dense_info.tag_and_type()) { case protozero::tag_and_type(OSMFormat::DenseInfo::packed_int32_version, protozero::pbf_wire_type::length_delimited): - versions = varint_range{pbf_dense_info.get_view()}; + versions = values_access_int32{pbf_dense_info.get_view()}; + break; + case protozero::tag_and_type(OSMFormat::DenseInfo::packed_int32_version, protozero::pbf_wire_type::varint): + versions = values_access_int32{pbf_dense_info.get_int32()}; break; case protozero::tag_and_type(OSMFormat::DenseInfo::packed_sint64_timestamp, protozero::pbf_wire_type::length_delimited): - timestamps = varint_range{pbf_dense_info.get_view()}; + timestamps = values_access_sint64{pbf_dense_info.get_view()}; + break; + case protozero::tag_and_type(OSMFormat::DenseInfo::packed_sint64_timestamp, protozero::pbf_wire_type::varint): + timestamps = values_access_sint64{pbf_dense_info.get_sint64()}; break; case protozero::tag_and_type(OSMFormat::DenseInfo::packed_sint64_changeset, protozero::pbf_wire_type::length_delimited): - changesets = varint_range{pbf_dense_info.get_view()}; + changesets = values_access_sint64{pbf_dense_info.get_view()}; + break; + case protozero::tag_and_type(OSMFormat::DenseInfo::packed_sint64_changeset, protozero::pbf_wire_type::varint): + changesets = values_access_sint64{pbf_dense_info.get_sint64()}; break; case protozero::tag_and_type(OSMFormat::DenseInfo::packed_sint32_uid, protozero::pbf_wire_type::length_delimited): - uids = varint_range{pbf_dense_info.get_view()}; + uids = values_access_sint32{pbf_dense_info.get_view()}; + break; + case protozero::tag_and_type(OSMFormat::DenseInfo::packed_sint32_uid, protozero::pbf_wire_type::varint): + uids = values_access_sint32{pbf_dense_info.get_sint32()}; break; case protozero::tag_and_type(OSMFormat::DenseInfo::packed_sint32_user_sid, protozero::pbf_wire_type::length_delimited): - user_sids = varint_range{pbf_dense_info.get_view()}; + user_sids = values_access_sint32{pbf_dense_info.get_view()}; + break; + case protozero::tag_and_type(OSMFormat::DenseInfo::packed_sint32_user_sid, protozero::pbf_wire_type::varint): + user_sids = values_access_sint32{pbf_dense_info.get_sint32()}; break; case protozero::tag_and_type(OSMFormat::DenseInfo::packed_bool_visible, protozero::pbf_wire_type::length_delimited): - visibles = varint_range{pbf_dense_info.get_view()}; + visibles = values_access_int32{pbf_dense_info.get_view()}; + break; + case protozero::tag_and_type(OSMFormat::DenseInfo::packed_bool_visible, protozero::pbf_wire_type::varint): + visibles = values_access_int32{pbf_dense_info.get_int32()}; break; default: pbf_dense_info.skip(); @@ -640,13 +772,22 @@ namespace osmium { } break; case protozero::tag_and_type(OSMFormat::DenseNodes::packed_sint64_lat, protozero::pbf_wire_type::length_delimited): - lats = varint_range{pbf_dense_nodes.get_view()}; + lats = values_access_sint64{pbf_dense_nodes.get_view()}; + break; + case protozero::tag_and_type(OSMFormat::DenseNodes::packed_sint64_lat, protozero::pbf_wire_type::varint): + lats = values_access_sint64{pbf_dense_nodes.get_sint64()}; break; case protozero::tag_and_type(OSMFormat::DenseNodes::packed_sint64_lon, protozero::pbf_wire_type::length_delimited): - lons = varint_range{pbf_dense_nodes.get_view()}; + lons = values_access_sint64{pbf_dense_nodes.get_view()}; + break; + case protozero::tag_and_type(OSMFormat::DenseNodes::packed_sint64_lon, protozero::pbf_wire_type::varint): + lons = values_access_sint64{pbf_dense_nodes.get_sint64()}; break; case protozero::tag_and_type(OSMFormat::DenseNodes::packed_int32_keys_vals, protozero::pbf_wire_type::length_delimited): - tags = varint_range{pbf_dense_nodes.get_view()}; + tags = values_access_int32{pbf_dense_nodes.get_view()}; + break; + case protozero::tag_and_type(OSMFormat::DenseNodes::packed_int32_keys_vals, protozero::pbf_wire_type::varint): + tags = values_access_int32{pbf_dense_nodes.get_int32()}; break; default: pbf_dense_nodes.skip(); diff --git a/contrib/libosmium/include/osmium/io/detail/pbf_input_format.hpp b/contrib/libosmium/include/osmium/io/detail/pbf_input_format.hpp index fc4b70d18..abac957c7 100644 --- a/contrib/libosmium/include/osmium/io/detail/pbf_input_format.hpp +++ b/contrib/libosmium/include/osmium/io/detail/pbf_input_format.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -124,6 +124,11 @@ namespace osmium { if (!osmium::io::detail::read_exactly(m_fd, buffer.data(), static_cast(buffer.size()))) { return 0; // EOF } + + if (m_offset_ptr) { + *m_offset_ptr += buffer.size(); + } + return check_size(get_size_in_network_byte_order(buffer.data())); } @@ -210,6 +215,10 @@ namespace osmium { if (!osmium::io::detail::read_exactly(m_fd, &*buffer.begin(), static_cast(size))) { throw osmium::pbf_error{"unexpected EOF"}; } + + if (m_offset_ptr) { + *m_offset_ptr += buffer.size(); + } } else { ensure_available_in_input_queue(size); buffer.append(m_input_buffer, 0, size); diff --git a/contrib/libosmium/include/osmium/io/detail/pbf_output_format.hpp b/contrib/libosmium/include/osmium/io/detail/pbf_output_format.hpp index 4834475c0..05f11c3fc 100644 --- a/contrib/libosmium/include/osmium/io/detail/pbf_output_format.hpp +++ b/contrib/libosmium/include/osmium/io/detail/pbf_output_format.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/protobuf_tags.hpp b/contrib/libosmium/include/osmium/io/detail/protobuf_tags.hpp index 50e09fc18..f337aefb3 100644 --- a/contrib/libosmium/include/osmium/io/detail/protobuf_tags.hpp +++ b/contrib/libosmium/include/osmium/io/detail/protobuf_tags.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/queue_util.hpp b/contrib/libosmium/include/osmium/io/detail/queue_util.hpp index 5bffb1e00..fc4870661 100644 --- a/contrib/libosmium/include/osmium/io/detail/queue_util.hpp +++ b/contrib/libosmium/include/osmium/io/detail/queue_util.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/read_thread.hpp b/contrib/libosmium/include/osmium/io/detail/read_thread.hpp index cf92440df..66e24e4e1 100644 --- a/contrib/libosmium/include/osmium/io/detail/read_thread.hpp +++ b/contrib/libosmium/include/osmium/io/detail/read_thread.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/read_write.hpp b/contrib/libosmium/include/osmium/io/detail/read_write.hpp index dffc6e7ec..f4b1913c5 100644 --- a/contrib/libosmium/include/osmium/io/detail/read_write.hpp +++ b/contrib/libosmium/include/osmium/io/detail/read_write.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -104,6 +104,9 @@ namespace osmium { #endif if (filename.empty() || filename == "-") { +#ifdef _WIN32 + _setmode(0, _O_BINARY); +#endif return 0; // stdin } diff --git a/contrib/libosmium/include/osmium/io/detail/string_table.hpp b/contrib/libosmium/include/osmium/io/detail/string_table.hpp index 5045c8d6c..5854e17ed 100644 --- a/contrib/libosmium/include/osmium/io/detail/string_table.hpp +++ b/contrib/libosmium/include/osmium/io/detail/string_table.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/string_util.hpp b/contrib/libosmium/include/osmium/io/detail/string_util.hpp index 381e84aed..038a5194f 100644 --- a/contrib/libosmium/include/osmium/io/detail/string_util.hpp +++ b/contrib/libosmium/include/osmium/io/detail/string_util.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/write_thread.hpp b/contrib/libosmium/include/osmium/io/detail/write_thread.hpp index 8f00896d8..166e8cb2d 100644 --- a/contrib/libosmium/include/osmium/io/detail/write_thread.hpp +++ b/contrib/libosmium/include/osmium/io/detail/write_thread.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/xml_input_format.hpp b/contrib/libosmium/include/osmium/io/detail/xml_input_format.hpp index bf5e8c61f..fc966a7a8 100644 --- a/contrib/libosmium/include/osmium/io/detail/xml_input_format.hpp +++ b/contrib/libosmium/include/osmium/io/detail/xml_input_format.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/xml_output_format.hpp b/contrib/libosmium/include/osmium/io/detail/xml_output_format.hpp index 88a4a0b29..1ba57f2fe 100644 --- a/contrib/libosmium/include/osmium/io/detail/xml_output_format.hpp +++ b/contrib/libosmium/include/osmium/io/detail/xml_output_format.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/zlib.hpp b/contrib/libosmium/include/osmium/io/detail/zlib.hpp index 502fe9d35..c0329b597 100644 --- a/contrib/libosmium/include/osmium/io/detail/zlib.hpp +++ b/contrib/libosmium/include/osmium/io/detail/zlib.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/error.hpp b/contrib/libosmium/include/osmium/io/error.hpp index eabdcde39..97b94573e 100644 --- a/contrib/libosmium/include/osmium/io/error.hpp +++ b/contrib/libosmium/include/osmium/io/error.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/file.hpp b/contrib/libosmium/include/osmium/io/file.hpp index 7c8e6345a..678038015 100644 --- a/contrib/libosmium/include/osmium/io/file.hpp +++ b/contrib/libosmium/include/osmium/io/file.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/file_compression.hpp b/contrib/libosmium/include/osmium/io/file_compression.hpp index 79f20e34d..6c6010a0d 100644 --- a/contrib/libosmium/include/osmium/io/file_compression.hpp +++ b/contrib/libosmium/include/osmium/io/file_compression.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/file_format.hpp b/contrib/libosmium/include/osmium/io/file_format.hpp index 35fbb46a9..a981866f8 100644 --- a/contrib/libosmium/include/osmium/io/file_format.hpp +++ b/contrib/libosmium/include/osmium/io/file_format.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/gzip_compression.hpp b/contrib/libosmium/include/osmium/io/gzip_compression.hpp index ed7fa2b6e..1060bcbbe 100644 --- a/contrib/libosmium/include/osmium/io/gzip_compression.hpp +++ b/contrib/libosmium/include/osmium/io/gzip_compression.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/header.hpp b/contrib/libosmium/include/osmium/io/header.hpp index 9c2903111..4e495c45d 100644 --- a/contrib/libosmium/include/osmium/io/header.hpp +++ b/contrib/libosmium/include/osmium/io/header.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/ids_output.hpp b/contrib/libosmium/include/osmium/io/ids_output.hpp index fe09c5f59..8caf5b1b0 100644 --- a/contrib/libosmium/include/osmium/io/ids_output.hpp +++ b/contrib/libosmium/include/osmium/io/ids_output.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/input_iterator.hpp b/contrib/libosmium/include/osmium/io/input_iterator.hpp index e8196268e..2bd40b6e0 100644 --- a/contrib/libosmium/include/osmium/io/input_iterator.hpp +++ b/contrib/libosmium/include/osmium/io/input_iterator.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/o5m_input.hpp b/contrib/libosmium/include/osmium/io/o5m_input.hpp index e2df6fcd0..5d70c77ff 100644 --- a/contrib/libosmium/include/osmium/io/o5m_input.hpp +++ b/contrib/libosmium/include/osmium/io/o5m_input.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/opl_input.hpp b/contrib/libosmium/include/osmium/io/opl_input.hpp index bde901863..8641ffd46 100644 --- a/contrib/libosmium/include/osmium/io/opl_input.hpp +++ b/contrib/libosmium/include/osmium/io/opl_input.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/opl_output.hpp b/contrib/libosmium/include/osmium/io/opl_output.hpp index 521dac34a..445bf5f19 100644 --- a/contrib/libosmium/include/osmium/io/opl_output.hpp +++ b/contrib/libosmium/include/osmium/io/opl_output.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/output_iterator.hpp b/contrib/libosmium/include/osmium/io/output_iterator.hpp index 7aeb75089..84a3ff085 100644 --- a/contrib/libosmium/include/osmium/io/output_iterator.hpp +++ b/contrib/libosmium/include/osmium/io/output_iterator.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/overwrite.hpp b/contrib/libosmium/include/osmium/io/overwrite.hpp index 37c011d3e..87132a9ca 100644 --- a/contrib/libosmium/include/osmium/io/overwrite.hpp +++ b/contrib/libosmium/include/osmium/io/overwrite.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/pbf.hpp b/contrib/libosmium/include/osmium/io/pbf.hpp index 2205b9de9..96b0c3045 100644 --- a/contrib/libosmium/include/osmium/io/pbf.hpp +++ b/contrib/libosmium/include/osmium/io/pbf.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/pbf_input.hpp b/contrib/libosmium/include/osmium/io/pbf_input.hpp index e2a1f2b80..cd5472d18 100644 --- a/contrib/libosmium/include/osmium/io/pbf_input.hpp +++ b/contrib/libosmium/include/osmium/io/pbf_input.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/pbf_output.hpp b/contrib/libosmium/include/osmium/io/pbf_output.hpp index 83f1048b0..34ab804d7 100644 --- a/contrib/libosmium/include/osmium/io/pbf_output.hpp +++ b/contrib/libosmium/include/osmium/io/pbf_output.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/reader.hpp b/contrib/libosmium/include/osmium/io/reader.hpp index 2e63bc6b1..835279760 100644 --- a/contrib/libosmium/include/osmium/io/reader.hpp +++ b/contrib/libosmium/include/osmium/io/reader.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/reader_iterator.hpp b/contrib/libosmium/include/osmium/io/reader_iterator.hpp index 632cbbbe7..c989f3ca3 100644 --- a/contrib/libosmium/include/osmium/io/reader_iterator.hpp +++ b/contrib/libosmium/include/osmium/io/reader_iterator.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/reader_with_progress_bar.hpp b/contrib/libosmium/include/osmium/io/reader_with_progress_bar.hpp index 88323488a..d332b667f 100644 --- a/contrib/libosmium/include/osmium/io/reader_with_progress_bar.hpp +++ b/contrib/libosmium/include/osmium/io/reader_with_progress_bar.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/writer.hpp b/contrib/libosmium/include/osmium/io/writer.hpp index 52346a379..3a2731923 100644 --- a/contrib/libosmium/include/osmium/io/writer.hpp +++ b/contrib/libosmium/include/osmium/io/writer.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/writer_options.hpp b/contrib/libosmium/include/osmium/io/writer_options.hpp index dddb2918e..8e90a3073 100644 --- a/contrib/libosmium/include/osmium/io/writer_options.hpp +++ b/contrib/libosmium/include/osmium/io/writer_options.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/xml_input.hpp b/contrib/libosmium/include/osmium/io/xml_input.hpp index 8681a4736..3a90cf528 100644 --- a/contrib/libosmium/include/osmium/io/xml_input.hpp +++ b/contrib/libosmium/include/osmium/io/xml_input.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/xml_output.hpp b/contrib/libosmium/include/osmium/io/xml_output.hpp index 3110c4317..4b69d9ac1 100644 --- a/contrib/libosmium/include/osmium/io/xml_output.hpp +++ b/contrib/libosmium/include/osmium/io/xml_output.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/memory/buffer.hpp b/contrib/libosmium/include/osmium/memory/buffer.hpp index a1fe3c168..6645d555a 100644 --- a/contrib/libosmium/include/osmium/memory/buffer.hpp +++ b/contrib/libosmium/include/osmium/memory/buffer.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -343,8 +343,8 @@ namespace osmium { } /** - * Returns the number of bytes currently filled in this buffer that - * are not yet committed. + * Returns the number of bytes currently filled in this buffer. + * This includes committed and not yet committed bytes. * Always returns 0 on invalid buffers. */ std::size_t written() const noexcept { diff --git a/contrib/libosmium/include/osmium/memory/callback_buffer.hpp b/contrib/libosmium/include/osmium/memory/callback_buffer.hpp index 4c55b8146..102f43eeb 100644 --- a/contrib/libosmium/include/osmium/memory/callback_buffer.hpp +++ b/contrib/libosmium/include/osmium/memory/callback_buffer.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/memory/collection.hpp b/contrib/libosmium/include/osmium/memory/collection.hpp index 01b127dc3..5dab5aaf7 100644 --- a/contrib/libosmium/include/osmium/memory/collection.hpp +++ b/contrib/libosmium/include/osmium/memory/collection.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -35,6 +35,7 @@ DEALINGS IN THE SOFTWARE. #include +#include #include #include #include diff --git a/contrib/libosmium/include/osmium/memory/item.hpp b/contrib/libosmium/include/osmium/memory/item.hpp index 19e9e5bcb..fbf1f8a84 100644 --- a/contrib/libosmium/include/osmium/memory/item.hpp +++ b/contrib/libosmium/include/osmium/memory/item.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/memory/item_iterator.hpp b/contrib/libosmium/include/osmium/memory/item_iterator.hpp index 132bb8ea2..14de17b44 100644 --- a/contrib/libosmium/include/osmium/memory/item_iterator.hpp +++ b/contrib/libosmium/include/osmium/memory/item_iterator.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/object_pointer_collection.hpp b/contrib/libosmium/include/osmium/object_pointer_collection.hpp index 4a03f5a42..50f634a43 100644 --- a/contrib/libosmium/include/osmium/object_pointer_collection.hpp +++ b/contrib/libosmium/include/osmium/object_pointer_collection.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/opl.hpp b/contrib/libosmium/include/osmium/opl.hpp index d4d280241..86025b348 100644 --- a/contrib/libosmium/include/osmium/opl.hpp +++ b/contrib/libosmium/include/osmium/opl.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm.hpp b/contrib/libosmium/include/osmium/osm.hpp index 23e2b7537..3bded0674 100644 --- a/contrib/libosmium/include/osmium/osm.hpp +++ b/contrib/libosmium/include/osmium/osm.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/area.hpp b/contrib/libosmium/include/osmium/osm/area.hpp index 1d3fa603a..5aa4f5f42 100644 --- a/contrib/libosmium/include/osmium/osm/area.hpp +++ b/contrib/libosmium/include/osmium/osm/area.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/box.hpp b/contrib/libosmium/include/osmium/osm/box.hpp index 5ad763932..3de1db5dc 100644 --- a/contrib/libosmium/include/osmium/osm/box.hpp +++ b/contrib/libosmium/include/osmium/osm/box.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/changeset.hpp b/contrib/libosmium/include/osmium/osm/changeset.hpp index bf9030d96..4a1d8598f 100644 --- a/contrib/libosmium/include/osmium/osm/changeset.hpp +++ b/contrib/libosmium/include/osmium/osm/changeset.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/crc.hpp b/contrib/libosmium/include/osmium/osm/crc.hpp index 508e361f6..55f909723 100644 --- a/contrib/libosmium/include/osmium/osm/crc.hpp +++ b/contrib/libosmium/include/osmium/osm/crc.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/crc_zlib.hpp b/contrib/libosmium/include/osmium/osm/crc_zlib.hpp index 3b300463a..8297ba00f 100644 --- a/contrib/libosmium/include/osmium/osm/crc_zlib.hpp +++ b/contrib/libosmium/include/osmium/osm/crc_zlib.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/diff_object.hpp b/contrib/libosmium/include/osmium/osm/diff_object.hpp index 393234250..5e9f5654e 100644 --- a/contrib/libosmium/include/osmium/osm/diff_object.hpp +++ b/contrib/libosmium/include/osmium/osm/diff_object.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/entity.hpp b/contrib/libosmium/include/osmium/osm/entity.hpp index 16534c78b..8515513b8 100644 --- a/contrib/libosmium/include/osmium/osm/entity.hpp +++ b/contrib/libosmium/include/osmium/osm/entity.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/entity_bits.hpp b/contrib/libosmium/include/osmium/osm/entity_bits.hpp index f082cd9f9..f1b0d5503 100644 --- a/contrib/libosmium/include/osmium/osm/entity_bits.hpp +++ b/contrib/libosmium/include/osmium/osm/entity_bits.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -45,6 +45,8 @@ namespace osmium { */ namespace osm_entity_bits { + // NOLINTBEGIN(clang-analyzer-optin.core.EnumCastOutOfRange) + /** * Describes zero or more OSM entities. * @@ -123,6 +125,8 @@ namespace osmium { return static_cast(1U << (ut - 1U)); } + // NOLINTEND(clang-analyzer-optin.core.EnumCastOutOfRange) + } // namespace osm_entity_bits } // namespace osmium diff --git a/contrib/libosmium/include/osmium/osm/item_type.hpp b/contrib/libosmium/include/osmium/osm/item_type.hpp index 3556bb4f0..0d462254a 100644 --- a/contrib/libosmium/include/osmium/osm/item_type.hpp +++ b/contrib/libosmium/include/osmium/osm/item_type.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/location.hpp b/contrib/libosmium/include/osmium/osm/location.hpp index 2fcf75f30..36072d184 100644 --- a/contrib/libosmium/include/osmium/osm/location.hpp +++ b/contrib/libosmium/include/osmium/osm/location.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -34,6 +34,7 @@ DEALINGS IN THE SOFTWARE. */ #include +#include #include #include #include @@ -267,6 +268,13 @@ namespace osmium { * * Coordinates are never checked on whether they are inside bounds. * Call valid() to check this. + * + * If the macro OSMIUM_LOCATION_WITH_EXTRA_BIT is defined, Location values + * can store one extra bit of information, because one bit is not needed + * for the y coordinate. Use the functions set/clear/toggle/get_extra_bit() + * to access it. The extra bit will always be cleared for new locations or + * by setting the y coordinate of a location. You can not store an extra + * bit on an invalid location. */ class Location { @@ -277,6 +285,31 @@ namespace osmium { return static_cast(detail::coordinate_precision); } +#ifdef OSMIUM_LOCATION_WITH_EXTRA_BIT + + /** + * For normal y coordinates, bit 30 is always equal to bit 31. So + * we can use that to store one extra piece of information. + */ + enum { + mask_b30 = 1UL << 30UL + }; + + static constexpr int32_t remove_extra_bit(int32_t v) noexcept { + if (v == undefined_coordinate) { + return v; + } + auto const value = static_cast(v); + auto const n30 = value & ~mask_b30; + auto const b30 = (value >> 1UL) & mask_b30; + return static_cast(n30 | b30); + } +#else + static constexpr int32_t remove_extra_bit(int32_t v) noexcept { + return v; + } +#endif + public: // this value is used for a coordinate to mark it as undefined @@ -310,7 +343,7 @@ namespace osmium { */ constexpr Location(const int32_t x, const int32_t y) noexcept : m_x(x), - m_y(y) { + m_y(remove_extra_bit(y)) { } /** @@ -320,7 +353,7 @@ namespace osmium { */ constexpr Location(const int64_t x, const int64_t y) noexcept : m_x(static_cast(x)), - m_y(static_cast(y)) { + m_y(remove_extra_bit(static_cast(y))) { } /** @@ -329,14 +362,14 @@ namespace osmium { */ Location(const double lon, const double lat) : m_x(double_to_fix(lon)), - m_y(double_to_fix(lat)) { + m_y(remove_extra_bit(double_to_fix(lat))) { } /** * Check whether the coordinates of this location * are defined. * - * @deprecated Use is_defined() or is_undefined() or is_valid() which + * @deprecated Use is_defined() or is_undefined() or valid() which * have all slightly different meanings. */ explicit constexpr operator bool() const noexcept { @@ -350,16 +383,16 @@ namespace osmium { * See also is_defined() and is_undefined(). */ constexpr bool valid() const noexcept { - return m_x >= -180 * precision() - && m_x <= 180 * precision() - && m_y >= -90 * precision() - && m_y <= 90 * precision(); + return x() >= -180 * precision() + && x() <= 180 * precision() + && y() >= -90 * precision() + && y() <= 90 * precision(); } /** * Returns true if at least one of the coordinates is defined. * - * See also is_undefined() and is_valid(). + * See also is_undefined() and valid(). */ constexpr bool is_defined() const noexcept { return m_x != undefined_coordinate || m_y != undefined_coordinate; @@ -368,7 +401,7 @@ namespace osmium { /** * Returns true if both coordinates are undefined. * - * See also is_defined() and is_valid(). + * See also is_defined() and valid(). */ constexpr bool is_undefined() const noexcept { return m_x == undefined_coordinate && m_y == undefined_coordinate; @@ -379,7 +412,7 @@ namespace osmium { } constexpr int32_t y() const noexcept { - return m_y; + return remove_extra_bit(m_y); } Location& set_x(const int32_t x) noexcept { @@ -387,8 +420,13 @@ namespace osmium { return *this; } + /** + * Set the y coordinate of the location. + * + * This will always clear the extra bit. + */ Location& set_y(const int32_t y) noexcept { - m_y = y; + m_y = remove_extra_bit(y); return *this; } @@ -401,14 +439,14 @@ namespace osmium { if (!valid()) { throw osmium::invalid_location{"invalid location"}; } - return fix_to_double(m_x); + return fix_to_double(x()); } /** * Get longitude without checking the validity. */ double lon_without_check() const noexcept { - return fix_to_double(m_x); + return fix_to_double(x()); } /** @@ -420,24 +458,22 @@ namespace osmium { if (!valid()) { throw osmium::invalid_location{"invalid location"}; } - return fix_to_double(m_y); + return fix_to_double(y()); } /** * Get latitude without checking the validity. */ double lat_without_check() const noexcept { - return fix_to_double(m_y); + return fix_to_double(y()); } Location& set_lon(double lon) noexcept { - m_x = double_to_fix(lon); - return *this; + return set_x(double_to_fix(lon)); } Location& set_lat(double lat) noexcept { - m_y = double_to_fix(lat); - return *this; + return set_y(double_to_fix(lat)); } Location& set_lon(const char* str) { @@ -446,8 +482,7 @@ namespace osmium { if (**data != '\0') { throw invalid_location{std::string{"characters after coordinate: '"} + *data + "'"}; } - m_x = value; - return *this; + return set_x(value); } Location& set_lat(const char* str) { @@ -456,18 +491,15 @@ namespace osmium { if (**data != '\0') { throw invalid_location{std::string{"characters after coordinate: '"} + *data + "'"}; } - m_y = value; - return *this; + return set_y(value); } Location& set_lon_partial(const char** str) { - m_x = detail::string_to_location_coordinate(str); - return *this; + return set_x(detail::string_to_location_coordinate(str)); } Location& set_lat_partial(const char** str) { - m_y = detail::string_to_location_coordinate(str); - return *this; + return set_y(detail::string_to_location_coordinate(str)); } template @@ -485,6 +517,73 @@ namespace osmium { return as_string_without_check(iterator, separator); } +#ifdef OSMIUM_LOCATION_WITH_EXTRA_BIT + /** + * Get extra bit from location. + */ + constexpr bool get_extra_bit() const noexcept { + assert(m_y != undefined_coordinate); + + auto const b = static_cast(m_y); + auto const b31 = b >> 31UL; + auto const b30 = (b >> 30UL) & 1UL; + return b30 ^ b31; + } + + /** + * Set extra bit on location. + * + * @pre valid() + */ + constexpr void set_extra_bit() noexcept { + assert(m_y != undefined_coordinate); + + auto const b = static_cast(m_y); + auto const n30 = b & ~mask_b30; + auto const b30 = (~b >> 1UL) & mask_b30; + m_y = static_cast(n30 | b30); + } + + /** + * Set or clear extra bit on location. + * + * @pre valid() + */ + constexpr void set_extra_bit(bool value) noexcept { + assert(m_y != undefined_coordinate); + + auto const b = static_cast(m_y); + auto const n30 = b & ~mask_b30; + auto const b30 = ((b >> 31UL) ^ value) << 30UL; + m_y = static_cast(n30 | b30); + } + + /** + * Clear extra bit on location. + * + * @pre valid() + */ + constexpr void clear_extra_bit() noexcept { + assert(m_y != undefined_coordinate); + + m_y = y(); + } + + /** + * Toggle extra bit on location. + * + * @pre valid() + */ + constexpr void toggle_extra_bit() noexcept { + assert(m_y != undefined_coordinate); + + auto const b = static_cast(m_y); + auto const n30 = b & ~mask_b30; + auto const b30 = ~b & mask_b30; + m_y = static_cast(n30 | b30); + } +#endif + }; // class Location /** diff --git a/contrib/libosmium/include/osmium/osm/metadata_options.hpp b/contrib/libosmium/include/osmium/osm/metadata_options.hpp index 85d05fea3..1552886f0 100644 --- a/contrib/libosmium/include/osmium/osm/metadata_options.hpp +++ b/contrib/libosmium/include/osmium/osm/metadata_options.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -42,6 +42,8 @@ DEALINGS IN THE SOFTWARE. namespace osmium { + // NOLINTBEGIN(clang-analyzer-optin.core.EnumCastOutOfRange) + /** * Describes which metadata fields are available in an OSMObject. This is * most often used to describe which metadata fields are available in the @@ -219,6 +221,8 @@ namespace osmium { }; // class metadata_options + // NOLINTEND(clang-analyzer-optin.core.EnumCastOutOfRange) + template inline std::basic_ostream& operator<<(std::basic_ostream& out, const metadata_options& options) { return out << options.to_string(); diff --git a/contrib/libosmium/include/osmium/osm/node.hpp b/contrib/libosmium/include/osmium/osm/node.hpp index fa3544f66..773a43d18 100644 --- a/contrib/libosmium/include/osmium/osm/node.hpp +++ b/contrib/libosmium/include/osmium/osm/node.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/node_ref.hpp b/contrib/libosmium/include/osmium/osm/node_ref.hpp index bb8138f0c..0b33c3ab1 100644 --- a/contrib/libosmium/include/osmium/osm/node_ref.hpp +++ b/contrib/libosmium/include/osmium/osm/node_ref.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/node_ref_list.hpp b/contrib/libosmium/include/osmium/osm/node_ref_list.hpp index ba8bbe3e0..a7e495f7d 100644 --- a/contrib/libosmium/include/osmium/osm/node_ref_list.hpp +++ b/contrib/libosmium/include/osmium/osm/node_ref_list.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/object.hpp b/contrib/libosmium/include/osmium/osm/object.hpp index 38c17f244..80d93740e 100644 --- a/contrib/libosmium/include/osmium/osm/object.hpp +++ b/contrib/libosmium/include/osmium/osm/object.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/object_comparisons.hpp b/contrib/libosmium/include/osmium/osm/object_comparisons.hpp index eff811fd0..96a5ca7ef 100644 --- a/contrib/libosmium/include/osmium/osm/object_comparisons.hpp +++ b/contrib/libosmium/include/osmium/osm/object_comparisons.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/relation.hpp b/contrib/libosmium/include/osmium/osm/relation.hpp index c457b5fae..f0eb060c5 100644 --- a/contrib/libosmium/include/osmium/osm/relation.hpp +++ b/contrib/libosmium/include/osmium/osm/relation.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/segment.hpp b/contrib/libosmium/include/osmium/osm/segment.hpp index 04598d180..c037c1aaf 100644 --- a/contrib/libosmium/include/osmium/osm/segment.hpp +++ b/contrib/libosmium/include/osmium/osm/segment.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/tag.hpp b/contrib/libosmium/include/osmium/osm/tag.hpp index e1538a9ae..40c00dbce 100644 --- a/contrib/libosmium/include/osmium/osm/tag.hpp +++ b/contrib/libosmium/include/osmium/osm/tag.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/timestamp.hpp b/contrib/libosmium/include/osmium/osm/timestamp.hpp index f91747448..38a908ff5 100644 --- a/contrib/libosmium/include/osmium/osm/timestamp.hpp +++ b/contrib/libosmium/include/osmium/osm/timestamp.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/types.hpp b/contrib/libosmium/include/osmium/osm/types.hpp index 154329d7a..3403f5c61 100644 --- a/contrib/libosmium/include/osmium/osm/types.hpp +++ b/contrib/libosmium/include/osmium/osm/types.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/types_from_string.hpp b/contrib/libosmium/include/osmium/osm/types_from_string.hpp index 8471a7f16..b2ee7b84d 100644 --- a/contrib/libosmium/include/osmium/osm/types_from_string.hpp +++ b/contrib/libosmium/include/osmium/osm/types_from_string.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/undirected_segment.hpp b/contrib/libosmium/include/osmium/osm/undirected_segment.hpp index ad68e2f0b..2123b3d90 100644 --- a/contrib/libosmium/include/osmium/osm/undirected_segment.hpp +++ b/contrib/libosmium/include/osmium/osm/undirected_segment.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/way.hpp b/contrib/libosmium/include/osmium/osm/way.hpp index 71f535910..3fdfcf06f 100644 --- a/contrib/libosmium/include/osmium/osm/way.hpp +++ b/contrib/libosmium/include/osmium/osm/way.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/relations/collector.hpp b/contrib/libosmium/include/osmium/relations/collector.hpp index e61574936..4648a92f7 100644 --- a/contrib/libosmium/include/osmium/relations/collector.hpp +++ b/contrib/libosmium/include/osmium/relations/collector.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/relations/detail/member_meta.hpp b/contrib/libosmium/include/osmium/relations/detail/member_meta.hpp index 3df887b66..6b467b8de 100644 --- a/contrib/libosmium/include/osmium/relations/detail/member_meta.hpp +++ b/contrib/libosmium/include/osmium/relations/detail/member_meta.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/relations/detail/relation_meta.hpp b/contrib/libosmium/include/osmium/relations/detail/relation_meta.hpp index 87678a70f..6bc6fc277 100644 --- a/contrib/libosmium/include/osmium/relations/detail/relation_meta.hpp +++ b/contrib/libosmium/include/osmium/relations/detail/relation_meta.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/relations/manager_util.hpp b/contrib/libosmium/include/osmium/relations/manager_util.hpp index 929c97dd5..94bd45b9a 100644 --- a/contrib/libosmium/include/osmium/relations/manager_util.hpp +++ b/contrib/libosmium/include/osmium/relations/manager_util.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/relations/members_database.hpp b/contrib/libosmium/include/osmium/relations/members_database.hpp index 1702658de..b743edffa 100644 --- a/contrib/libosmium/include/osmium/relations/members_database.hpp +++ b/contrib/libosmium/include/osmium/relations/members_database.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/relations/relations_database.hpp b/contrib/libosmium/include/osmium/relations/relations_database.hpp index e31d237e0..2fd01b27d 100644 --- a/contrib/libosmium/include/osmium/relations/relations_database.hpp +++ b/contrib/libosmium/include/osmium/relations/relations_database.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/relations/relations_manager.hpp b/contrib/libosmium/include/osmium/relations/relations_manager.hpp index 1bee78cce..d62933ccd 100644 --- a/contrib/libosmium/include/osmium/relations/relations_manager.hpp +++ b/contrib/libosmium/include/osmium/relations/relations_manager.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/storage/item_stash.hpp b/contrib/libosmium/include/osmium/storage/item_stash.hpp index e42836df9..a9a0142fb 100644 --- a/contrib/libosmium/include/osmium/storage/item_stash.hpp +++ b/contrib/libosmium/include/osmium/storage/item_stash.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/tags/filter.hpp b/contrib/libosmium/include/osmium/tags/filter.hpp index 45c5e6d6b..d061c0716 100644 --- a/contrib/libosmium/include/osmium/tags/filter.hpp +++ b/contrib/libosmium/include/osmium/tags/filter.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/tags/matcher.hpp b/contrib/libosmium/include/osmium/tags/matcher.hpp index 50eb110c8..0746a5468 100644 --- a/contrib/libosmium/include/osmium/tags/matcher.hpp +++ b/contrib/libosmium/include/osmium/tags/matcher.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/tags/taglist.hpp b/contrib/libosmium/include/osmium/tags/taglist.hpp index d5ec309a3..b61afa040 100644 --- a/contrib/libosmium/include/osmium/tags/taglist.hpp +++ b/contrib/libosmium/include/osmium/tags/taglist.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/tags/tags_filter.hpp b/contrib/libosmium/include/osmium/tags/tags_filter.hpp index 61d20e20c..608c1e878 100644 --- a/contrib/libosmium/include/osmium/tags/tags_filter.hpp +++ b/contrib/libosmium/include/osmium/tags/tags_filter.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -154,6 +154,49 @@ namespace osmium { using TagsFilter = TagsFilterBase; + /** + * Compare two lists of tags ignoring tags matching the filter. + * Tag lists must be ordered in a consistent way. + * The filter must return "false" for all tags that should be ignored. + */ + inline bool compare_tags(osmium::TagList const &tags1, + osmium::TagList const &tags2, + TagsFilter const &filter) + { + auto const end1 = tags1.cend(); + auto const end2 = tags2.cend(); + + auto it1 = tags1.cbegin(); + auto it2 = tags2.cbegin(); + + while (it1 != end1 && it2 != end2) { + if (!filter(*it1)) { + ++it1; + continue; + } + if (!filter(*it2)) { + ++it2; + continue; + } + if (*it1 == *it2) { + ++it1; + ++it2; + continue; + } + return false; + } + + while (it1 != end1 && !filter(*it1)) { + ++it1; + } + + while (it2 != end2 && !filter(*it2)) { + ++it2; + } + + return it1 == end1 && it2 == end2; + } + } // namespace osmium diff --git a/contrib/libosmium/include/osmium/thread/function_wrapper.hpp b/contrib/libosmium/include/osmium/thread/function_wrapper.hpp index d0ec3509d..0c1110155 100644 --- a/contrib/libosmium/include/osmium/thread/function_wrapper.hpp +++ b/contrib/libosmium/include/osmium/thread/function_wrapper.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/thread/pool.hpp b/contrib/libosmium/include/osmium/thread/pool.hpp index 059f761d3..de5f2716a 100644 --- a/contrib/libosmium/include/osmium/thread/pool.hpp +++ b/contrib/libosmium/include/osmium/thread/pool.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/thread/queue.hpp b/contrib/libosmium/include/osmium/thread/queue.hpp index 950b60227..574bef0b9 100644 --- a/contrib/libosmium/include/osmium/thread/queue.hpp +++ b/contrib/libosmium/include/osmium/thread/queue.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/thread/util.hpp b/contrib/libosmium/include/osmium/thread/util.hpp index 0817d93e1..9244f1e2c 100644 --- a/contrib/libosmium/include/osmium/thread/util.hpp +++ b/contrib/libosmium/include/osmium/thread/util.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/compatibility.hpp b/contrib/libosmium/include/osmium/util/compatibility.hpp index 1b6ac56d1..be7ac6399 100644 --- a/contrib/libosmium/include/osmium/util/compatibility.hpp +++ b/contrib/libosmium/include/osmium/util/compatibility.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/config.hpp b/contrib/libosmium/include/osmium/util/config.hpp index eaa887848..6ac37bee8 100644 --- a/contrib/libosmium/include/osmium/util/config.hpp +++ b/contrib/libosmium/include/osmium/util/config.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/delta.hpp b/contrib/libosmium/include/osmium/util/delta.hpp index 6033e6474..8a2eb672c 100644 --- a/contrib/libosmium/include/osmium/util/delta.hpp +++ b/contrib/libosmium/include/osmium/util/delta.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/double.hpp b/contrib/libosmium/include/osmium/util/double.hpp index 4e8dfb90b..01746dd44 100644 --- a/contrib/libosmium/include/osmium/util/double.hpp +++ b/contrib/libosmium/include/osmium/util/double.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/endian.hpp b/contrib/libosmium/include/osmium/util/endian.hpp index 17be6a2ff..e48e9aa51 100644 --- a/contrib/libosmium/include/osmium/util/endian.hpp +++ b/contrib/libosmium/include/osmium/util/endian.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/file.hpp b/contrib/libosmium/include/osmium/util/file.hpp index 1d7737e0c..20bfd1dfd 100644 --- a/contrib/libosmium/include/osmium/util/file.hpp +++ b/contrib/libosmium/include/osmium/util/file.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/iterator.hpp b/contrib/libosmium/include/osmium/util/iterator.hpp index 8fcb497e3..5236e8963 100644 --- a/contrib/libosmium/include/osmium/util/iterator.hpp +++ b/contrib/libosmium/include/osmium/util/iterator.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/memory.hpp b/contrib/libosmium/include/osmium/util/memory.hpp index 7ccb388c5..72cd4cc0f 100644 --- a/contrib/libosmium/include/osmium/util/memory.hpp +++ b/contrib/libosmium/include/osmium/util/memory.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/memory_mapping.hpp b/contrib/libosmium/include/osmium/util/memory_mapping.hpp index 38ca38ed7..7a73137e9 100644 --- a/contrib/libosmium/include/osmium/util/memory_mapping.hpp +++ b/contrib/libosmium/include/osmium/util/memory_mapping.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/minmax.hpp b/contrib/libosmium/include/osmium/util/minmax.hpp index 1f0931d4d..552ecd250 100644 --- a/contrib/libosmium/include/osmium/util/minmax.hpp +++ b/contrib/libosmium/include/osmium/util/minmax.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/misc.hpp b/contrib/libosmium/include/osmium/util/misc.hpp index 824e57131..4cdef5e87 100644 --- a/contrib/libosmium/include/osmium/util/misc.hpp +++ b/contrib/libosmium/include/osmium/util/misc.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/options.hpp b/contrib/libosmium/include/osmium/util/options.hpp index a31d9084a..5ff71506b 100644 --- a/contrib/libosmium/include/osmium/util/options.hpp +++ b/contrib/libosmium/include/osmium/util/options.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/progress_bar.hpp b/contrib/libosmium/include/osmium/util/progress_bar.hpp index 2329bdaa8..394ee8d8d 100644 --- a/contrib/libosmium/include/osmium/util/progress_bar.hpp +++ b/contrib/libosmium/include/osmium/util/progress_bar.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/string.hpp b/contrib/libosmium/include/osmium/util/string.hpp index 2a1557e83..c2474d345 100644 --- a/contrib/libosmium/include/osmium/util/string.hpp +++ b/contrib/libosmium/include/osmium/util/string.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/string_matcher.hpp b/contrib/libosmium/include/osmium/util/string_matcher.hpp index 1d11e1926..0f2fb8def 100644 --- a/contrib/libosmium/include/osmium/util/string_matcher.hpp +++ b/contrib/libosmium/include/osmium/util/string_matcher.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/timer.hpp b/contrib/libosmium/include/osmium/util/timer.hpp index 312c34536..0db68e9ea 100644 --- a/contrib/libosmium/include/osmium/util/timer.hpp +++ b/contrib/libosmium/include/osmium/util/timer.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/verbose_output.hpp b/contrib/libosmium/include/osmium/util/verbose_output.hpp index cfc774307..246033f72 100644 --- a/contrib/libosmium/include/osmium/util/verbose_output.hpp +++ b/contrib/libosmium/include/osmium/util/verbose_output.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/version.hpp b/contrib/libosmium/include/osmium/version.hpp index 585f999e2..549cca1b0 100644 --- a/contrib/libosmium/include/osmium/version.hpp +++ b/contrib/libosmium/include/osmium/version.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -37,11 +37,11 @@ DEALINGS IN THE SOFTWARE. #define LIBOSMIUM_VERSION_MAJOR 2 // NOLINTNEXTLINE(modernize-macro-to-enum) -#define LIBOSMIUM_VERSION_MINOR 22 +#define LIBOSMIUM_VERSION_MINOR 23 // NOLINTNEXTLINE(modernize-macro-to-enum) #define LIBOSMIUM_VERSION_PATCH 0 -#define LIBOSMIUM_VERSION_STRING "2.22.0" +#define LIBOSMIUM_VERSION_STRING "2.23.0" #endif // OSMIUM_VERSION_HPP diff --git a/contrib/libosmium/include/osmium/visitor.hpp b/contrib/libosmium/include/osmium/visitor.hpp index fdd5ce1c7..174a940bd 100644 --- a/contrib/libosmium/include/osmium/visitor.hpp +++ b/contrib/libosmium/include/osmium/visitor.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2025 Jochen Topf and others (see README). +Copyright 2013-2026 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003