Public Member Functions | Data Fields
osm::Node Class Reference

Represents Node in OpenStreetMap (a point on map) More...

#include <Node.h>

Inheritance diagram for osm::Node:
osm::Element

Public Member Functions

 Node ()
 Node (int64_t id, double lat=0, double lon=0)
 Constructs a node with given id and position.
virtual ~Node ()
boost::property_tree::ptree get_description ()
osm::ObjectType get_type () 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.
bool operator== (Node const &other) const
bool operator!= (Node const &other) const
virtual int64_t get_id () const

Data Fields

int64_t id
geo::Point position
 Position of this Node.
std::set< osm::Tagtags
 Attributes of this Node.

Detailed Description

Represents Node in OpenStreetMap (a point on map)

Definition at line 23 of file Node.h.


Constructor & Destructor Documentation

osm::Node::Node ( )

Definition at line 15 of file Node.cpp.

osm::Node::Node ( int64_t  id,
double  lat = 0,
double  lon = 0 
)

Constructs a node with given id and position.

Parameters:
id
latlatitude
lonlongitude

Definition at line 19 of file Node.cpp.

osm::Node::~Node ( ) [virtual]

Definition at line 25 of file Node.cpp.


Member Function Documentation

void osm::Node::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.

Parameters:
dbto use when inserting
parentidrelation id
rolerole to use when inserting

Implements osm::Element.

Definition at line 56 of file Node.cpp.

void osm::Node::fill ( osmdb::PropertiesSelection db) [virtual]

Fill attributes and possibly other information from db.

Parameters:
db

Implements osm::Element.

Definition at line 49 of file Node.cpp.

boost::property_tree::ptree osm::Node::get_description ( ) [virtual]
Returns:
a description of this element (used for displaying)

Implements osm::Element.

Definition at line 34 of file Node.cpp.

int64_t osm::Node::get_id ( ) const [virtual]
Returns:
id of this element

Implements osm::Element.

Definition at line 71 of file Node.cpp.

osm::ObjectType osm::Node::get_type ( ) const [virtual]
Returns:
the type of this element

Implements osm::Element.

Definition at line 61 of file Node.cpp.

bool osm::Node::operator!= ( Node const &  other) const

Definition at line 66 of file Node.cpp.

bool osm::Node::operator== ( Node const &  other) const

Definition at line 29 of file Node.cpp.


Field Documentation

int64_t osm::Node::id

Definition at line 35 of file Node.h.

Position of this Node.

Definition at line 39 of file Node.h.

Attributes of this Node.

Definition at line 43 of file Node.h.


The documentation for this class was generated from the following files:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines