Osmium  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Public Attributes
Osmium::Geometry::StreamFormat< T > Struct Template Reference

#include <geometry.hpp>

Collaboration diagram for Osmium::Geometry::StreamFormat< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 StreamFormat (const Geometry &geometry, bool with_srid)

Public Attributes

const Geometrym_geometry
const bool m_with_srid

Detailed Description

template<typename T>
struct Osmium::Geometry::StreamFormat< T >

This helper class is used to allow writing geometries in different formats to an output stream.

If we'd just write

  Osmium::Geometry::Geometry geometry;
  std::stream out << geometry;

we would not know in which format to write.

Instead we can write

   std::stream out << geometry.as_WKT();

and this class magically makes this work.

See also:
Geometry::AsWKT
Geometry::AsWKB
Geometry::AsHexWKB

Constructor & Destructor Documentation

template<typename T >
Osmium::Geometry::StreamFormat< T >::StreamFormat ( const Geometry geometry,
bool  with_srid 
) [inline]

Member Data Documentation

template<typename T >
const Geometry& Osmium::Geometry::StreamFormat< T >::m_geometry
template<typename T >
const bool Osmium::Geometry::StreamFormat< T >::m_with_srid

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