Libosmium: osmium::area::MultipolygonCollector< TAssembler > Class Template Reference

Libosmium Fast and flexible C++ library for working with OpenStreetMap data

Loading...
Searching...
No Matches
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
osmium::area::MultipolygonCollector< TAssembler > Class Template Reference

`#include <multipolygon_collector.hpp>`

Inheritance diagram for osmium::area::MultipolygonCollector< TAssembler >:
[legend]
Collaboration diagram for osmium::area::MultipolygonCollector< TAssembler >:
[legend]

## Public Member Functions
| MultipolygonCollector (const assembler_config_type &assembler_config)
const area_stats & | stats () const noexcept
bool | keep_relation (const osmium::Relation &relation) const
bool | keep_member (const osmium::relations::RelationMeta &, const osmium::RelationMember &member) const
void | way_not_in_any_relation (const osmium::Way &way)
void | complete_relation (const osmium::relations::RelationMeta &relation_meta)
void | flush ()
osmium::memory::Buffer | read ()
Public Member Functions inherited from osmium::relations::Collector< MultipolygonCollector< TAssembler >, false, true, false >
| Collector ()
uint64_t | used_memory () const
HandlerPass2 & | handler (const callback_func_type &callback=nullptr)
osmium::memory::Buffer & | members_buffer ()
bool | is_available (osmium::item_type type, osmium::object_id_type id)
size_t | get_offset (osmium::item_type type, osmium::object_id_type id)
std::pair< bool, size_t > | get_availability_and_offset (osmium::item_type type, osmium::object_id_type id)
void | read_relations (TIter begin, TIter end)
void | read_relations (TSource &source)
void | moving_in_buffer (size_t old_offset, size_t new_offset)
void | possibly_purge_removed_members ()
std::vector< const osmium::Relation * > | get_incomplete_relations () const

## Private Types
enum | { initial_output_buffer_size = 1024UL * 1024UL }
enum | { max_buffer_size_for_flush = 100UL * 1024UL }
using | collector_type = osmium::relations::Collector<MultipolygonCollector<TAssembler>, false, true, false>
using | assembler_config_type = typename TAssembler::config_type

## Private Member Functions
void | flush_output_buffer ()
void | possibly_flush_output_buffer ()

## Private Attributes
assembler_config_type | m_assembler_config
osmium::memory::Buffer | m_output_buffer
area_stats | m_stats

## Additional Inherited Members
Protected Member Functions inherited from osmium::relations::Collector< MultipolygonCollector< TAssembler >, false, true, false >
std::vector< MemberMeta > & | member_meta (const item_type type)
callback_func_type | callback ()
const std::vector< RelationMeta > & | relations () const
bool | keep_relation (const osmium::Relation &) const
bool | keep_member (const RelationMeta &, const osmium::RelationMember &) const
void | node_not_in_any_relation (const osmium::Node &)
void | way_not_in_any_relation (const osmium::Way &)
void | relation_not_in_any_relation (const osmium::Relation &)
void | flush ()
const osmium::Relation & | get_relation (size_t offset) const
const osmium::Relation & | get_relation (const RelationMeta &relation_meta) const
const osmium::Relation & | get_relation (const MemberMeta &member_meta) const
osmium::OSMObject & | get_member (size_t offset) const

## Detailed Description

template<typename TAssembler>
class osmium::area::MultipolygonCollector< TAssembler >

This class collects all data needed for creating areas from relations tagged with type=multipolygon or type=boundary. Most of its functionality is derived from the parent class osmium::relations::Collector.

The actual assembling of the areas is done by the assembler class given as template argument.

Template Parameters

  TAssembler | Multipolygon Assembler class.

Precondition
  The Ids of all objects must be unique in the input data.

Deprecated
  Use MultipolygonManager instead.

## Member Typedef Documentation

## ◆ assembler_config_type

template<typename TAssembler>

using osmium::area::MultipolygonCollector< TAssembler >::assembler_config_type = typename TAssembler::config_type
| private

## ◆ collector_type

template<typename TAssembler>

using osmium::area::MultipolygonCollector< TAssembler >::collector_type = osmium::relations::Collector<MultipolygonCollector<TAssembler>, false, true, false>
| private

## Member Enumeration Documentation

## ◆ anonymous enum

template<typename TAssembler>

anonymous enum
| private

Enumerator
max_buffer_size_for_flush |

## ◆ anonymous enum

template<typename TAssembler>

anonymous enum
| private

Enumerator
initial_output_buffer_size |

## Constructor & Destructor Documentation

## ◆ MultipolygonCollector()

template<typename TAssembler>

osmium::area::MultipolygonCollector< TAssembler >::MultipolygonCollector | ( | const assembler_config_type & | assembler_config | ) |
| inlineexplicit

## Member Function Documentation

## ◆ complete_relation()

template<typename TAssembler>

void osmium::area::MultipolygonCollector< TAssembler >::complete_relation | ( | const osmium::relations::RelationMeta & | relation_meta | ) |
| inline

## ◆ flush()

template<typename TAssembler>

void osmium::area::MultipolygonCollector< TAssembler >::flush | ( |  | ) |
| inline

## ◆ flush_output_buffer()

template<typename TAssembler>

void osmium::area::MultipolygonCollector< TAssembler >::flush_output_buffer | ( |  | ) |
| inlineprivate

## ◆ keep_member()

template<typename TAssembler>

bool osmium::area::MultipolygonCollector< TAssembler >::keep_member | ( | const osmium::relations::RelationMeta & | ,
|  | const osmium::RelationMember & | member ) const
| inline

Overwritten from the base class.

## ◆ keep_relation()

template<typename TAssembler>

bool osmium::area::MultipolygonCollector< TAssembler >::keep_relation | ( | const osmium::Relation & | relation | ) | const
| inline

We are interested in all relations tagged with type=multipolygon or type=boundary.

Overwritten from the base class.

## ◆ possibly_flush_output_buffer()

template<typename TAssembler>

void osmium::area::MultipolygonCollector< TAssembler >::possibly_flush_output_buffer | ( |  | ) |
| inlineprivate

## ◆ read()

template<typename TAssembler>

osmium::memory::Buffer osmium::area::MultipolygonCollector< TAssembler >::read | ( |  | ) |
| inline

## ◆ stats()

template<typename TAssembler>

const area_stats & osmium::area::MultipolygonCollector< TAssembler >::stats | ( |  | ) | const
| inlinenoexcept

## ◆ way_not_in_any_relation()

template<typename TAssembler>

void osmium::area::MultipolygonCollector< TAssembler >::way_not_in_any_relation | ( | const osmium::Way & | way | ) |
| inline

This is called when a way is not in any multipolygon relation.

Overwritten from the base class.

## Member Data Documentation

## ◆ m_assembler_config

template<typename TAssembler>

assembler_config_type osmium::area::MultipolygonCollector< TAssembler >::m_assembler_config
| private

## ◆ m_output_buffer

template<typename TAssembler>

osmium::memory::Buffer osmium::area::MultipolygonCollector< TAssembler >::m_output_buffer
| private

## ◆ m_stats

template<typename TAssembler>

area_stats osmium::area::MultipolygonCollector< TAssembler >::m_stats
| private

The documentation for this class was generated from the following file:

- include/osmium/area/multipolygon_collector.hpp