te::gm::WKTWriter Class Reference

A class that serializes a geometry to the WKT format. More...

#include <WKTWriter.h>

Inheritance diagram for te::gm::WKTWriter:
te::gm::Visitor

Public Member Functions

 WKTWriter (std::ostream &o)
 It constructs a new WKT writer. More...
 
void write (const Geometry *geom)
 It serializes the geometry to a WKT representation. More...
 
void write (const Geometry &geom)
 It serializes the geometry to a WKT representation. More...
 
 ~WKTWriter ()
 Destructor. More...
 

Static Public Member Functions

static void write (const Geometry *geom, std::ostream &o)
 It serializes the geometry to a WKT representation. More...
 
static void write (const Geometry &geom, std::ostream &o)
 It serializes the geometry to a WKT representation. More...
 

Protected Member Functions

virtual void visit (const Curve &)
 
virtual void visit (const Geometry &)
 
void visit (const GeometryCollection &visited)
 
void visit (const LinearRing &visited)
 
void visit (const LineString &visited)
 
virtual void visit (const MultiCurve &)
 
void visit (const MultiLineString &visited)
 
void visit (const MultiPoint &visited)
 
void visit (const MultiPolygon &visited)
 
virtual void visit (const MultiSurface &)
 
void visit (const Point &visited)
 
void visit (const Polygon &visited)
 
void visit (const PolyhedralSurface &visited)
 
virtual void visit (const Surface &)
 
void visit (const TIN &visited)
 
void visit (const Triangle &visited)
 
void visit (const CircularString &)
 
void visit (const CompoundCurve &)
 
void visit (const CurvePolygon &)
 

Private Attributes

std::ostream & m_ostream
 The output stream used to serialize the geometry to WKT. More...
 
bool m_tagged
 This flag controls how geometry are write to the output stream. More...
 

Detailed Description

A class that serializes a geometry to the WKT format.

See also
WKTReader

Definition at line 54 of file WKTWriter.h.

Constructor & Destructor Documentation

te::gm::WKTWriter::WKTWriter ( std::ostream &  o)

It constructs a new WKT writer.

Parameters
oAn output stream where we will write the wkt.

Definition at line 44 of file WKTWriter.cpp.

References ~WKTWriter().

te::gm::WKTWriter::~WKTWriter ( )
default

Destructor.

Referenced by WKTWriter().

Member Function Documentation

virtual void te::gm::WKTWriter::visit ( const Curve )
inlineprotectedvirtual

Implements te::gm::Visitor.

Definition at line 104 of file WKTWriter.h.

Referenced by visit().

virtual void te::gm::WKTWriter::visit ( const Geometry )
inlineprotectedvirtual

Implements te::gm::Visitor.

Definition at line 105 of file WKTWriter.h.

void te::gm::WKTWriter::visit ( const LinearRing visited)
protectedvirtual

Implements te::gm::Visitor.

Definition at line 116 of file WKTWriter.cpp.

virtual void te::gm::WKTWriter::visit ( const MultiCurve )
inlineprotectedvirtual

Implements te::gm::Visitor.

Definition at line 109 of file WKTWriter.h.

void te::gm::WKTWriter::visit ( const MultiLineString visited)
protectedvirtual
void te::gm::WKTWriter::visit ( const MultiPoint visited)
protectedvirtual
void te::gm::WKTWriter::visit ( const MultiPolygon visited)
protectedvirtual
virtual void te::gm::WKTWriter::visit ( const MultiSurface )
inlineprotectedvirtual

Implements te::gm::Visitor.

Definition at line 113 of file WKTWriter.h.

void te::gm::WKTWriter::visit ( const Polygon visited)
protectedvirtual
void te::gm::WKTWriter::visit ( const PolyhedralSurface visited)
protectedvirtual

Implements te::gm::Visitor.

Definition at line 365 of file WKTWriter.cpp.

virtual void te::gm::WKTWriter::visit ( const Surface )
inlineprotectedvirtual

Implements te::gm::Visitor.

Definition at line 117 of file WKTWriter.h.

void te::gm::WKTWriter::visit ( const TIN visited)
protectedvirtual

Implements te::gm::Visitor.

Definition at line 408 of file WKTWriter.cpp.

void te::gm::WKTWriter::visit ( const Triangle visited)
protectedvirtual

Implements te::gm::Visitor.

Definition at line 439 of file WKTWriter.cpp.

void te::gm::WKTWriter::visit ( const CircularString )
inlineprotectedvirtual

Implements te::gm::Visitor.

Definition at line 120 of file WKTWriter.h.

void te::gm::WKTWriter::visit ( const CompoundCurve )
inlineprotectedvirtual

Implements te::gm::Visitor.

Definition at line 121 of file WKTWriter.h.

void te::gm::WKTWriter::visit ( const CurvePolygon )
inlineprotectedvirtual

Implements te::gm::Visitor.

Definition at line 122 of file WKTWriter.h.

void te::gm::WKTWriter::write ( const Geometry geom)

It serializes the geometry to a WKT representation.

Parameters
geomThe geometry to be serialized.
Note
You must call reset in successive calls to this method.

Definition at line 52 of file WKTWriter.cpp.

References te::common::BaseVisitable< T, R >::accept().

Referenced by te::gm::Geometry::asText(), visit(), and write().

void te::gm::WKTWriter::write ( const Geometry geom)

It serializes the geometry to a WKT representation.

Parameters
geomThe geometry to be serialized.
Note
You must call reset in successive calls to this method.

Definition at line 57 of file WKTWriter.cpp.

References te::common::BaseVisitable< T, R >::accept().

void te::gm::WKTWriter::write ( const Geometry geom,
std::ostream &  o 
)
static

It serializes the geometry to a WKT representation.

Parameters
geomThe geometry to be serialized.
oAn output stream where we will write the wkt.

Definition at line 62 of file WKTWriter.cpp.

References write().

void te::gm::WKTWriter::write ( const Geometry geom,
std::ostream &  o 
)
static

It serializes the geometry to a WKT representation.

Parameters
geomThe geometry to be serialized.
oAn output stream where we will write the wkt.

Definition at line 68 of file WKTWriter.cpp.

References write().

Member Data Documentation

std::ostream& te::gm::WKTWriter::m_ostream
private

The output stream used to serialize the geometry to WKT.

Definition at line 126 of file WKTWriter.h.

Referenced by visit().

bool te::gm::WKTWriter::m_tagged
private

This flag controls how geometry are write to the output stream.

Definition at line 127 of file WKTWriter.h.

Referenced by visit().


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