26 #ifndef __TERRALIB_GEOMETRY_INTERNAL_ENVELOPE_H 27 #define __TERRALIB_GEOMETRY_INTERNAL_ENVELOPE_H 71 Envelope(
const double& llx,
const double& lly,
72 const double& urx,
const double& ury);
79 Envelope(
const std::vector<double>& vectd);
96 void init(
const double& llx,
const double& lly,
97 const double& urx,
const double& ury);
104 const double& getLowerLeftX()
const;
111 double& getLowerLeftX();
118 const double& getLowerLeftY()
const;
125 double& getLowerLeftY();
132 const double& getUpperRightX()
const;
139 double& getUpperRightX();
146 const double& getUpperRightY()
const;
153 double& getUpperRightY();
184 bool isValid()
const;
191 double getWidth()
const;
198 double getHeight()
const;
205 double getArea()
const;
246 bool equals(
const Envelope& rhs)
const;
255 bool disjoint(
const Envelope& rhs)
const;
264 bool intersects(
const Envelope& rhs)
const;
273 bool touches(
const Envelope& rhs)
const;
282 bool within(
const Envelope& rhs)
const;
291 bool contains(
const Envelope& rhs)
const;
304 double distance(
const Envelope& rhs)
const;
338 void transform(
int oldsrid,
int newsrid);
356 const double& urx,
const double& ury)
367 double d[4] = { 0.0, 0.0, 0.0, 0.0 };
371 for(std::vector<double>::const_iterator it = vectd.begin(); it < vectd.end(); ++it)
377 init(d[0], d[1], d[2], d[3]);
386 const double& urx,
const double& ury)
436 init((std::numeric_limits<double>::max)(),
437 (std::numeric_limits<double>::max)(),
438 -((std::numeric_limits<double>::max)()),
439 -((std::numeric_limits<double>::max)()));
468 (this->m_lly != rhs.
m_lly) ||
469 (this->m_urx != rhs.
m_urx) ||
470 (this->m_ury != rhs.
m_ury))
551 return Envelope(llx, lly, urx, ury);
572 #endif // __TERRALIB_GEOMETRY_INTERNAL_ENVELOPE_H const double & getUpperRightY() const
It returns a constant refernce to the x coordinate of the upper right corner.
void init(const double &llx, const double &lly, const double &urx, const double &ury)
It initializes (sets) the envelope bounds.
void makeInvalid()
It will invalidated the envelope.
bool equals(const Envelope &rhs) const
It returns true if the envelopes are "spatially equal".
double getArea() const
It returns the area of this envelope as measured in the spatial reference system of it...
bool intersects(const Envelope &rhs) const
It returns true if the envelopes "spatially intersects".
double m_urx
Upper right corner x-coordinate.
An utility struct for representing 2D coordinates.
TEDATAACCESSEXPORT te::da::Expression * operator==(const te::da::Expression &e1, const te::da::Expression &e2)
void Union(const Envelope &rhs)
It updates the envelop with coordinates of another envelope.
#define TEGEOMEXPORT
You can use this macro in order to export/import classes and functions from this module.
double m_llx
Lower left corner x-coordinate.
An Envelope defines a 2D rectangular region.
bool touches(const Envelope &rhs) const
It returns true if the envelopes "spatially touches".
bool operator==(const Envelope &rhs) const
Equal operator.
const double & getLowerLeftY() const
It returns a constant refernce to the y coordinate of the lower left corner.
Envelope intersection(const Envelope &rhs) const
It returns an envelope that represents the point set intersection with another envelope.
double m_lly
Lower left corner y-coordinate.
bool within(const Envelope &rhs) const
It returns true if this envelope is "spatially within" the rhs envelope.
bool disjoint(const Envelope &rhs) const
It returns true if this envelope is "spatially disjoint" from rhs envelope.
double m_ury
Upper right corner y-coordinate.
Envelope & operator=(const Envelope &rhs)
Assignment operator.
bool contains(const Envelope &rhs) const
It returns true if this envelope "spatially contains" the rhs envelope.
Configuration flags for the Vector Geometry Model of TerraLib.
const double & getUpperRightX() const
It returns a constant refernce to the x coordinate of the upper right corner.
Envelope()
It constructs an envelope with invalid coordinates.
double getHeight() const
It returns the envelope height.
const double & getLowerLeftX() const
It returns a constant reference to the x coordinate of the lower left corner.
double getWidth() const
It returns the envelope width.