Libosmium  2.1.0
Fast and flexible C++ library for working with OpenStreetMap data
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
osmium::geom::GeometryFactory< TGeomImpl, TProjection > Class Template Reference

#include <factory.hpp>

Public Types

typedef TGeomImpl::point_type point_type
 
typedef TGeomImpl::linestring_type linestring_type
 
typedef TGeomImpl::polygon_type polygon_type
 
typedef
TGeomImpl::multipolygon_type 
multipolygon_type
 
typedef TGeomImpl::ring_type ring_type
 

Public Member Functions

template<class... TArgs>
 GeometryFactory (TArgs &&...args)
 
template<class... TArgs>
 GeometryFactory (TProjection &&projection, TArgs &&...args)
 
int epsg () const
 
std::string proj_string () const
 
point_type create_point (const osmium::Location location) const
 
point_type create_point (const osmium::Node &node)
 
point_type create_point (const osmium::NodeRef &node_ref)
 
void linestring_start ()
 
template<class TIter >
size_t fill_linestring (TIter it, TIter end)
 
template<class TIter >
size_t fill_linestring_unique (TIter it, TIter end)
 
linestring_type linestring_finish (size_t num_points)
 
linestring_type create_linestring (const osmium::WayNodeList &wnl, use_nodes un=use_nodes::unique, direction dir=direction::forward)
 
linestring_type create_linestring (const osmium::Way &way, use_nodes un=use_nodes::unique, direction dir=direction::forward)
 
void polygon_start ()
 
template<class TIter >
size_t fill_polygon (TIter it, TIter end)
 
template<class TIter >
size_t fill_polygon_unique (TIter it, TIter end)
 
polygon_type polygon_finish (size_t num_points)
 
multipolygon_type create_multipolygon (const osmium::Area &area)
 

Private Member Functions

void add_points (const osmium::OuterRing &nodes)
 

Private Attributes

TProjection m_projection
 
TGeomImpl m_impl
 

Detailed Description

template<class TGeomImpl, class TProjection = IdentityProjection>
class osmium::geom::GeometryFactory< TGeomImpl, TProjection >

Geometry factory.

Member Typedef Documentation

template<class TGeomImpl, class TProjection = IdentityProjection>
typedef TGeomImpl::linestring_type osmium::geom::GeometryFactory< TGeomImpl, TProjection >::linestring_type
template<class TGeomImpl, class TProjection = IdentityProjection>
typedef TGeomImpl::multipolygon_type osmium::geom::GeometryFactory< TGeomImpl, TProjection >::multipolygon_type
template<class TGeomImpl, class TProjection = IdentityProjection>
typedef TGeomImpl::point_type osmium::geom::GeometryFactory< TGeomImpl, TProjection >::point_type
template<class TGeomImpl, class TProjection = IdentityProjection>
typedef TGeomImpl::polygon_type osmium::geom::GeometryFactory< TGeomImpl, TProjection >::polygon_type
template<class TGeomImpl, class TProjection = IdentityProjection>
typedef TGeomImpl::ring_type osmium::geom::GeometryFactory< TGeomImpl, TProjection >::ring_type

Constructor & Destructor Documentation

template<class TGeomImpl, class TProjection = IdentityProjection>
template<class... TArgs>
osmium::geom::GeometryFactory< TGeomImpl, TProjection >::GeometryFactory ( TArgs &&...  args)
inline

Constructor for default initialized projection.

template<class TGeomImpl, class TProjection = IdentityProjection>
template<class... TArgs>
osmium::geom::GeometryFactory< TGeomImpl, TProjection >::GeometryFactory ( TProjection &&  projection,
TArgs &&...  args 
)
inline

Constructor for explicitly initialized projection. Note that the projection is moved into the GeometryFactory.

Member Function Documentation

template<class TGeomImpl, class TProjection = IdentityProjection>
void osmium::geom::GeometryFactory< TGeomImpl, TProjection >::add_points ( const osmium::OuterRing nodes)
inlineprivate

