Skip to content

Commit baa2b17

Browse files
committed
update libosmium to 2.15.6
1 parent 0c3eb6b commit baa2b17

File tree

199 files changed

+663
-287
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

199 files changed

+663
-287
lines changed

contrib/libosmium/README.contrib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Source: https://github.com/osmcode/libosmium
2-
Revision: v2.15.4
2+
Revision: v2.15.6

contrib/libosmium/osmium/area/assembler.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2019 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2020 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111

contrib/libosmium/osmium/area/assembler_config.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2019 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2020 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111

contrib/libosmium/osmium/area/assembler_legacy.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2019 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2020 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111

contrib/libosmium/osmium/area/detail/basic_assembler.hpp

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2019 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2020 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111
@@ -105,6 +105,12 @@ namespace osmium {
105105

106106
static constexpr const std::size_t max_split_locations = 100ULL;
107107

108+
// Maximum recursion depth, stops complex multipolygons from
109+
// breaking everything.
110+
enum : unsigned {
111+
max_depth = 20U
112+
};
113+
108114
struct slocation {
109115

110116
enum {
@@ -713,7 +719,13 @@ namespace osmium {
713719

714720
};
715721

722+
struct exceeded_max_depth {};
723+
716724
void find_candidates(std::vector<candidate>& candidates, std::unordered_set<osmium::Location>& loc_done, const std::vector<location_to_ring_map>& xrings, const candidate& cand, unsigned depth = 0) {
725+
if (depth > max_depth) {
726+
throw exceeded_max_depth{};
727+
}
728+
717729
if (debug()) {
718730
std::cerr << " find_candidates sum=" << cand.sum << " start=" << cand.start_location << " stop=" << cand.stop_location << "\n";
719731
for (const auto& ring : cand.rings) {
@@ -826,7 +838,14 @@ namespace osmium {
826838
loc_done.insert(cand.stop_location);
827839

828840
std::vector<candidate> candidates;
829-
find_candidates(candidates, loc_done, xrings, cand);
841+
try {
842+
find_candidates(candidates, loc_done, xrings, cand);
843+
} catch (const exceeded_max_depth&) {
844+
if (m_config.debug_level > 0) {
845+
std::cerr << " Exceeded max depth (" << static_cast<unsigned>(max_depth) << ")\n";
846+
}
847+
return false;
848+
}
830849

831850
if (candidates.empty()) {
832851
if (debug()) {

contrib/libosmium/osmium/area/detail/basic_assembler_with_tags.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2019 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2020 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111

contrib/libosmium/osmium/area/detail/node_ref_segment.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2019 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2020 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111

contrib/libosmium/osmium/area/detail/proto_ring.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2019 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2020 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111

contrib/libosmium/osmium/area/detail/segment_list.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2019 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2020 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111

contrib/libosmium/osmium/area/detail/vector.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2019 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2020 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111

0 commit comments

Comments
 (0)