Represents a relation in OpenStreetMap. More...
#include <Relation.h>
Public Member Functions | |
Relation () | |
Relation (int64_t id) | |
Constructs a Relation with given id. | |
virtual | ~Relation () |
boost::property_tree::ptree | get_description () |
osm::ObjectType | get_type () const |
bool | operator== (Relation const &r) const |
bool | operator!= (Relation const &r) const |
void | fill (osmdb::PropertiesSelection &db) |
Fill attributes and possibly other information from db. | |
void | add_to_relation (osmdb::ElementImporter &db, int64_t relation, std::string const &role) |
Execute the needed method of db to insert this element as member into relation. | |
virtual int64_t | get_id () const |
void | add_node (std::string const &role, osm::Node const &nd) |
void | add_way (std::string const &role, osm::Way const &w) |
void | add_rel (std::string const &role, osm::Relation const &r) |
Data Fields | |
int64_t | id |
std::multimap< std::string, std::shared_ptr< osm::Element > > | members |
Member elements of this relation. | |
std::set< osm::Tag > | tags |
Attributes of this relation. |
Represents a relation in OpenStreetMap.
Definition at line 26 of file Relation.h.
osm::Relation::Relation | ( | ) |
Definition at line 16 of file Relation.cpp.
osm::Relation::Relation | ( | int64_t | id | ) |
osm::Relation::~Relation | ( | ) | [virtual] |
Definition at line 25 of file Relation.cpp.
void osm::Relation::add_node | ( | std::string const & | role, |
osm::Node const & | nd | ||
) |
Definition at line 98 of file Relation.cpp.
void osm::Relation::add_rel | ( | std::string const & | role, |
osm::Relation const & | r | ||
) |
Definition at line 108 of file Relation.cpp.
void osm::Relation::add_to_relation | ( | osmdb::ElementImporter & | db, |
int64_t | parentid, | ||
std::string const & | role | ||
) | [virtual] |
Execute the needed method of db to insert this element as member into relation.
db | to use when inserting |
parentid | relation id |
role | role to use when inserting |
Implements osm::Element.
Definition at line 93 of file Relation.cpp.
void osm::Relation::add_way | ( | std::string const & | role, |
osm::Way const & | w | ||
) |
Definition at line 103 of file Relation.cpp.
void osm::Relation::fill | ( | osmdb::PropertiesSelection & | db | ) | [virtual] |
Fill attributes and possibly other information from db.
db |
Implements osm::Element.
Definition at line 69 of file Relation.cpp.
boost::property_tree::ptree osm::Relation::get_description | ( | ) | [virtual] |
Implements osm::Element.
Definition at line 45 of file Relation.cpp.
int64_t osm::Relation::get_id | ( | ) | const [virtual] |
osm::ObjectType osm::Relation::get_type | ( | ) | const [virtual] |
Implements osm::Element.
Definition at line 29 of file Relation.cpp.
bool osm::Relation::operator!= | ( | Relation const & | r | ) | const |
Definition at line 40 of file Relation.cpp.
bool osm::Relation::operator== | ( | Relation const & | r | ) | const |
Definition at line 34 of file Relation.cpp.
int64_t osm::Relation::id |
Definition at line 36 of file Relation.h.
std::multimap<std::string, std::shared_ptr<osm::Element> > osm::Relation::members |
Member elements of this relation.
Definition at line 40 of file Relation.h.
std::set<osm::Tag> osm::Relation::tags |
Attributes of this relation.
Definition at line 44 of file Relation.h.