1#ifndef OSMIUM_AREA_MULTIPOLYGON_MANAGER_LEGACY_HPP
2#define OSMIUM_AREA_MULTIPOLYGON_MANAGER_LEGACY_HPP
77 template <
typename TAssembler>
110 const char*
type =
relation.tags().get_value_by_key(
"type");
117 if ((!std::strcmp(
type,
"multipolygon")) || (!std::strcmp(
type,
"boundary"))) {
119 return member.type() == osmium::item_type::way;
132 std::vector<const osmium::Way*> ways;
133 ways.reserve(
relation.members().size());
134 for (
const auto& member :
relation.members()) {
135 if (member.ref() != 0) {
137 assert(ways.back() !=
nullptr);
144 m_stats += assembler.stats();
156 if (
way.nodes().size() <= 3) {
160 if (!
way.nodes().front().location() || !
way.nodes().back().location()) {
163 if (
way.ends_have_same_location()) {
167 m_stats += assembler.stats();
Definition: relation.hpp:56
Definition: relation.hpp:161
Definition: multipolygon_manager_legacy.hpp:78
const area_stats & stats() const noexcept
Definition: multipolygon_manager_legacy.hpp:101
void way_not_in_any_relation(const osmium::Way &way)
Definition: multipolygon_manager_legacy.hpp:154
MultipolygonManagerLegacy(const assembler_config_type &assembler_config)
Definition: multipolygon_manager_legacy.hpp:93
typename TAssembler::config_type assembler_config_type
Definition: multipolygon_manager_legacy.hpp:80
void complete_relation(const osmium::Relation &relation)
Definition: multipolygon_manager_legacy.hpp:131
const assembler_config_type m_assembler_config
Definition: multipolygon_manager_legacy.hpp:81
area_stats m_stats
Definition: multipolygon_manager_legacy.hpp:83
bool new_relation(const osmium::Relation &relation) const
Definition: multipolygon_manager_legacy.hpp:109
void way(const osmium::Way &) const noexcept
Definition: handler.hpp:81
osmium::memory::Buffer & buffer() noexcept
Access the output buffer.
Definition: relations_manager.hpp:259
const osmium::Way * get_member_way(osmium::object_id_type id) const noexcept
Definition: relations_manager.hpp:213
Definition: relations_manager.hpp:305
void relation(const osmium::Relation &relation)
Definition: relations_manager.hpp:488
type
Definition: entity_bits.hpp:63
@ area
Definition: entity_bits.hpp:72
Namespace for everything in the Osmium library.
Definition: assembler.hpp:53
Definition: location.hpp:53