Osmium  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends
Osmium::OSM::Way Class Reference

#include <way.hpp>

Inheritance diagram for Osmium::OSM::Way:
Inheritance graph
[legend]
Collaboration diagram for Osmium::OSM::Way:
Collaboration graph
[legend]

List of all members.

Classes

struct  JavascriptTemplate

Public Member Functions

 Way ()
 Construct a Way object.
 Way (int size_of_node_list)
 Way (const Way &w)
 Copy a Way object.
const WayNodeListnodes () const
WayNodeListnodes ()
osm_object_type_t get_type () const
osm_object_id_t get_node_id (osm_sequence_id_t n) const
double get_lon (osm_sequence_id_t n) const
double get_lat (osm_sequence_id_t n) const
void add_node (osm_object_id_t ref)
osm_sequence_id_t node_count () const
osm_object_id_t get_first_node_id () const
osm_object_id_t get_last_node_id () const
bool is_closed () const
geos::geom::Point * get_first_node_geometry () const
geos::geom::Point * get_last_node_geometry () const
geos::geom::Geometry * create_geos_geometry () const
v8::Handle< v8::Value > js_nodes () const
v8::Handle< v8::Value > js_geom () const
v8::Handle< v8::Value > js_reverse_geom () const
v8::Handle< v8::Value > js_polygon_geom () const

Private Member Functions

void init ()

Private Attributes

WayNodeList m_node_list

Friends

bool operator< (const Way &lhs, const Way &rhs)
bool operator< (const shared_ptr< Way const > &lhs, const shared_ptr< Way const > &rhs)

Constructor & Destructor Documentation

Osmium::OSM::Way::Way ( ) [inline]

Construct a Way object.

Osmium::OSM::Way::Way ( int  size_of_node_list) [inline]
Osmium::OSM::Way::Way ( const Way w) [inline]

Copy a Way object.


Member Function Documentation

Add a node with the given id to the way.

Will throw a range error if the way already has max_nodes_in_way nodes.

geos::geom::Geometry* Osmium::OSM::Way::create_geos_geometry ( ) const [inline]

Returns the GEOS geometry of the way. Caller takes ownership of the pointer.

geos::geom::Point* Osmium::OSM::Way::get_first_node_geometry ( ) const [inline]

Returns the GEOS geometry of the first node. Caller takes ownership of the pointer.

Returns the id of the first node.

geos::geom::Point* Osmium::OSM::Way::get_last_node_geometry ( ) const [inline]

Returns the GEOS geometry of the last node. Caller takes ownership of the pointer.

Returns the id of the last node.

double Osmium::OSM::Way::get_lat ( osm_sequence_id_t  n) const [inline]
double Osmium::OSM::Way::get_lon ( osm_sequence_id_t  n) const [inline]
osm_object_type_t Osmium::OSM::Way::get_type ( ) const [inline, virtual]

Implements Osmium::OSM::Object.

void Osmium::OSM::Way::init ( ) [inline, private]
bool Osmium::OSM::Way::is_closed ( ) const [inline]

Check whether this way is closed. A way is closed if the first and last node have the same id.

v8::Handle< v8::Value > Osmium::OSM::Way::js_geom ( ) const
v8::Handle<v8::Value> Osmium::OSM::Way::js_nodes ( ) const [inline]
v8::Handle< v8::Value > Osmium::OSM::Way::js_polygon_geom ( ) const
v8::Handle< v8::Value > Osmium::OSM::Way::js_reverse_geom ( ) const

Returns the number of nodes in this way.

const WayNodeList& Osmium::OSM::Way::nodes ( ) const [inline]

Friends And Related Function Documentation

bool operator< ( const Way lhs,
const Way rhs 
) [friend]

Ways can be ordered by id and version. Note that we use the absolute value of the id for a better ordering of objects with negative ids.

bool operator< ( const shared_ptr< Way const > &  lhs,
const shared_ptr< Way const > &  rhs 
) [friend]

Ordering for shared_ptrs of Ways.


Member Data Documentation


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