1#ifndef OSMIUM_AREA_MULTIPOLYGON_MANAGER_HPP
2#define OSMIUM_AREA_MULTIPOLYGON_MANAGER_HPP
75 template <
typename TAssembler>
114 const char*
type =
relation.tags().get_value_by_key(
"type");
117 if (
type ==
nullptr) {
123 return member.type() == osmium::item_type::way;
136 std::vector<const osmium::Way*> ways;
137 ways.reserve(
relation.members().size());
138 for (
const auto& member :
relation.members()) {
139 if (member.ref() != 0) {
141 assert(ways.back() !=
nullptr);
148 m_stats += assembler.stats();
156 if (
way.nodes().size() <= 3) {
161 if (!
way.nodes().front().location() || !
way.nodes().back().location()) {
164 if (
way.ends_have_same_location()) {
165 if (
way.tags().has_tag(
"area",
"no")) {
175 m_stats += assembler.stats();
Definition: relation.hpp:56
Definition: relation.hpp:161
Definition: multipolygon_manager.hpp:76
const assembler_config_type m_assembler_config
Definition: multipolygon_manager.hpp:79
const area_stats & stats() const noexcept
Definition: multipolygon_manager.hpp:105
bool new_relation(const osmium::Relation &relation) const
Definition: multipolygon_manager.hpp:113
area_stats m_stats
Definition: multipolygon_manager.hpp:81
typename TAssembler::config_type assembler_config_type
Definition: multipolygon_manager.hpp:78
void complete_relation(const osmium::Relation &relation)
Definition: multipolygon_manager.hpp:135
MultipolygonManager(assembler_config_type assembler_config, osmium::TagsFilter filter=osmium::TagsFilter{true})
Definition: multipolygon_manager.hpp:96
osmium::TagsFilter m_filter
Definition: multipolygon_manager.hpp:83
void after_way(const osmium::Way &way)
Definition: multipolygon_manager.hpp:154
void way(const osmium::Way &) const noexcept
Definition: handler.hpp:81
void possibly_flush()
Flush the output buffer if it is full.
Definition: relations_manager.hpp:274
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