A class that serializes a geometry to the WKT format. More...
#include <WKTWriter.h>
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 AbstractPoint &) |
void | visit (const Point &visited) |
void | visit (const PointM &visited) |
void | visit (const PointZ &visited) |
void | visit (const PointZM &visited) |
void | visit (const PointKd &) |
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... | |
A class that serializes a geometry to the WKT format.
Definition at line 54 of file WKTWriter.h.
te::gm::WKTWriter::WKTWriter | ( | std::ostream & | o | ) |
It constructs a new WKT writer.
o | An output stream where we will write the wkt. |
Definition at line 46 of file WKTWriter.cpp.
te::gm::WKTWriter::~WKTWriter | ( | ) |
Destructor.
Definition at line 52 of file WKTWriter.cpp.
|
inlineprotectedvirtual |
Implements te::gm::Visitor.
Definition at line 104 of file WKTWriter.h.
|
inlineprotectedvirtual |
Implements te::gm::Visitor.
Definition at line 105 of file WKTWriter.h.
|
protectedvirtual |
Implements te::gm::Visitor.
Definition at line 78 of file WKTWriter.cpp.
References te::gm::GeometryCollectionMType, te::gm::GeometryCollectionType, te::gm::GeometryCollectionZMType, te::gm::GeometryCollectionZType, te::gm::GeometryCollection::getGeometryN(), te::gm::Geometry::getGeomTypeId(), and te::gm::GeometryCollection::getNumGeometries().
|
protectedvirtual |
Implements te::gm::Visitor.
Definition at line 120 of file WKTWriter.cpp.
|
protectedvirtual |
Implements te::gm::Visitor.
Definition at line 124 of file WKTWriter.cpp.
References te::gm::LineString::getCoordinates(), te::gm::Geometry::getGeomTypeId(), te::gm::LineString::getM(), te::gm::LineString::getZ(), te::gm::LineStringMType, te::gm::LineStringType, te::gm::LineStringZMType, te::gm::LineStringZType, te::gm::LineString::size(), te::gm::Coord2D::x, and te::gm::Coord2D::y.
|
inlineprotectedvirtual |
Implements te::gm::Visitor.
Definition at line 109 of file WKTWriter.h.
|
protectedvirtual |
Implements te::gm::Visitor.
Definition at line 199 of file WKTWriter.cpp.
References te::gm::Geometry::getGeomTypeId(), te::gm::MultiLineStringMType, te::gm::MultiLineStringType, te::gm::MultiLineStringZMType, and te::gm::MultiLineStringZType.
|
protectedvirtual |
Implements te::gm::Visitor.
Definition at line 231 of file WKTWriter.cpp.
References te::gm::Geometry::getGeomTypeId(), te::gm::MultiPointMType, te::gm::MultiPointType, te::gm::MultiPointZMType, and te::gm::MultiPointZType.
|
protectedvirtual |
Implements te::gm::Visitor.
Definition at line 263 of file WKTWriter.cpp.
References te::gm::Geometry::getGeomTypeId(), te::gm::MultiPolygonMType, te::gm::MultiPolygonType, te::gm::MultiPolygonZMType, and te::gm::MultiPolygonZType.
|
inlineprotectedvirtual |
Implements te::gm::Visitor.
Definition at line 113 of file WKTWriter.h.
|
inlineprotectedvirtual |
Implements te::gm::Visitor.
Definition at line 114 of file WKTWriter.h.
|
protectedvirtual |
Implements te::gm::Visitor.
Definition at line 295 of file WKTWriter.cpp.
References te::gm::Point::getX(), and te::gm::Point::getY().
|
protectedvirtual |
Implements te::gm::Visitor.
Definition at line 303 of file WKTWriter.cpp.
References te::gm::PointM::getM(), te::gm::Point::getX(), and te::gm::Point::getY().
|
protectedvirtual |
Implements te::gm::Visitor.
Definition at line 311 of file WKTWriter.cpp.
References te::gm::Point::getX(), te::gm::Point::getY(), and te::gm::PointZ::getZ().
|
protectedvirtual |
Implements te::gm::Visitor.
Definition at line 319 of file WKTWriter.cpp.
References te::gm::PointZM::getM(), te::gm::Point::getX(), te::gm::Point::getY(), and te::gm::PointZM::getZ().
|
inlineprotectedvirtual |
Implements te::gm::Visitor.
Definition at line 119 of file WKTWriter.h.
|
protectedvirtual |
Implements te::gm::Visitor.
Definition at line 327 of file WKTWriter.cpp.
References te::gm::Geometry::getGeomTypeId(), te::gm::CurvePolygon::getNumRings(), te::gm::PolygonMType, te::gm::PolygonType, te::gm::PolygonZMType, and te::gm::PolygonZType.
|
protectedvirtual |
Implements te::gm::Visitor.
Definition at line 371 of file WKTWriter.cpp.
|
inlineprotectedvirtual |
Implements te::gm::Visitor.
Definition at line 122 of file WKTWriter.h.
|
protectedvirtual |
Implements te::gm::Visitor.
Definition at line 414 of file WKTWriter.cpp.
|
protectedvirtual |
Implements te::gm::Visitor.
Definition at line 445 of file WKTWriter.cpp.
|
inlineprotectedvirtual |
Implements te::gm::Visitor.
Definition at line 125 of file WKTWriter.h.
|
inlineprotectedvirtual |
Implements te::gm::Visitor.
Definition at line 126 of file WKTWriter.h.
|
inlineprotectedvirtual |
Implements te::gm::Visitor.
Definition at line 127 of file WKTWriter.h.
void te::gm::WKTWriter::write | ( | const Geometry * | geom | ) |
It serializes the geometry to a WKT representation.
geom | The geometry to be serialized. |
Definition at line 56 of file WKTWriter.cpp.
References te::common::BaseVisitable< T, R >::accept().
Referenced by te::gm::Geometry::asText(), and write().
void te::gm::WKTWriter::write | ( | const Geometry & | geom | ) |
It serializes the geometry to a WKT representation.
geom | The geometry to be serialized. |
Definition at line 61 of file WKTWriter.cpp.
References te::common::BaseVisitable< T, R >::accept().
|
static |
It serializes the geometry to a WKT representation.
geom | The geometry to be serialized. |
o | An output stream where we will write the wkt. |
Definition at line 66 of file WKTWriter.cpp.
References write().
|
static |
It serializes the geometry to a WKT representation.
geom | The geometry to be serialized. |
o | An output stream where we will write the wkt. |
Definition at line 72 of file WKTWriter.cpp.
References write().
|
private |
The output stream used to serialize the geometry to WKT.
Definition at line 131 of file WKTWriter.h.
|
private |
This flag controls how geometry are write to the output stream.
Definition at line 132 of file WKTWriter.h.