Libosmium  2.20.0
Fast and flexible C++ library for working with OpenStreetMap data
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>

Collaboration diagram for osmium::geom::GeometryFactory< TGeomImpl, TProjection >:
Collaboration graph
[legend]

Public Types

using projection_type = TProjection
 
using point_type = typename TGeomImpl::point_type
 
using linestring_type = typename TGeomImpl::linestring_type
 
using polygon_type = typename TGeomImpl::polygon_type
 
using multipolygon_type = typename TGeomImpl::multipolygon_type
 
using ring_type = typename TGeomImpl::ring_type
 

Public Member Functions

 GeometryFactory ()
 
template<typename... TArgs>
 GeometryFactory (TArgs &&... args)
 
template<typename... TArgs>
 GeometryFactory (TProjection &&projection, TArgs &&... args)
 
int epsg () const noexcept
 
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<typename TIter >
size_t fill_linestring (TIter it, TIter end)
 
template<typename 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<typename TIter >
size_t fill_polygon (TIter it, TIter end)
 
template<typename TIter >
size_t fill_polygon_unique (TIter it, TIter end)
 
polygon_type polygon_finish (size_t num_points)
 
polygon_type create_polygon (const osmium::WayNodeList &wnl, use_nodes un=use_nodes::unique, direction dir=direction::forward)
 
polygon_type create_polygon (const osmium::Way &way, use_nodes un=use_nodes::unique, direction dir=direction::forward)
 
multipolygon_type create_multipolygon (const osmium::Area &area)
 

Private Member Functions

void add_points (const osmium::NodeRefList &nodes)
 

Private Attributes

TProjection m_projection
 
TGeomImpl m_impl
 

Detailed Description

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

Geometry factory.

Member Typedef Documentation

◆ linestring_type

template<typename TGeomImpl , typename TProjection = IdentityProjection>
using osmium::geom::GeometryFactory< TGeomImpl, TProjection >::linestring_type = typename TGeomImpl::linestring_type

◆ multipolygon_type

template<typename TGeomImpl , typename TProjection = IdentityProjection>
using osmium::geom::GeometryFactory< TGeomImpl, TProjection >::multipolygon_type = typename TGeomImpl::multipolygon_type

◆ point_type

template<typename TGeomImpl , typename TProjection = IdentityProjection>
using osmium::geom::GeometryFactory< TGeomImpl, TProjection >::point_type = typename TGeomImpl::point_type

◆ polygon_type

template<typename TGeomImpl , typename TProjection = IdentityProjection>
using osmium::geom::GeometryFactory< TGeomImpl, TProjection >::polygon_type = typename TGeomImpl::polygon_type

◆ projection_type

template<typename TGeomImpl , typename TProjection = IdentityProjection>
using osmium::geom::GeometryFactory< TGeomImpl, TProjection >::projection_type = TProjection

◆ ring_type

template<typename TGeomImpl , typename TProjection = IdentityProjection>
using osmium::geom::GeometryFactory< TGeomImpl, TProjection >::ring_type = typename TGeomImpl::ring_type

Constructor & Destructor Documentation

◆ GeometryFactory() [1/3]

template<typename TGeomImpl , typename TProjection = IdentityProjection>
osmium::geom::GeometryFactory< TGeomImpl, TProjection >::GeometryFactory ( )
inline

◆ GeometryFactory() [2/3]

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

Constructor for default initialized projection.

◆ GeometryFactory() [3/3]

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

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

Member Function Documentation

◆ add_points()

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

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

◆ create_linestring() [1/2]

template<typename TGeomImpl , typename 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

◆ create_linestring() [2/2]

template<typename TGeomImpl , typename 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

◆ create_multipolygon()

template<typename TGeomImpl , typename TProjection = IdentityProjection>
multipolygon_type osmium::geom::GeometryFactory< TGeomImpl, TProjection >::create_multipolygon ( const osmium::Area area)
inline

