Osmium  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Enumerations | Functions | Variables
Osmium::Geometry Namespace Reference

Geometry classes such as for points, linestrings, and polygons. More...

Classes

class  FromWay
class  LineString
class  MultiPolygon
class  Null
class  Point
class  Polygon
struct  StreamFormat
class  Geometry
class  LonLatListWriter

Enumerations

enum  wkbGeometryType {
  wkbPoint = 1, wkbLineString = 2, wkbPolygon = 3, wkbMultiPoint = 4,
  wkbMultiLineString = 5, wkbMultiPolygon = 6, wkbGeometryCollection = 7, wkbSRID = 0x20000000
}
enum  wkbByteOrder { wkbXDR = 0, wkbNDR = 1 }

Functions

geos::geom::GeometryFactory * geos_geometry_factory ()
template<typename T >
std::ostream & operator<< (std::ostream &out, StreamFormat< T > format)
template<typename T >
void write_binary (std::ostream &out, const T value)
template<typename T >
void write_hex (std::ostream &out, const T value)
void write_binary_wkb_header (std::ostream &out, bool with_srid, uint32_t type)
void write_hex_wkb_header (std::ostream &out, bool with_srid, uint32_t type)

Variables

const int srid = 4326
 OSM data always uses SRID 4326 (WGS84).

Detailed Description

Geometry classes such as for points, linestrings, and polygons.


Enumeration Type Documentation

Byte order marker in WKB geometry.

Enumerator:
wkbXDR 
wkbNDR 

Type of WKB geometry. These definitions are from 99-049_OpenGIS_Simple_Features_Specification_For_SQL_Rev_1.1.pdf (for WKB) and http://trac.osgeo.org/postgis/browser/trunk/doc/ZMSgeoms.txt (for EWKB). They are used to encode geometries into the WKB format.

Enumerator:
wkbPoint 
wkbLineString 
wkbPolygon 
wkbMultiPoint 
wkbMultiLineString 
wkbMultiPolygon 
wkbGeometryCollection 
wkbSRID 

Function Documentation

geos::geom::GeometryFactory* Osmium::Geometry::geos_geometry_factory ( )

Return pointer to a static GEOS GeometryFactory object created the first time this function is run. This is used by all functions in Osmium that need to create GEOS geometries.

template<typename T >
std::ostream& Osmium::Geometry::operator<< ( std::ostream &  out,
StreamFormat< T >  format 
)

Output operator for StreamFormat.

template<typename T >
void Osmium::Geometry::write_binary ( std::ostream &  out,
const T  value 
) [inline]

Write a value as binary to an output stream.

Template Parameters:
TType of value.
void Osmium::Geometry::write_binary_wkb_header ( std::ostream &  out,
bool  with_srid,
uint32_t  type 
) [inline]

Write header of WKB data structure as binary to output stream. The header contains:

  • the byte order marker
  • the geometry type
  • (optionally) the SRID
template<typename T >
void Osmium::Geometry::write_hex ( std::ostream &  out,
const T  value 
) [inline]

Write a value as hex encoding of binary to an output stream.

Template Parameters:
TType of value.
void Osmium::Geometry::write_hex_wkb_header ( std::ostream &  out,
bool  with_srid,
uint32_t  type 
) [inline]

Write header of WKB data structure as hex encoding of binary to output stream. The header contains:

  • the byte order marker
  • the geometry type
  • (optionally) the SRID

Variable Documentation

const int Osmium::Geometry::srid = 4326

OSM data always uses SRID 4326 (WGS84).

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines