Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update included libosmium to version 2.21.0 #2295

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contrib/libosmium/README.contrib
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Source: https://github.com/osmcode/libosmium
Revision: v2.20.0
Revision: v2.21.0
2 changes: 1 addition & 1 deletion contrib/libosmium/include/osmium/area/assembler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
2 changes: 1 addition & 1 deletion contrib/libosmium/include/osmium/area/assembler_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
2 changes: 1 addition & 1 deletion contrib/libosmium/include/osmium/area/assembler_legacy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
14 changes: 7 additions & 7 deletions contrib/libosmium/include/osmium/area/detail/basic_assembler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down Expand Up @@ -70,7 +70,7 @@ namespace osmium {

struct location_to_ring_map {
osmium::Location location;
open_ring_its_type::iterator ring_it{};
open_ring_its_type::iterator ring_it;
bool start{false};

location_to_ring_map(osmium::Location l, open_ring_its_type::iterator r, const bool s) noexcept :
Expand Down Expand Up @@ -217,7 +217,7 @@ namespace osmium {
}
}

for (const osmium::Way* way : ways_in_multiple_rings) {
for (const osmium::Way* way : ways_in_multiple_rings) { // NOLINT(bugprone-nondeterministic-pointer-iteration-order)
++m_stats.ways_in_multiple_rings;
if (debug()) {
std::cerr << " Way " << way->id() << " is in multiple rings\n";
Expand Down Expand Up @@ -326,7 +326,7 @@ namespace osmium {
const int64_t ay = a.y();
const int64_t by = b.y();
const int64_t ly = end_location.y();
const auto z = (bx - ax) * (ly - ay) - (by - ay) * (lx - ax);
const auto z = ((bx - ax) * (ly - ay)) - ((by - ay) * (lx - ax));
if (debug()) {
std::cerr << " Segment z=" << z << '\n';
}
Expand All @@ -353,7 +353,7 @@ namespace osmium {
const int64_t ay = a.y();
const int64_t by = b.y();
const int64_t ly = location.y();
const auto z = (bx - ax) * (ly - ay) - (by - ay) * (lx - ax);
const auto z = ((bx - ax) * (ly - ay)) - ((by - ay) * (lx - ax));

if (z >= 0) {
nesting += segment->is_reverse() ? -1 : 1;
Expand All @@ -362,7 +362,7 @@ namespace osmium {
}
if (segment->ring()->is_outer()) {
const double y = static_cast<double>(ay) +
static_cast<double>((by - ay) * (lx - ax)) / static_cast<double>(bx - ax);
(static_cast<double>((by - ay) * (lx - ax)) / static_cast<double>(bx - ax));
if (debug()) {
std::cerr << " Segment belongs to outer ring (y=" << y << " ring=" << *segment->ring() << ")\n";
}
Expand Down Expand Up @@ -703,7 +703,7 @@ namespace osmium {

struct candidate {
int64_t sum;
std::vector<std::pair<location_to_ring_map, bool>> rings{};
std::vector<std::pair<location_to_ring_map, bool>> rings;
osmium::Location start_location;
osmium::Location stop_location;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down Expand Up @@ -75,10 +75,10 @@ namespace osmium {
class NodeRefSegment {

// First node in order described above.
osmium::NodeRef m_first{};
osmium::NodeRef m_first;

// Second node in order described above.
osmium::NodeRef m_second{};
osmium::NodeRef m_second;

// Way this segment was from.
const osmium::Way* m_way = nullptr;
Expand Down Expand Up @@ -319,11 +319,11 @@ namespace osmium {

// intersection in a point

const int64_t na = (q1.x - q0.x) * (p0.y - q0.y) -
(q1.y - q0.y) * (p0.x - q0.x);
const int64_t na = ((q1.x - q0.x) * (p0.y - q0.y)) -
((q1.y - q0.y) * (p0.x - q0.x));

const int64_t nb = (p1.x - p0.x) * (p0.y - q0.y) -
(p1.y - p0.y) * (p0.x - q0.x);
const int64_t nb = ((p1.x - p0.x) * (p0.y - q0.y)) -
((p1.y - p0.y) * (p0.x - q0.x));

if ((d > 0 && na >= 0 && na <= d && nb >= 0 && nb <= d) ||
(d < 0 && na <= 0 && na >= d && nb <= 0 && nb >= d)) {
Expand Down
6 changes: 3 additions & 3 deletions contrib/libosmium/include/osmium/area/detail/proto_ring.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down Expand Up @@ -64,11 +64,11 @@ namespace osmium {
private:

// Segments in this ring.
segments_type m_segments{};
segments_type m_segments;

// If this is an outer ring, these point to it's inner rings
// (if any).
std::vector<ProtoRing*> m_inner{};
std::vector<ProtoRing*> m_inner;

// The smallest segment. Will be kept current whenever a new
// segment is added to the ring.
Expand Down
4 changes: 2 additions & 2 deletions contrib/libosmium/include/osmium/area/detail/segment_list.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down Expand Up @@ -84,7 +84,7 @@ namespace osmium {

using slist_type = std::vector<NodeRefSegment>;

slist_type m_segments{};
slist_type m_segments;

bool m_debug;

Expand Down
18 changes: 9 additions & 9 deletions contrib/libosmium/include/osmium/area/detail/vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down Expand Up @@ -73,37 +73,37 @@ namespace osmium {
}; // struct vec

// addition
constexpr inline vec operator+(const vec& lhs, const vec& rhs) noexcept {
constexpr vec operator+(const vec& lhs, const vec& rhs) noexcept {
return vec{lhs.x + rhs.x, lhs.y + rhs.y};
}

// subtraction
constexpr inline vec operator-(const vec& lhs, const vec& rhs) noexcept {
constexpr vec operator-(const vec& lhs, const vec& rhs) noexcept {
return vec{lhs.x - rhs.x, lhs.y - rhs.y};
}

// cross product
constexpr inline int64_t operator*(const vec& lhs, const vec& rhs) noexcept {
return lhs.x * rhs.y - lhs.y * rhs.x;
constexpr int64_t operator*(const vec& lhs, const vec& rhs) noexcept {
return (lhs.x * rhs.y) - (lhs.y * rhs.x);
}

// scale vector
constexpr inline vec operator*(double s, const vec& v) noexcept {
constexpr vec operator*(double s, const vec& v) noexcept {
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 {
constexpr vec operator*(const vec& v, double s) noexcept {
return vec{static_cast<int64_t>(s * static_cast<double>(v.x)), static_cast<int64_t>(s * static_cast<double>(v.y))};
}

// equality
constexpr inline bool operator==(const vec& lhs, const vec& rhs) noexcept {
constexpr bool operator==(const vec& lhs, const vec& rhs) noexcept {
return lhs.x == rhs.x && lhs.y == rhs.y;
}

// inequality
constexpr inline bool operator!=(const vec& lhs, const vec& rhs) noexcept {
constexpr bool operator!=(const vec& lhs, const vec& rhs) noexcept {
return !(lhs == rhs);
}

Expand Down
2 changes: 1 addition & 1 deletion contrib/libosmium/include/osmium/area/geom_assembler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down Expand Up @@ -79,7 +79,7 @@ namespace osmium {
using collector_type = osmium::relations::Collector<MultipolygonCollector<TAssembler>, false, true, false>;

using assembler_config_type = typename TAssembler::config_type;
const assembler_config_type m_assembler_config;
assembler_config_type m_assembler_config;

osmium::memory::Buffer m_output_buffer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down Expand Up @@ -76,7 +76,7 @@ namespace osmium {
class MultipolygonManager : public osmium::relations::RelationsManager<MultipolygonManager<TAssembler>, false, true, false> {

using assembler_config_type = typename TAssembler::config_type;
const assembler_config_type m_assembler_config;
assembler_config_type m_assembler_config;

area_stats m_stats;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down Expand Up @@ -78,7 +78,7 @@ namespace osmium {
class MultipolygonManagerLegacy : public osmium::relations::RelationsManager<MultipolygonManagerLegacy<TAssembler>, false, true, false> {

using assembler_config_type = typename TAssembler::config_type;
const assembler_config_type m_assembler_config;
assembler_config_type m_assembler_config;

area_stats m_stats;

Expand Down
2 changes: 1 addition & 1 deletion contrib/libosmium/include/osmium/area/problem_reporter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down Expand Up @@ -89,7 +89,7 @@ namespace osmium {
}

void write_line(const char* problem_type, osmium::object_id_type id1, osmium::object_id_type id2, osmium::Location loc1, osmium::Location loc2) {
auto ogr_linestring = std::unique_ptr<OGRLineString>{new OGRLineString{}};
auto ogr_linestring = std::make_unique<OGRLineString>();
ogr_linestring->addPoint(loc1.lon(), loc1.lat());
ogr_linestring->addPoint(loc2.lon(), loc2.lat());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
2 changes: 1 addition & 1 deletion contrib/libosmium/include/osmium/area/stats.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
Loading
Loading