◆ create_point() [1/3]

template<typename TGeomImpl , typename TProjection = IdentityProjection>
point_type osmium::geom::GeometryFactory< TGeomImpl, TProjection >::create_point ( const osmium::Location location) const
inline

◆ create_point() [2/3]

template<typename TGeomImpl , typename TProjection = IdentityProjection>
point_type osmium::geom::GeometryFactory< TGeomImpl, TProjection >::create_point ( const osmium::Node node)
inline

◆ create_point() [3/3]

template<typename TGeomImpl , typename TProjection = IdentityProjection>
point_type osmium::geom::GeometryFactory< TGeomImpl, TProjection >::create_point ( const osmium::NodeRef node_ref)
inline

◆ create_polygon() [1/2]

template<typename TGeomImpl , typename TProjection = IdentityProjection>
polygon_type osmium::geom::GeometryFactory< TGeomImpl, TProjection >::create_polygon ( const osmium::Way way,
use_nodes  un = use_nodes::unique,
direction  dir = direction::forward 
)
inline

◆ create_polygon() [2/2]

template<typename TGeomImpl , typename TProjection = IdentityProjection>
polygon_type osmium::geom::GeometryFactory< TGeomImpl, TProjection >::create_polygon ( const osmium::WayNodeList wnl,
use_nodes  un = use_nodes::unique,
direction  dir = direction::forward 
)
inline

◆ epsg()

template<typename TGeomImpl , typename TProjection = IdentityProjection>
int osmium::geom::GeometryFactory< TGeomImpl, TProjection >::epsg ( ) const
inlinenoexcept

◆ fill_linestring()

template<typename TGeomImpl , typename TProjection = IdentityProjection>
template<typename TIter >
size_t osmium::geom::GeometryFactory< TGeomImpl, TProjection >::fill_linestring ( TIter  it,
TIter  end 
)
inline

◆ fill_linestring_unique()

template<typename TGeomImpl , typename TProjection = IdentityProjection>
template<typename TIter >
size_t osmium::geom::GeometryFactory< TGeomImpl, TProjection >::fill_linestring_unique ( TIter  it,
TIter  end 
)
inline

◆ fill_polygon()

template<typename TGeomImpl , typename TProjection = IdentityProjection>
template<typename TIter >
size_t osmium::geom::GeometryFactory< TGeomImpl, TProjection >::fill_polygon ( TIter  it,
TIter  end 
)
inline

◆ fill_polygon_unique()

template<typename TGeomImpl , typename TProjection = IdentityProjection>
template<typename TIter >
size_t osmium::geom::GeometryFactory< TGeomImpl, TProjection >::fill_polygon_unique ( TIter  it,
TIter  end 
)
inline

◆ linestring_finish()

template<typename TGeomImpl , typename TProjection = IdentityProjection>
linestring_type osmium::geom::GeometryFactory< TGeomImpl, TProjection >::linestring_finish ( size_t  num_points)
inline

◆ linestring_start()

template<typename TGeomImpl , typename TProjection = IdentityProjection>
void osmium::geom::GeometryFactory< TGeomImpl, TProjection >::linestring_start ( )
inline

◆ polygon_finish()

template<typename TGeomImpl , typename TProjection = IdentityProjection>
polygon_type osmium::geom::GeometryFactory< TGeomImpl, TProjection >::polygon_finish ( size_t  num_points)
inline

◆ polygon_start()

template<typename TGeomImpl , typename TProjection = IdentityProjection>
void osmium::geom::GeometryFactory< TGeomImpl, TProjection >::polygon_start ( )
inline

◆ proj_string()

template<typename TGeomImpl , typename TProjection = IdentityProjection>
std::string osmium::geom::GeometryFactory< TGeomImpl, TProjection >::proj_string ( ) const
inline

Member Data Documentation

◆ m_impl

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

◆ m_projection

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

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