27 #include "../common/Translator.h"
85 m_ostream <<
"geometrycollection";
89 m_ostream <<
"geometrycollection z";
93 m_ostream <<
"geometrycollection m";
97 m_ostream <<
"geometrycollection zm";
109 for(std::size_t i = 0; i < size; ++i)
131 m_ostream <<
"linestring";
135 m_ostream <<
"linestring z";
139 m_ostream <<
"linestring m";
143 m_ostream <<
"linestring zm";
153 const std::size_t nPts = visited.
size();
155 if(visited.
getZ() == 0 && visited.
getM() == 0)
157 for(std::size_t i = 0; i < nPts; ++i)
165 else if(visited.
getM() == 0)
167 for(std::size_t i = 0; i < nPts; ++i)
175 else if(visited.
getZ() == 0)
177 for(std::size_t i = 0; i < nPts; ++i)
187 for(std::size_t i = 0; i < nPts; ++i)
206 m_ostream <<
"multilinestring";
210 m_ostream <<
"multilinestring z";
214 m_ostream <<
"multilinestring m";
218 m_ostream <<
"multilinestring zm";
228 visit(static_cast<const GeometryCollection&>(visited));
238 m_ostream <<
"multipoint";
242 m_ostream <<
"multipoint z";
246 m_ostream <<
"multipoint m";
250 m_ostream <<
"multipoint zm";
260 visit(static_cast<const GeometryCollection&>(visited));
270 m_ostream <<
"multipolygon";
274 m_ostream <<
"multipolygon z";
278 m_ostream <<
"multipolygon m";
282 m_ostream <<
"multipolygon zm";
292 visit(static_cast<const GeometryCollection&>(visited));
298 m_ostream <<
"point";
300 m_ostream <<
"(" << visited.
getX() <<
" " << visited.
getY() <<
")";
306 m_ostream <<
"point m";
308 m_ostream <<
"(" << visited.
getX() <<
" " << visited.
getY() <<
" " << visited.
getM() <<
")";
314 m_ostream <<
"point z";
316 m_ostream <<
"(" << visited.
getX() <<
" " << visited.
getY() <<
" " << visited.
getZ() <<
")";
322 m_ostream <<
"point zm";
324 m_ostream <<
"(" << visited.
getX() <<
" " << visited.
getY() <<
" " << visited.
getZ() <<
" " << visited.
getM() <<
")";
334 m_ostream <<
"polygon";
338 m_ostream <<
"polygon z";
342 m_ostream <<
"polygon m";
346 m_ostream <<
"polygon zm";
360 for(std::size_t i = 0; i < size; ++i)
PolyhedralSurface is a contiguous collection of polygons, which share common boundary segments...
std::size_t getNumRings() const
It returns the number of rings in this CurvePolygon.
std::size_t getNumGeometries() const
It returns the number of geometries in this GeometryCollection.
MultiPolygon is a MultiSurface whose elements are Polygons.
A class that serializes a geometry to the WKT format.
A LinearRing is a LineString that is both closed and simple.
Coord2D * getCoordinates() const
It returns a pointer to the internal array of coordinates.
PolyhedralSurface is a contiguous collection of polygons, which share common boundary segments...
MultiPoint is a GeometryCollection whose elements are restricted to points.
A point with a z-coordinate value and an associated measurement.
A point with an associated measure.
TIN (triangulated irregular network) is a PolyhedralSurface consisting only of Triangle patches...
A LinearRing is a LineString that is both closed and simple.
MultiPoint is a GeometryCollection whose elements are restricted to points.
A point with z-coordinate value.
LineString is a curve with linear interpolation between points.
Triangle is a polygon with 3 distinct, non-collinear vertices and no interior boundary.
const double & getY() const
It returns the Point y-coordinate value.
A point with x and y coordinate values.
MultiLineString is a MultiCurve whose elements are LineStrings.
void write(const Geometry *geom)
It serializes the geometry to a WKT representation.
const double & getZ() const
It returns the Point z-coordinate value.
virtual void visit(const Curve &)
MultiPolygon is a MultiSurface whose elements are Polygons.
const double & getM() const
It returns the Point z-coordinate value.
GeomType getGeomTypeId() const
It returns the geometry subclass type identifier.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
An exception class for the Geometry module.
Polygon is a subclass of CurvePolygon whose rings are defined by linear rings.
Geometry * getGeometryN(std::size_t i) const
It returns the n-th geometry in this GeometryCollection.
MultiLineString is a MultiCurve whose elements are LineStrings.
const double & getZ() const
It returns the Point z-coordinate value.
Polygon is a subclass of CurvePolygon whose rings are defined by linear rings.
virtual ReturnType accept(VisitorType &guest) const =0
It call the visit method from the guest object.
WKTWriter(std::ostream &o)
It constructs a new WKT writer.
const double & getM() const
It returns the Point z-coordinate value.
const double & getZ(std::size_t i) const
It returns the n-th z coordinate value.
const double & getM(std::size_t i) const
It returns the n-th m measure value.
It is a collection of other geometric objects.
A point with z-coordinate value.
A point with a z-coordinate value and an associated measurement.
A point with an associated measure.
const double & getX() const
It returns the Point x-coordinate value.
A class that serializes a geometry to the WKT format.
It is a collection of other geometric objects.
std::size_t size() const
It returns the number of points (vertexes) in the geometry.