Libosmium: osmium::area::MultipolygonManager< 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 Attributes | List of all members
osmium::area::MultipolygonManager< TAssembler > Class Template Reference

`#include <multipolygon_manager.hpp>`

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

## Public Member Functions
| MultipolygonManager (assembler_config_type assembler_config, osmium::TagsFilter filter=osmium::TagsFilter{true})
const area_stats & | stats () const noexcept
bool | new_relation (const osmium::Relation &relation) const
void | complete_relation (const osmium::Relation &relation)
void | after_way (const osmium::Way &way)
Public Member Functions inherited from osmium::relations::RelationsManager< MultipolygonManager< TAssembler >, false, true, false >
| RelationsManager ()
SecondPassHandler< RelationsManager > & | handler (const std::function< void(osmium::memory::Buffer &&)> &callback=nullptr)
void | relation (const osmium::Relation &relation)
void | handle_node (const osmium::Node &node)
void | handle_way (const osmium::Way &way)
void | handle_relation (const osmium::Relation &relation)
void | for_each_incomplete_relation (TFunc &&func)
Public Member Functions inherited from osmium::relations::RelationsManagerBase
| RelationsManagerBase ()
osmium::relations::RelationsDatabase & | relations_database () noexcept
| Access the internal RelationsDatabase.
osmium::relations::MembersDatabase< osmium::Node > & | member_nodes_database () noexcept
| Access the internal database containing member nodes.
const osmium::relations::MembersDatabase< osmium::Node > & | member_nodes_database () const noexcept
| Access the internal database containing member nodes.
osmium::relations::MembersDatabase< osmium::Way > & | member_ways_database () noexcept
| Access the internal database containing member ways.
const osmium::relations::MembersDatabase< osmium::Way > & | member_ways_database () const noexcept
| Access the internal database containing member ways.
osmium::relations::MembersDatabase< osmium::Relation > & | member_relations_database () noexcept
| Access the internal database containing member relations.
const osmium::relations::MembersDatabase< osmium::Relation > & | member_relations_database () const noexcept
| Access the internal database containing member relations.
relations::MembersDatabaseCommon & | member_database (osmium::item_type type) noexcept
const relations::MembersDatabaseCommon & | member_database (osmium::item_type type) const noexcept
const osmium::OSMObject * | get_member_object (const osmium::RelationMember &member) const noexcept
const osmium::Node * | get_member_node (osmium::object_id_type id) const noexcept
const osmium::Way * | get_member_way (osmium::object_id_type id) const noexcept
const osmium::Relation * | get_member_relation (osmium::object_id_type id) const noexcept
void | prepare_for_lookup ()
relations_manager_memory_usage | used_memory () const noexcept
osmium::memory::Buffer & | buffer () noexcept
| Access the output buffer.
void | set_callback (const std::function< void(osmium::memory::Buffer &&)> &callback)
| Set the callback called when the output buffer is full.
void | flush_output ()
| Flush the output buffer.
void | possibly_flush ()
| Flush the output buffer if it is full.
osmium::memory::Buffer | read ()
| Return the contents of the output buffer.
Public Member Functions inherited from osmium::handler::Handler
void | osm_object (const osmium::OSMObject &) const noexcept
void | node (const osmium::Node &) const noexcept
void | way (const osmium::Way &) const noexcept
void | relation (const osmium::Relation &) const noexcept
void | area (const osmium::Area &) const noexcept
void | changeset (const osmium::Changeset &) const noexcept
void | tag_list (const osmium::TagList &) const noexcept
void | way_node_list (const osmium::WayNodeList &) const noexcept
void | relation_member_list (const osmium::RelationMemberList &) const noexcept
void | outer_ring (const osmium::OuterRing &) const noexcept
void | inner_ring (const osmium::InnerRing &) const noexcept
void | changeset_discussion (const osmium::ChangesetDiscussion &) const noexcept
void | flush () const noexcept

## Private Types
using | assembler_config_type = typename TAssembler::config_type

## Private Attributes
assembler_config_type | m_assembler_config
area_stats | m_stats
osmium::TagsFilter | m_filter

## Detailed Description

template<typename TAssembler>
class osmium::area::MultipolygonManager< 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 template class osmium::relations::RelationsManager.

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.

## Member Typedef Documentation

## ◆ assembler_config_type

template<typename TAssembler>

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

## Constructor & Destructor Documentation

## ◆ MultipolygonManager()

template<typename TAssembler>

osmium::area::MultipolygonManager< TAssembler >::MultipolygonManager | ( | assembler_config_type | assembler_config,
|  | osmium::TagsFilter | filter = osmium::TagsFilter{true} )
| inlineexplicit

Construct a MultipolygonManager.

Parameters

  assembler_config | The configuration that will be given to any newly constructed area assembler.
  filter | An optional filter specifying what tags are needed on closed ways or multipolygon relations to build the area.

## Member Function Documentation

## ◆ after_way()

template<typename TAssembler>

void osmium::area::MultipolygonManager< TAssembler >::after_way | ( | const osmium::Way & | way | ) |
| inline

## ◆ complete_relation()

template<typename TAssembler>

void osmium::area::MultipolygonManager< TAssembler >::complete_relation | ( | const osmium::Relation & | relation | ) |
| inline

This is called when a relation is complete, ie. all members were found in the input. It will build the area using the assembler.

## ◆ new_relation()

template<typename TAssembler>

bool osmium::area::MultipolygonManager< TAssembler >::new_relation | ( | const osmium::Relation & | relation | ) | const
| inline

We are interested in all relations tagged with type=multipolygon or type=boundary with at least one way member.

## ◆ stats()

template<typename TAssembler>

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

Access the aggregated statistics generated by the assemblers called from the manager.

## Member Data Documentation

## ◆ m_assembler_config

template<typename TAssembler>

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

## ◆ m_filter

template<typename TAssembler>

osmium::TagsFilter osmium::area::MultipolygonManager< TAssembler >::m_filter
| private

## ◆ m_stats

template<typename TAssembler>

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

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

- include/osmium/area/multipolygon_manager.hpp