Libosmium  2.20.0
Fast and flexible C++ library for working with OpenStreetMap data
Classes | Functions
osmium::relations Namespace Reference

Code related to the assembly of OSM relations. More...

Classes

class  Collector
 
class  MembersDatabase
 
class  MembersDatabaseCommon
 
class  RelationHandle
 
struct  relations_manager_memory_usage
 
class  RelationsDatabase
 
class  RelationsManager
 
class  RelationsManagerBase
 
class  SecondPassHandler
 

Functions

template<typename ... TManager>
void read_relations (const osmium::io::File &file, TManager &...managers)
 
template<typename ... TManager>
void read_relations (osmium::ProgressBar &progress_bar, const osmium::io::File &file, TManager &...managers)
 
template<typename TStream >
void print_used_memory (TStream &stream, const relations_manager_memory_usage &mu)
 

Detailed Description

Code related to the assembly of OSM relations.

Function Documentation

◆ print_used_memory()

template<typename TStream >
void osmium::relations::print_used_memory ( TStream &  stream,
const relations_manager_memory_usage mu 
)

Prints relations managers memory usage numbers to the specified stream.

Template Parameters
TStreamOutput stream type (like std::cout, std::cerr, or osmium::VerboseOutput).
Parameters
streamReference to stream where the output should go.
muMemory usage data as returned by the used_memory() functions of various relations managers.

◆ read_relations() [1/2]

template<typename ... TManager>
void osmium::relations::read_relations ( const osmium::io::File file,
TManager &...  managers 
)

Read relations from file and feed them into all the managers specified as parameters. Opens an osmium::io::Reader internally with the file parameter.

After the file is read, the prepare_for_lookup() function is called on all the managers making them ready for querying the data they have stored.

Template Parameters
TManagerAny number of relation manager types.
Parameters
fileThe file that should be opened with an osmium::io::Reader.
managersRelation managers we want the relations to be sent to.

◆ read_relations() [2/2]

template<typename ... TManager>
void osmium::relations::read_relations ( osmium::ProgressBar progress_bar,
const osmium::io::File file,
TManager &...  managers 
)

Read relations from file and feed them into all the managers specified as parameters. Opens an osmium::io::Reader internally with the file parameter.

After the file is read, the prepare_for_lookup() function is called on all the managers making them ready for querying the data they have stored.

Template Parameters
TManagerAny number of relation manager types.
Parameters
progress_barReference to osmium::ProgressBar object that will be updated while reading the data.
fileThe file that should be opened with an osmium::io::Reader.
managersRelation managers we want the relations to be sent to.