Bump osmium to version 2.20.0 (#6997)
This commit is contained in:
committed by
GitHub
parent
676f6d4704
commit
09a716a9e5
+2
-2
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -213,7 +213,7 @@ namespace osmium {
|
||||
|
||||
// Now create the Area object and add the attributes and tags
|
||||
// from the relation.
|
||||
bool okay = create_area(out_buffer, relation, members);
|
||||
const bool okay = create_area(out_buffer, relation, members);
|
||||
if (okay) {
|
||||
out_buffer.commit();
|
||||
} else {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -124,15 +124,6 @@ namespace osmium {
|
||||
|
||||
AssemblerConfig() noexcept = default;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @deprecated Use default constructor and set values afterwards.
|
||||
*/
|
||||
explicit AssemblerConfig(ProblemReporter* pr, bool d = false) :
|
||||
problem_reporter(pr),
|
||||
debug_level(d) {
|
||||
}
|
||||
|
||||
}; // struct AssemblerConfig
|
||||
|
||||
} // namespace area
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -332,10 +332,10 @@ namespace osmium {
|
||||
if (!way.nodes().empty() && way.is_closed() && !way.tags().empty()) {
|
||||
const auto d = std::count_if(way.tags().cbegin(), way.tags().cend(), std::cref(filter()));
|
||||
if (d > 0) {
|
||||
osmium::tags::KeyFilter::iterator way_fi_begin(std::cref(filter()), way.tags().cbegin(), way.tags().cend());
|
||||
osmium::tags::KeyFilter::iterator way_fi_end(std::cref(filter()), way.tags().cend(), way.tags().cend());
|
||||
osmium::tags::KeyFilter::iterator area_fi_begin(std::cref(filter()), area_tags.cbegin(), area_tags.cend());
|
||||
osmium::tags::KeyFilter::iterator area_fi_end(std::cref(filter()), area_tags.cend(), area_tags.cend());
|
||||
const osmium::tags::KeyFilter::iterator way_fi_begin(std::cref(filter()), way.tags().cbegin(), way.tags().cend());
|
||||
const osmium::tags::KeyFilter::iterator way_fi_end(std::cref(filter()), way.tags().cend(), way.tags().cend());
|
||||
const osmium::tags::KeyFilter::iterator area_fi_begin(std::cref(filter()), area_tags.cbegin(), area_tags.cend());
|
||||
const osmium::tags::KeyFilter::iterator area_fi_end(std::cref(filter()), area_tags.cend(), area_tags.cend());
|
||||
#ifdef __cpp_lib_robust_nonmodifying_seq_ops
|
||||
if (!std::equal(way_fi_begin, way_fi_end, area_fi_begin, area_fi_end)) {
|
||||
#else
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -608,7 +608,7 @@ namespace osmium {
|
||||
|
||||
void create_rings_simple_case() {
|
||||
auto count_remaining = m_segment_list.size();
|
||||
for (slocation& sl : m_locations) {
|
||||
for (const slocation& sl : m_locations) {
|
||||
const NodeRefSegment& segment = m_segment_list[sl.item];
|
||||
if (!segment.is_done()) {
|
||||
count_remaining -= add_new_ring(sl);
|
||||
@@ -671,7 +671,7 @@ namespace osmium {
|
||||
std::cerr << " Trying to merge " << open_ring_its.size() << " open rings (try_to_merge)\n";
|
||||
}
|
||||
|
||||
std::vector<location_to_ring_map> xrings = create_location_to_ring_map(open_ring_its);
|
||||
const auto xrings = create_location_to_ring_map(open_ring_its);
|
||||
|
||||
auto it = xrings.cbegin();
|
||||
while (it != xrings.cend()) {
|
||||
@@ -825,7 +825,7 @@ namespace osmium {
|
||||
|
||||
find_inner_outer_complex();
|
||||
ProtoRing* outer_ring = find_enclosing_ring(ring_min->ring().min_segment());
|
||||
bool ring_min_is_outer = !outer_ring;
|
||||
const bool ring_min_is_outer = !outer_ring;
|
||||
if (debug()) {
|
||||
std::cerr << " Open ring is " << (ring_min_is_outer ? "outer" : "inner") << " ring\n";
|
||||
}
|
||||
@@ -924,7 +924,7 @@ namespace osmium {
|
||||
|
||||
// Now find all the rest of the rings (ie not starting at split locations)
|
||||
if (count_remaining > 0) {
|
||||
for (slocation& sl : m_locations) {
|
||||
for (const slocation& sl : m_locations) {
|
||||
const NodeRefSegment& segment = m_segment_list[sl.item];
|
||||
if (!segment.is_done()) {
|
||||
count_remaining -= add_new_ring_complex(sl);
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -193,7 +193,7 @@ namespace osmium {
|
||||
|
||||
const char* role_name() const noexcept {
|
||||
static const std::array<const char*, 4> names = {{"unknown", "outer", "inner", "empty"}};
|
||||
return names[int(m_role)];
|
||||
return names[static_cast<int>(m_role)];
|
||||
}
|
||||
|
||||
const osmium::Way* way() const noexcept {
|
||||
@@ -327,9 +327,9 @@ namespace osmium {
|
||||
|
||||
if ((d > 0 && na >= 0 && na <= d && nb >= 0 && nb <= d) ||
|
||||
(d < 0 && na <= 0 && na >= d && nb <= 0 && nb >= d)) {
|
||||
const double ua = double(na) / d;
|
||||
const double ua = static_cast<double>(na) / static_cast<double>(d);
|
||||
const vec i = p0 + ua * (p1 - p0);
|
||||
return osmium::Location{int32_t(i.x), int32_t(i.y)};
|
||||
return osmium::Location{static_cast<int32_t>(i.x), static_cast<int32_t>(i.y)};
|
||||
}
|
||||
|
||||
return osmium::Location{};
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -86,16 +86,16 @@ namespace osmium {
|
||||
int64_t m_num;
|
||||
#endif
|
||||
|
||||
int64_t m_sum;
|
||||
int64_t m_sum = 0;
|
||||
|
||||
public:
|
||||
|
||||
explicit ProtoRing(NodeRefSegment* segment) noexcept :
|
||||
m_min_segment(segment),
|
||||
m_min_segment(segment)
|
||||
#ifdef OSMIUM_DEBUG_RING_NO
|
||||
m_num(next_num()),
|
||||
, m_num(next_num())
|
||||
#endif
|
||||
m_sum(0) {
|
||||
{
|
||||
add_segment_back(segment);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -333,7 +333,7 @@ namespace osmium {
|
||||
}
|
||||
|
||||
if (y_range_overlap(s1, s2)) {
|
||||
osmium::Location intersection{calculate_intersection(s1, s2)};
|
||||
const osmium::Location intersection{calculate_intersection(s1, s2)};
|
||||
if (intersection) {
|
||||
++found_intersections;
|
||||
if (m_debug) {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -89,12 +89,12 @@ namespace osmium {
|
||||
|
||||
// scale vector
|
||||
constexpr inline vec operator*(double s, const vec& v) noexcept {
|
||||
return vec{int64_t(s * v.x), int64_t(s * v.y)};
|
||||
return vec{static_cast<int64_t>(s * static_cast<double>(v.x)), static_cast<int64_t>(s * static_cast<double>(v.y))};
|
||||
}
|
||||
|
||||
// scale vector
|
||||
constexpr inline vec operator*(const vec& v, double s) noexcept {
|
||||
return vec{int64_t(s * v.x), int64_t(s * v.y)};
|
||||
return vec{static_cast<int64_t>(s * static_cast<double>(v.x)), static_cast<int64_t>(s * static_cast<double>(v.y))};
|
||||
}
|
||||
|
||||
// equality
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -75,15 +75,15 @@ namespace osmium {
|
||||
void set_object(gdalcpp::Feature& feature) {
|
||||
const char t[2] = {osmium::item_type_to_char(m_object_type), '\0'};
|
||||
feature.set_field("obj_type", t);
|
||||
feature.set_field("obj_id", int32_t(m_object_id));
|
||||
feature.set_field("nodes", int32_t(m_nodes));
|
||||
feature.set_field("obj_id", static_cast<int32_t>(m_object_id));
|
||||
feature.set_field("nodes", static_cast<int32_t>(m_nodes));
|
||||
}
|
||||
|
||||
void write_point(const char* problem_type, osmium::object_id_type id1, osmium::object_id_type id2, osmium::Location location) {
|
||||
gdalcpp::Feature feature{m_layer_perror, m_ogr_factory.create_point(location)};
|
||||
set_object(feature);
|
||||
feature.set_field("id1", double(id1));
|
||||
feature.set_field("id2", double(id2));
|
||||
feature.set_field("id1", static_cast<double>(id1));
|
||||
feature.set_field("id2", static_cast<double>(id2));
|
||||
feature.set_field("problem", problem_type);
|
||||
feature.add_to_layer();
|
||||
}
|
||||
@@ -176,7 +176,7 @@ namespace osmium {
|
||||
try {
|
||||
gdalcpp::Feature feature{m_layer_lerror, m_ogr_factory.create_linestring(way)};
|
||||
set_object(feature);
|
||||
feature.set_field("id1", int32_t(way.id()));
|
||||
feature.set_field("id1", static_cast<int32_t>(way.id()));
|
||||
feature.set_field("id2", 0);
|
||||
feature.set_field("problem", "way_in_multiple_rings");
|
||||
feature.add_to_layer();
|
||||
@@ -192,7 +192,7 @@ namespace osmium {
|
||||
try {
|
||||
gdalcpp::Feature feature{m_layer_lerror, m_ogr_factory.create_linestring(way)};
|
||||
set_object(feature);
|
||||
feature.set_field("id1", int32_t(way.id()));
|
||||
feature.set_field("id1", static_cast<int32_t>(way.id()));
|
||||
feature.set_field("id2", 0);
|
||||
feature.set_field("problem", "inner_with_same_tags");
|
||||
feature.add_to_layer();
|
||||
@@ -208,7 +208,7 @@ namespace osmium {
|
||||
try {
|
||||
gdalcpp::Feature feature{m_layer_lerror, m_ogr_factory.create_linestring(way)};
|
||||
set_object(feature);
|
||||
feature.set_field("id1", int32_t(way.id()));
|
||||
feature.set_field("id1", static_cast<int32_t>(way.id()));
|
||||
feature.set_field("id2", 0);
|
||||
feature.set_field("problem", "duplicate_way");
|
||||
feature.add_to_layer();
|
||||
@@ -229,7 +229,7 @@ namespace osmium {
|
||||
try {
|
||||
gdalcpp::Feature feature{m_layer_ways, m_ogr_factory.create_linestring(way)};
|
||||
set_object(feature);
|
||||
feature.set_field("way_id", int32_t(way.id()));
|
||||
feature.set_field("way_id", static_cast<int32_t>(way.id()));
|
||||
feature.add_to_layer();
|
||||
} catch (const osmium::geometry_error&) {
|
||||
// XXX
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -125,8 +125,8 @@ namespace osmium {
|
||||
if (value_length > osmium::max_osm_string_length) {
|
||||
throw std::length_error{"OSM tag value is too long"};
|
||||
}
|
||||
add_size(append_with_zero(key, osmium::memory::item_size_type(key_length)));
|
||||
add_size(append_with_zero(value, osmium::memory::item_size_type(value_length)));
|
||||
add_size(append_with_zero(key, static_cast<osmium::memory::item_size_type>(key_length)));
|
||||
add_size(append_with_zero(value, static_cast<osmium::memory::item_size_type>(value_length)));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -142,8 +142,8 @@ namespace osmium {
|
||||
if (value.size() > osmium::max_osm_string_length) {
|
||||
throw std::length_error{"OSM tag value is too long"};
|
||||
}
|
||||
add_size(append(key.data(), osmium::memory::item_size_type(key.size()) + 1));
|
||||
add_size(append(value.data(), osmium::memory::item_size_type(value.size()) + 1));
|
||||
add_size(append(key.data(), static_cast<osmium::memory::item_size_type>(key.size()) + 1));
|
||||
add_size(append(value.data(), static_cast<osmium::memory::item_size_type>(value.size()) + 1));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -240,8 +240,8 @@ namespace osmium {
|
||||
if (length > osmium::max_osm_string_length) {
|
||||
throw std::length_error{"OSM relation member role is too long"};
|
||||
}
|
||||
member.set_role_size(osmium::string_size_type(length) + 1);
|
||||
add_size(append_with_zero(role, osmium::memory::item_size_type(length)));
|
||||
member.set_role_size(static_cast<osmium::string_size_type>(length) + 1);
|
||||
add_size(append_with_zero(role, static_cast<osmium::memory::item_size_type>(length)));
|
||||
add_padding(true);
|
||||
}
|
||||
|
||||
@@ -330,16 +330,16 @@ namespace osmium {
|
||||
if (length > osmium::max_osm_string_length) {
|
||||
throw std::length_error{"OSM user name is too long"};
|
||||
}
|
||||
comment.set_user_size(osmium::string_size_type(length) + 1);
|
||||
add_size(append_with_zero(user, osmium::memory::item_size_type(length)));
|
||||
comment.set_user_size(static_cast<osmium::string_size_type>(length) + 1);
|
||||
add_size(append_with_zero(user, static_cast<osmium::memory::item_size_type>(length)));
|
||||
}
|
||||
|
||||
void add_text(osmium::ChangesetComment& comment, const char* text, const std::size_t length) {
|
||||
if (length > std::numeric_limits<osmium::changeset_comment_size_type>::max() - 1) {
|
||||
throw std::length_error{"OSM changeset comment is too long"};
|
||||
}
|
||||
comment.set_text_size(osmium::changeset_comment_size_type(length) + 1);
|
||||
add_size(append_with_zero(text, osmium::memory::item_size_type(length)));
|
||||
comment.set_text_size(static_cast<osmium::changeset_comment_size_type>(length) + 1);
|
||||
add_size(append_with_zero(text, static_cast<osmium::memory::item_size_type>(length)));
|
||||
add_padding(true);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+4
-4
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -166,7 +166,7 @@ namespace osmium {
|
||||
|
||||
public:
|
||||
|
||||
GeometryFactory<TGeomImpl, TProjection>() :
|
||||
GeometryFactory() :
|
||||
m_projection(),
|
||||
m_impl(m_projection.epsg()) {
|
||||
}
|
||||
@@ -175,7 +175,7 @@ namespace osmium {
|
||||
* Constructor for default initialized projection.
|
||||
*/
|
||||
template <typename... TArgs>
|
||||
explicit GeometryFactory<TGeomImpl, TProjection>(TArgs&&... args) :
|
||||
explicit GeometryFactory(TArgs&&... args) :
|
||||
m_projection(),
|
||||
m_impl(m_projection.epsg(), std::forward<TArgs>(args)...) {
|
||||
}
|
||||
@@ -185,7 +185,7 @@ namespace osmium {
|
||||
* projection is moved into the GeometryFactory.
|
||||
*/
|
||||
template <typename... TArgs>
|
||||
explicit GeometryFactory<TGeomImpl, TProjection>(TProjection&& projection, TArgs&&... args) :
|
||||
explicit GeometryFactory(TProjection&& projection, TArgs&&... args) :
|
||||
m_projection(std::move(projection)),
|
||||
m_impl(m_projection.epsg(), std::forward<TArgs>(args)...) {
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -47,6 +47,9 @@ namespace osmium {
|
||||
/**
|
||||
* A geometry factory implementation that can be used with the
|
||||
* RapidJSON (https://github.com/miloyip/rapidjson) JSON writer.
|
||||
*
|
||||
* @deprecated The RapidJSON support will be removed in a future
|
||||
* version of libosmium.
|
||||
*/
|
||||
template <typename TWriter>
|
||||
class RapidGeoJSONFactoryImpl {
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace osmium {
|
||||
std::string out;
|
||||
out.reserve(str.size() * 2);
|
||||
|
||||
for (char c : str) {
|
||||
for (const char c : str) {
|
||||
out += lookup_hex[(static_cast<unsigned int>(c) >> 4U) & 0xfU];
|
||||
out += lookup_hex[ static_cast<unsigned int>(c) & 0xfU];
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
#ifndef OSMIUM_INDEX_BOOL_VECTOR_HPP
|
||||
#define OSMIUM_INDEX_BOOL_VECTOR_HPP
|
||||
|
||||
/*
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
Permission is hereby granted, free of charge, to any person or organization
|
||||
obtaining a copy of the software and accompanying documentation covered by
|
||||
this license (the "Software") to use, reproduce, display, distribute,
|
||||
execute, and transmit the Software, and to prepare derivative works of the
|
||||
Software, and to permit third-parties to whom the Software is furnished to
|
||||
do so, all subject to the following:
|
||||
|
||||
The copyright notices in the Software and this entire statement, including
|
||||
the above license grant, this restriction and the following disclaimer,
|
||||
must be included in all copies of the Software, in whole or in part, and
|
||||
all derivative works of the Software, unless such copies or derivative
|
||||
works are solely in the form of machine-executable object code generated by
|
||||
a source language processor.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
#include <osmium/index/id_set.hpp>
|
||||
|
||||
namespace osmium {
|
||||
|
||||
namespace index {
|
||||
|
||||
/// @deprecated Use osmium::index::IdSet instead.
|
||||
template <typename T>
|
||||
using BoolVector = IdSet<T>;
|
||||
|
||||
} // namespace index
|
||||
|
||||
} // namespace osmium
|
||||
|
||||
#endif // OSMIUM_INDEX_BOOL_VECTOR_HPP
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -241,7 +241,7 @@ namespace osmium {
|
||||
void dump_as_array(const int fd) final {
|
||||
constexpr const size_t value_size = sizeof(TValue);
|
||||
constexpr const size_t buffer_size = (10L * 1024L * 1024L) / value_size;
|
||||
std::unique_ptr<TValue[]> output_buffer{new TValue[buffer_size]};
|
||||
const std::unique_ptr<TValue[]> output_buffer{new TValue[buffer_size]};
|
||||
|
||||
size_t buffer_start_id = 0;
|
||||
for (auto it = cbegin(); it != cend();) {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-21
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -503,26 +503,6 @@ namespace osmium {
|
||||
|
||||
}; // class IdSetSmall
|
||||
|
||||
/// @deprecated Use nwr_array helper class instead.
|
||||
template <template <typename> class IdSetType>
|
||||
class NWRIdSet {
|
||||
|
||||
using id_set_type = IdSetType<osmium::unsigned_object_id_type>;
|
||||
|
||||
std::array<id_set_type, 3> m_sets;
|
||||
|
||||
public:
|
||||
|
||||
id_set_type& operator()(osmium::item_type type) noexcept {
|
||||
return m_sets[osmium::item_type_to_nwr_index(type)];
|
||||
}
|
||||
|
||||
const id_set_type& operator()(osmium::item_type type) const noexcept {
|
||||
return m_sets[osmium::item_type_to_nwr_index(type)];
|
||||
}
|
||||
|
||||
}; // class NWRIdSet
|
||||
|
||||
} // namespace index
|
||||
|
||||
} // namespace osmium
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+2
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -236,6 +236,7 @@ namespace osmium {
|
||||
|
||||
std::vector<std::string> map_types() const {
|
||||
std::vector<std::string> result;
|
||||
result.reserve(m_callbacks.size());
|
||||
|
||||
for (const auto& cb : m_callbacks) {
|
||||
result.push_back(cb.first);
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -112,7 +112,7 @@ namespace osmium {
|
||||
#ifdef _MSC_VER
|
||||
osmium::detail::disable_invalid_parameter_handler diph;
|
||||
#endif
|
||||
m_file = fdopen(fd, mode);
|
||||
m_file = fdopen(fd, mode); // NOLINT(cppcoreguidelines-prefer-member-initializer)
|
||||
if (!m_file) {
|
||||
|
||||
// Do not close stdout
|
||||
@@ -134,7 +134,7 @@ namespace osmium {
|
||||
osmium::detail::disable_invalid_parameter_handler diph;
|
||||
#endif
|
||||
if (m_file) {
|
||||
fclose(m_file);
|
||||
(void)fclose(m_file);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -199,10 +199,10 @@ namespace osmium {
|
||||
const create_decompressor_type_fd& create_decompressor_fd,
|
||||
const create_decompressor_type_buffer& create_decompressor_buffer) {
|
||||
|
||||
compression_map_type::value_type cc{compression,
|
||||
std::make_tuple(create_compressor,
|
||||
create_decompressor_fd,
|
||||
create_decompressor_buffer)};
|
||||
const compression_map_type::value_type cc{compression,
|
||||
std::make_tuple(create_compressor,
|
||||
create_decompressor_fd,
|
||||
create_decompressor_buffer)};
|
||||
|
||||
return m_callbacks.insert(cc).second;
|
||||
}
|
||||
@@ -357,7 +357,7 @@ namespace osmium {
|
||||
osmium::io::detail::remove_buffered_pages(m_fd, m_offset);
|
||||
}
|
||||
const auto nread = detail::reliable_read(m_fd, &*buffer.begin(), osmium::io::Decompressor::input_buffer_size);
|
||||
buffer.resize(std::string::size_type(nread));
|
||||
buffer.resize(static_cast<std::string::size_type>(nread));
|
||||
}
|
||||
|
||||
m_offset += buffer.size();
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -392,7 +392,7 @@ namespace osmium {
|
||||
*m_out += " (open)\n";
|
||||
}
|
||||
|
||||
const int width = int(std::log10(way.nodes().size())) + 1;
|
||||
const int width = static_cast<int>(std::log10(way.nodes().size())) + 1;
|
||||
int n = 0;
|
||||
for (const auto& node_ref : way.nodes()) {
|
||||
write_diff();
|
||||
@@ -427,7 +427,7 @@ namespace osmium {
|
||||
output_int(relation.members().size());
|
||||
*m_out += '\n';
|
||||
|
||||
const int width = int(std::log10(relation.members().size())) + 1;
|
||||
const int width = static_cast<int>(std::log10(relation.members().size())) + 1;
|
||||
int n = 0;
|
||||
for (const auto& member : relation.members()) {
|
||||
write_diff();
|
||||
@@ -485,7 +485,7 @@ namespace osmium {
|
||||
output_int(changeset.num_comments());
|
||||
*m_out += '\n';
|
||||
|
||||
const int width = int(std::log10(changeset.num_comments())) + 1;
|
||||
const int width = static_cast<int>(std::log10(changeset.num_comments())) + 1;
|
||||
int n = 0;
|
||||
for (const auto& comment : changeset.discussion()) {
|
||||
write_counter(width, n++);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace osmium {
|
||||
queue_wrapper<std::string> m_input_queue;
|
||||
osmium::osm_entity_bits::type m_read_which_entities;
|
||||
osmium::io::read_meta m_read_metadata;
|
||||
bool m_header_is_done;
|
||||
bool m_header_is_done = false;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -130,8 +130,7 @@ namespace osmium {
|
||||
m_header_promise(args.header_promise),
|
||||
m_input_queue(args.input_queue),
|
||||
m_read_which_entities(args.read_which_entities),
|
||||
m_read_metadata(args.read_metadata),
|
||||
m_header_is_done(false) {
|
||||
m_read_metadata(args.read_metadata) {
|
||||
}
|
||||
|
||||
Parser(const Parser&) = delete;
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -243,7 +243,7 @@ namespace osmium {
|
||||
}
|
||||
}
|
||||
|
||||
return T(value);
|
||||
return static_cast<T>(value);
|
||||
}
|
||||
|
||||
inline osmium::object_id_type opl_parse_id(const char** s) {
|
||||
@@ -592,7 +592,7 @@ namespace osmium {
|
||||
osmium::builder::RelationMemberListBuilder builder{buffer, parent_builder};
|
||||
|
||||
while (s < e) {
|
||||
osmium::item_type type = osmium::char_to_item_type(*s);
|
||||
const osmium::item_type type = osmium::char_to_item_type(*s);
|
||||
if (type != osmium::item_type::node &&
|
||||
type != osmium::item_type::way &&
|
||||
type != osmium::item_type::relation) {
|
||||
@@ -603,7 +603,7 @@ namespace osmium {
|
||||
if (s == e) {
|
||||
throw opl_error{"expected integer", s};
|
||||
}
|
||||
osmium::object_id_type ref = opl_parse_id(&s);
|
||||
const osmium::object_id_type ref = opl_parse_id(&s);
|
||||
opl_parse_char(&s, '@');
|
||||
if (s == e) {
|
||||
builder.add_member(type, ref, "");
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+36
-31
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -165,9 +165,10 @@ namespace osmium {
|
||||
while (pbf_string_table.next(OSMFormat::StringTable::repeated_bytes_s, protozero::pbf_wire_type::length_delimited)) {
|
||||
const auto str_view = pbf_string_table.get_view();
|
||||
if (str_view.size() > osmium::max_osm_string_length) {
|
||||
throw osmium::pbf_error{"overlong string in string table"};
|
||||
const std::string start_of_string(str_view.data(), 20);
|
||||
throw osmium::pbf_error{"overlong string (" + start_of_string + "...) in string table"};
|
||||
}
|
||||
m_stringtable.emplace_back(str_view.data(), osmium::string_size_type(str_view.size()));
|
||||
m_stringtable.emplace_back(str_view.data(), static_cast<osmium::string_size_type>(str_view.size()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -313,11 +314,11 @@ namespace osmium {
|
||||
}
|
||||
|
||||
int32_t convert_pbf_lon(const int64_t c) const noexcept {
|
||||
return int32_t((c * m_granularity + m_lon_offset) / resolution_convert);
|
||||
return static_cast<int32_t>((c * m_granularity + m_lon_offset) / resolution_convert);
|
||||
}
|
||||
|
||||
int32_t convert_pbf_lat(const int64_t c) const noexcept {
|
||||
return int32_t((c * m_granularity + m_lat_offset) / resolution_convert);
|
||||
return static_cast<int32_t>((c * m_granularity + m_lat_offset) / resolution_convert);
|
||||
}
|
||||
|
||||
void decode_node(const data_view& data) {
|
||||
@@ -502,7 +503,7 @@ namespace osmium {
|
||||
throw osmium::pbf_error{"unknown relation member type"};
|
||||
}
|
||||
rml_builder.add_member(
|
||||
osmium::item_type(type + 1),
|
||||
static_cast<osmium::item_type>(type + 1),
|
||||
ref.update(refs.next_sint64()),
|
||||
r.first,
|
||||
r.second
|
||||
@@ -787,7 +788,7 @@ namespace osmium {
|
||||
}
|
||||
case protozero::tag_and_type(FileFormat::Blob::optional_int32_raw_size, protozero::pbf_wire_type::varint):
|
||||
raw_size = pbf_blob.get_int32();
|
||||
if (raw_size <= 0 || uint32_t(raw_size) > max_uncompressed_blob_size) {
|
||||
if (raw_size <= 0 || static_cast<uint32_t>(raw_size) > max_uncompressed_blob_size) {
|
||||
throw osmium::pbf_error{"illegal blob size"};
|
||||
}
|
||||
break;
|
||||
@@ -808,37 +809,41 @@ namespace osmium {
|
||||
case protozero::tag_and_type(FileFormat::Blob::optional_bytes_zstd_data, protozero::pbf_wire_type::length_delimited):
|
||||
throw osmium::pbf_error{"zstd blobs not supported"};
|
||||
default:
|
||||
throw osmium::pbf_error{"unknown compression"};
|
||||
pbf_blob.skip();
|
||||
}
|
||||
}
|
||||
|
||||
if (!compressed_data.empty() && raw_size != 0) {
|
||||
switch (use_compression) {
|
||||
case pbf_compression::none:
|
||||
break;
|
||||
case pbf_compression::zlib:
|
||||
return osmium::io::detail::zlib_uncompress_string(
|
||||
compressed_data.data(),
|
||||
static_cast<unsigned long>(compressed_data.size()), // NOLINT(google-runtime-int)
|
||||
static_cast<unsigned long>(raw_size), // NOLINT(google-runtime-int)
|
||||
output
|
||||
);
|
||||
case pbf_compression::lz4:
|
||||
if (compressed_data.empty()) {
|
||||
throw osmium::pbf_error{"blob contains no data or unknown compression method"};
|
||||
}
|
||||
|
||||
if (raw_size == 0) {
|
||||
throw osmium::pbf_error{"missing raw_size in compressed blob"};
|
||||
}
|
||||
|
||||
switch (use_compression) {
|
||||
case pbf_compression::none:
|
||||
break;
|
||||
case pbf_compression::zlib:
|
||||
return osmium::io::detail::zlib_uncompress_string(
|
||||
compressed_data.data(),
|
||||
static_cast<unsigned long>(compressed_data.size()), // NOLINT(google-runtime-int)
|
||||
static_cast<unsigned long>(raw_size), // NOLINT(google-runtime-int)
|
||||
output
|
||||
);
|
||||
case pbf_compression::lz4:
|
||||
#ifdef OSMIUM_WITH_LZ4
|
||||
return osmium::io::detail::lz4_uncompress_string(
|
||||
compressed_data.data(),
|
||||
static_cast<unsigned long>(compressed_data.size()), // NOLINT(google-runtime-int)
|
||||
static_cast<unsigned long>(raw_size), // NOLINT(google-runtime-int)
|
||||
output
|
||||
);
|
||||
return osmium::io::detail::lz4_uncompress_string(
|
||||
compressed_data.data(),
|
||||
static_cast<unsigned long>(compressed_data.size()), // NOLINT(google-runtime-int)
|
||||
static_cast<unsigned long>(raw_size), // NOLINT(google-runtime-int)
|
||||
output
|
||||
);
|
||||
#else
|
||||
break;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
std::abort(); // should never be here
|
||||
}
|
||||
|
||||
throw osmium::pbf_error{"blob contains no data"};
|
||||
std::abort(); // should never be here
|
||||
}
|
||||
|
||||
inline osmium::Box decode_header_bbox(const data_view& data) {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -245,7 +245,7 @@ namespace osmium {
|
||||
// Parse the header in the PBF OSMHeader blob.
|
||||
void parse_header_blob() {
|
||||
const auto size = check_type_and_get_blob_size("OSMHeader");
|
||||
osmium::io::Header header{decode_header(read_from_input_queue_with_check(size))};
|
||||
const osmium::io::Header header{decode_header(read_from_input_queue_with_check(size))};
|
||||
set_header_value(header);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -206,7 +206,7 @@ namespace osmium {
|
||||
m_versions.push_back(static_cast<int32_t>(node.version()));
|
||||
}
|
||||
if (m_options->add_metadata.timestamp()) {
|
||||
m_timestamps.push_back(m_delta_timestamp.update(uint32_t(node.timestamp())));
|
||||
m_timestamps.push_back(m_delta_timestamp.update(static_cast<uint32_t>(node.timestamp())));
|
||||
}
|
||||
if (m_options->add_metadata.changeset()) {
|
||||
m_changesets.push_back(m_delta_changeset.update(node.changeset()));
|
||||
@@ -435,12 +435,12 @@ namespace osmium {
|
||||
pbf_blob.add_bytes(FileFormat::Blob::optional_bytes_raw, m_msg);
|
||||
break;
|
||||
case pbf_compression::zlib:
|
||||
pbf_blob.add_int32(FileFormat::Blob::optional_int32_raw_size, int32_t(m_msg.size()));
|
||||
pbf_blob.add_int32(FileFormat::Blob::optional_int32_raw_size, static_cast<int32_t>(m_msg.size()));
|
||||
pbf_blob.add_bytes(FileFormat::Blob::optional_bytes_zlib_data, osmium::io::detail::zlib_compress(m_msg, m_compression_level));
|
||||
break;
|
||||
case pbf_compression::lz4:
|
||||
#ifdef OSMIUM_WITH_LZ4
|
||||
pbf_blob.add_int32(FileFormat::Blob::optional_int32_raw_size, int32_t(m_msg.size()));
|
||||
pbf_blob.add_int32(FileFormat::Blob::optional_int32_raw_size, static_cast<int32_t>(m_msg.size()));
|
||||
pbf_blob.add_bytes(FileFormat::Blob::optional_bytes_lz4_data, osmium::io::detail::lz4_compress(m_msg, m_compression_level));
|
||||
break;
|
||||
#else
|
||||
@@ -511,14 +511,14 @@ namespace osmium {
|
||||
template <typename T>
|
||||
void add_meta(const osmium::OSMObject& object, T& pbf_object) {
|
||||
{
|
||||
protozero::packed_field_uint32 field{pbf_object, protozero::pbf_tag_type(T::enum_type::packed_uint32_keys)};
|
||||
protozero::packed_field_uint32 field{pbf_object, static_cast<protozero::pbf_tag_type>(T::enum_type::packed_uint32_keys)};
|
||||
for (const auto& tag : object.tags()) {
|
||||
field.add_element(m_primitive_block->store_in_stringtable_unsigned(tag.key()));
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
protozero::packed_field_uint32 field{pbf_object, protozero::pbf_tag_type(T::enum_type::packed_uint32_vals)};
|
||||
protozero::packed_field_uint32 field{pbf_object, static_cast<protozero::pbf_tag_type>(T::enum_type::packed_uint32_vals)};
|
||||
for (const auto& tag : object.tags()) {
|
||||
field.add_element(m_primitive_block->store_in_stringtable_unsigned(tag.value()));
|
||||
}
|
||||
@@ -532,7 +532,7 @@ namespace osmium {
|
||||
pbf_info.add_int32(OSMFormat::Info::optional_int32_version, static_cast<int32_t>(object.version()));
|
||||
}
|
||||
if (m_options.add_metadata.timestamp()) {
|
||||
pbf_info.add_int64(OSMFormat::Info::optional_int64_timestamp, uint32_t(object.timestamp()));
|
||||
pbf_info.add_int64(OSMFormat::Info::optional_int64_timestamp, static_cast<uint32_t>(object.timestamp()));
|
||||
}
|
||||
if (m_options.add_metadata.changeset()) {
|
||||
pbf_info.add_int64(OSMFormat::Info::optional_int64_changeset, object.changeset());
|
||||
@@ -617,10 +617,10 @@ namespace osmium {
|
||||
protozero::pbf_builder<OSMFormat::HeaderBBox> pbf_header_bbox{pbf_header_block, OSMFormat::HeaderBlock::optional_HeaderBBox_bbox};
|
||||
|
||||
osmium::Box box = header.joined_boxes();
|
||||
pbf_header_bbox.add_sint64(OSMFormat::HeaderBBox::required_sint64_left, int64_t(box.bottom_left().lon() * lonlat_resolution));
|
||||
pbf_header_bbox.add_sint64(OSMFormat::HeaderBBox::required_sint64_right, int64_t(box.top_right().lon() * lonlat_resolution));
|
||||
pbf_header_bbox.add_sint64(OSMFormat::HeaderBBox::required_sint64_top, int64_t(box.top_right().lat() * lonlat_resolution));
|
||||
pbf_header_bbox.add_sint64(OSMFormat::HeaderBBox::required_sint64_bottom, int64_t(box.bottom_left().lat() * lonlat_resolution));
|
||||
pbf_header_bbox.add_sint64(OSMFormat::HeaderBBox::required_sint64_left, static_cast<int64_t>(box.bottom_left().lon() * lonlat_resolution));
|
||||
pbf_header_bbox.add_sint64(OSMFormat::HeaderBBox::required_sint64_right, static_cast<int64_t>(box.top_right().lon() * lonlat_resolution));
|
||||
pbf_header_bbox.add_sint64(OSMFormat::HeaderBBox::required_sint64_top, static_cast<int64_t>(box.top_right().lat() * lonlat_resolution));
|
||||
pbf_header_bbox.add_sint64(OSMFormat::HeaderBBox::required_sint64_bottom, static_cast<int64_t>(box.bottom_left().lat() * lonlat_resolution));
|
||||
}
|
||||
|
||||
pbf_header_block.add_string(OSMFormat::HeaderBlock::repeated_string_required_features, "OsmSchema-V0.6");
|
||||
@@ -645,8 +645,8 @@ namespace osmium {
|
||||
|
||||
const std::string osmosis_replication_timestamp{header.get("osmosis_replication_timestamp")};
|
||||
if (!osmosis_replication_timestamp.empty()) {
|
||||
osmium::Timestamp ts{osmosis_replication_timestamp.c_str()};
|
||||
pbf_header_block.add_int64(OSMFormat::HeaderBlock::optional_int64_osmosis_replication_timestamp, uint32_t(ts));
|
||||
const osmium::Timestamp ts{osmosis_replication_timestamp.c_str()};
|
||||
pbf_header_block.add_int64(OSMFormat::HeaderBlock::optional_int64_osmosis_replication_timestamp, static_cast<uint32_t>(ts));
|
||||
}
|
||||
|
||||
const std::string osmosis_replication_sequence_number{header.get("osmosis_replication_sequence_number")};
|
||||
@@ -700,7 +700,7 @@ namespace osmium {
|
||||
|
||||
{
|
||||
osmium::DeltaEncode<object_id_type, int64_t> delta_id;
|
||||
protozero::packed_field_sint64 field{pbf_way, protozero::pbf_tag_type(OSMFormat::Way::packed_sint64_refs)};
|
||||
protozero::packed_field_sint64 field{pbf_way, static_cast<protozero::pbf_tag_type>(OSMFormat::Way::packed_sint64_refs)};
|
||||
for (const auto& node_ref : way.nodes()) {
|
||||
field.add_element(delta_id.update(node_ref.ref()));
|
||||
}
|
||||
@@ -709,14 +709,14 @@ namespace osmium {
|
||||
if (m_options.locations_on_ways) {
|
||||
{
|
||||
osmium::DeltaEncode<int64_t, int64_t> delta;
|
||||
protozero::packed_field_sint64 field{pbf_way, protozero::pbf_tag_type(OSMFormat::Way::packed_sint64_lon)};
|
||||
protozero::packed_field_sint64 field{pbf_way, static_cast<protozero::pbf_tag_type>(OSMFormat::Way::packed_sint64_lon)};
|
||||
for (const auto& node_ref : way.nodes()) {
|
||||
field.add_element(delta.update(node_ref.location().x()));
|
||||
}
|
||||
}
|
||||
{
|
||||
osmium::DeltaEncode<int64_t, int64_t> delta;
|
||||
protozero::packed_field_sint64 field{pbf_way, protozero::pbf_tag_type(OSMFormat::Way::packed_sint64_lat)};
|
||||
protozero::packed_field_sint64 field{pbf_way, static_cast<protozero::pbf_tag_type>(OSMFormat::Way::packed_sint64_lat)};
|
||||
for (const auto& node_ref : way.nodes()) {
|
||||
field.add_element(delta.update(node_ref.location().y()));
|
||||
}
|
||||
@@ -732,7 +732,7 @@ namespace osmium {
|
||||
add_meta(relation, pbf_relation);
|
||||
|
||||
{
|
||||
protozero::packed_field_int32 field{pbf_relation, protozero::pbf_tag_type(OSMFormat::Relation::packed_int32_roles_sid)};
|
||||
protozero::packed_field_int32 field{pbf_relation, static_cast<protozero::pbf_tag_type>(OSMFormat::Relation::packed_int32_roles_sid)};
|
||||
for (const auto& member : relation.members()) {
|
||||
field.add_element(m_primitive_block->store_in_stringtable(member.role()));
|
||||
}
|
||||
@@ -740,16 +740,16 @@ namespace osmium {
|
||||
|
||||
{
|
||||
osmium::DeltaEncode<object_id_type, int64_t> delta_id;
|
||||
protozero::packed_field_sint64 field{pbf_relation, protozero::pbf_tag_type(OSMFormat::Relation::packed_sint64_memids)};
|
||||
protozero::packed_field_sint64 field{pbf_relation, static_cast<protozero::pbf_tag_type>(OSMFormat::Relation::packed_sint64_memids)};
|
||||
for (const auto& member : relation.members()) {
|
||||
field.add_element(delta_id.update(member.ref()));
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
protozero::packed_field_int32 field{pbf_relation, protozero::pbf_tag_type(OSMFormat::Relation::packed_MemberType_types)};
|
||||
protozero::packed_field_int32 field{pbf_relation, static_cast<protozero::pbf_tag_type>(OSMFormat::Relation::packed_MemberType_types)};
|
||||
for (const auto& member : relation.members()) {
|
||||
field.add_element(int32_t(osmium::item_type_to_nwr_index(member.type())));
|
||||
field.add_element(static_cast<int32_t>(osmium::item_type_to_nwr_index(member.type())));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user