27 #include "../common/STLUtils.h" 28 #include "../core/translator/Translator.h" 29 #include "../srs/Converter.h" 48 :
Curve(t, srid, mbr),
95 #ifdef TERRALIB_MOD_SRS_ENABLED 101 for(std::size_t i = 0; i <
size; ++i)
110 #endif // TERRALIB_MOD_SRS_ENABLED 120 const std::size_t nSegs =
size();
127 for(std::size_t i = 0; i < nSegs; ++i)
133 double minx = e->
m_llx;
134 double miny = e->
m_lly;
135 double maxx = e->
m_urx;
136 double maxy = e->
m_ury;
138 for(std::size_t i = 1; i < nSegs; ++i)
144 if(maxx < e->m_urx) maxx = e->
m_urx;
145 if(maxy < e->m_ury) maxy = e->
m_ury;
void computeMBR(bool cascade) const
It computes the minimum bounding rectangle for the compound curve.
void makeInvalid()
It will invalidated the envelope.
GeomType
Each enumerated type is compatible with a Well-known Binary (WKB) type code.
CompoundCurve & operator=(const CompoundCurve &rhs)
Assignment operator.
Base exception class for plugin module.
Curve is an abstract class that represents 1-dimensional geometric objects stored as a sequence of co...
bool isClosed() const
It returns true if the curve is closed (startPoint = endPoint).
CompoundCurve is a curve that may have circular and linear segments.
int m_srid
The Spatial Reference System code associated to the Geometry.
void makeEmpty()
It clears all the segments.
A point with x and y coordinate values.
void add(Curve *c)
It adds the curve to the compound.
double m_urx
Upper right corner x-coordinate.
virtual Curve & operator=(const Curve &rhs)
Assignment operator.
#define TE_TR(message)
It marks a string in order to get translated.
std::vector< Curve * > m_curves
The list of segments of the compund curve.
std::unique_ptr< Point > getEndPoint() const
It returns the curve end point.
const std::string & getGeometryType() const
The name of instantiable subtype is: CompoundCurve.
double m_llx
Lower left corner x-coordinate.
An Envelope defines a 2D rectangular region.
std::size_t size() const
It returns the number of elements in the compound geometry.
Curve * getCurve(std::size_t i) const
It returns the i-th curve.
te::dt::AbstractData * clone() const
It clones the compound curve.
An Envelope defines a 2D rectangular region.
CompoundCurve is a curve that may have circular and linear segments.
void transform(int srid)
It converts the coordinate values of the compound curve to the new spatial reference system...
CompoundCurve(GeomType t, int srid=0, Envelope *mbr=0)
It initializes the compound curve with the specified spatial reference system id and envelope...
A base class for values that can be retrieved from the data access module.
double getLength() const
The length of this Curve in its associated spatial reference.
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Envelope * m_mbr
The geometry minimum bounding rectangle.
double m_lly
Lower left corner y-coordinate.
std::size_t getNPoints() const
It returns the number of points (vertexes) in the compound curve.
double m_ury
Upper right corner y-coordinate.
Geometry * locateBetween(const double &mStart, const double &mEnd) const
It returns a derived geometry collection value according to the range of coordinate values inclusivel...
void Clone(const std::vector< T * > &src, std::vector< T * > &dst)
This function can be applied to a vector of pointers.
void setSRID(int srid)
It sets the Spatial Reference System ID of the compound curve.
An utility struct for representing 2D coordinates.
void FreeContents(boost::unordered_map< K, V * > &m)
This function can be applied to a map of pointers. It will delete each pointer in the map...
An exception class for the Geometry module.
static const std::string sm_typeName
~CompoundCurve()
Virtual destructor.
std::unique_ptr< Point > getStartPoint() const
It returns the curve start point.