27 #include "terralib_config.h"
28 #include "../common/STLUtils.h"
29 #include "../common/Translator.h"
34 #ifdef TERRALIB_GEOS_ENABLED
36 #include <geos/geom/Geometry.h>
37 #include <geos/util/GEOSException.h>
52 #ifdef TERRALIB_GEOS_ENABLED
53 std::auto_ptr<geos::geom::Geometry> g(GEOSWriter::write(
this));
55 return g->getLength();
58 throw Exception(
TE_TR(
"getLength routine is supported by GEOS! Please, enable the GEOS support."));
71 return (isClosed() && isSimple());
GeomType
Each enumerated type is compatible with a Well-known Binary (WKB) type code.
virtual Geometry & operator=(const Geometry &rhs)
Assignment operator.
bool isRing() const
It returns true if the curve is closed and simple.
Curve is an abstract class that represents 1-dimensional geometric objects stored as a sequence of co...
virtual double getLength() const
The length of this curve in the unit associated to its spatial reference system.
virtual Curve & operator=(const Curve &rhs)
Assignment operator.
#define TE_TR(message)
It marks a string in order to get translated.
An Envelope defines a 2D rectangular region.
Dimensionality
From Wikipedia: "in mathematics, the dimension of an object is an intrinsic property, independent of the space in which the object may happen to be embedded".
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Curve is an abstract class that represents 1-dimensional geometric objects stored as a sequence of co...
A class that converts a TerraLib geometry to a GEOS geometry.
Curve(GeomType t, int srid=0, Envelope *mbr=0)
It initializes the curve with the specified spatial reference system id and envelope.
Dimensionality getDimension() const
Curves are 1-dimensional objects.
Configuration flags for the Vector Geometry Model of TerraLib.