-
-
Notifications
You must be signed in to change notification settings - Fork 474
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update included libosmium to version 2.21.0
- Loading branch information
Showing
199 changed files
with
478 additions
and
655 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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 : | ||
|
@@ -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"; | ||
|
@@ -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'; | ||
} | ||
|
@@ -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; | ||
|
@@ -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"; | ||
} | ||
|
@@ -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; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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; | ||
|
@@ -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)) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -84,7 +84,7 @@ namespace osmium { | |
|
||
using slist_type = std::vector<NodeRefSegment>; | ||
|
||
slist_type m_segments{}; | ||
slist_type m_segments; | ||
|
||
bool m_debug; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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()); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
Oops, something went wrong.