Add all points of an outer or inner ring to a multipolygon.

template<class TGeomImpl, class TProjection = IdentityProjection>
linestring_type osmium::geom::GeometryFactory< TGeomImpl, TProjection >::create_linestring ( const osmium::WayNodeList wnl,
use_nodes  un = use_nodes::unique,
direction  dir = direction::forward 
)
inline
template<class TGeomImpl, class TProjection = IdentityProjection>
linestring_type osmium::geom::GeometryFactory< TGeomImpl, TProjection >::create_linestring ( const osmium::Way way,
use_nodes  un = use_nodes::unique,
direction  dir = direction::forward 
)
inline
template<class TGeomImpl, class TProjection = IdentityProjection>
multipolygon_type osmium::geom::GeometryFactory< TGeomImpl, TProjection >::create_multipolygon ( const osmium::Area area)
inline
template<class TGeomImpl, class TProjection = IdentityProjection>
point_type osmium::geom::GeometryFactory< TGeomImpl, TProjection >::create_point ( const osmium::Location  location) const
inline
template<class TGeomImpl, class TProjection = IdentityProjection>
point_type osmium::geom::GeometryFactory< TGeomImpl, TProjection >::create_point ( const osmium::Node node)
inline
template<class TGeomImpl, class TProjection = IdentityProjection>
point_type osmium::geom::GeometryFactory< TGeomImpl, TProjection >::create_point ( const osmium::NodeRef node_ref)
inline
template<class TGeomImpl, class TProjection = IdentityProjection>
int osmium::geom::GeometryFactory< TGeomImpl, TProjection >::epsg ( ) const
inline
template<class TGeomImpl, class TProjection = IdentityProjection>
template<class TIter >
size_t osmium::geom::GeometryFactory< TGeomImpl, TProjection >::fill_linestring ( TIter  it,
TIter  end 
)
inline
template<class TGeomImpl, class TProjection = IdentityProjection>
template<class TIter >
size_t osmium::geom::GeometryFactory< TGeomImpl, TProjection >::fill_linestring_unique ( TIter  it,
TIter  end 
)
inline
template<class TGeomImpl, class TProjection = IdentityProjection>
template<class TIter >
size_t osmium::geom::GeometryFactory< TGeomImpl, TProjection >::fill_polygon ( TIter  it,
TIter  end 
)
inline
template<class TGeomImpl, class TProjection = IdentityProjection>
template<class TIter >
size_t osmium::geom::GeometryFactory< TGeomImpl, TProjection >::fill_polygon_unique ( TIter  it,
TIter  end 
)
inline
template<class TGeomImpl, class TProjection = IdentityProjection>
linestring_type osmium::geom::GeometryFactory< TGeomImpl, TProjection >::linestring_finish ( size_t  num_points)
inline
template<class TGeomImpl, class TProjection = IdentityProjection>
void osmium::geom::GeometryFactory< TGeomImpl, TProjection >::linestring_start ( )
inline
template<class TGeomImpl, class TProjection = IdentityProjection>
polygon_type osmium::geom::GeometryFactory< TGeomImpl, TProjection >::polygon_finish ( size_t  num_points)
inline
template<class TGeomImpl, class TProjection = IdentityProjection>
void osmium::geom::GeometryFactory< TGeomImpl, TProjection >::polygon_start ( )
inline
template<class TGeomImpl, class TProjection = IdentityProjection>
std::string osmium::geom::GeometryFactory< TGeomImpl, TProjection >::proj_string ( ) const
inline

Member Data Documentation

template<class TGeomImpl, class TProjection = IdentityProjection>
TGeomImpl osmium::geom::GeometryFactory< TGeomImpl, TProjection >::m_impl
private
template<class TGeomImpl, class TProjection = IdentityProjection>
TProjection osmium::geom::GeometryFactory< TGeomImpl, TProjection >::m_projection
private

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