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)
358 init(llx, lly, urx, ury);
363 double d[4] = { 0.0, 0.0, 0.0, 0.0 };
367 for(std::vector<double>::const_iterator it = vectd.begin(); it < vectd.end(); ++it)
373 init(d[0], d[1], d[2], d[3]);
382 const double& urx,
const double& ury)
432 init((std::numeric_limits<double>::max)(),
433 (std::numeric_limits<double>::max)(),
434 -((std::numeric_limits<double>::max)()),
435 -((std::numeric_limits<double>::max)()));
469 (this->m_lly != rhs.
m_lly) ||
470 (this->m_urx != rhs.
m_urx) ||
471 (this->m_ury != rhs.
m_ury))
552 return Envelope(llx, lly, urx, ury);
573 #endif // __TERRALIB_GEOMETRY_INTERNAL_ENVELOPE_H
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 intersects(const Envelope &rhs) const
It returns true if the envelopes "spatially intersects".
bool touches(const Envelope &rhs) const
It returns true if the envelopes "spatially touches".
const double & getUpperRightX() const
It returns a constant refernce to the x coordinate of the upper right corner.
double m_urx
Upper right corner x-coordinate.
const double & getLowerLeftY() const
It returns a constant refernce to the y coordinate of the lower left corner.
double getWidth() const
It returns the envelope width.
An utility struct for representing 2D coordinates.
TEDATAACCESSEXPORT te::da::Expression * operator==(const te::da::Expression &e1, const te::da::Expression &e2)
const double & getUpperRightY() const
It returns a constant refernce to the x coordinate of the upper right corner.
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.
bool disjoint(const Envelope &rhs) const
It returns true if this envelope is "spatially disjoint" from rhs envelope.
double m_llx
Lower left corner x-coordinate.
An Envelope defines a 2D rectangular region.
bool within(const Envelope &rhs) const
It returns true if this envelope is "spatially within" the rhs envelope.
bool contains(const Envelope &rhs) const
It returns true if this envelope "spatially contains" the rhs envelope.
double getArea() const
It returns the area of this envelope as measured in the spatial reference system of it...
bool equals(const Envelope &rhs) const
It returns true if the envelopes are "spatially equal".
double m_lly
Lower left corner y-coordinate.
bool operator==(const Envelope &rhs) const
Equal operator.
double m_ury
Upper right corner y-coordinate.
Envelope & operator=(const Envelope &rhs)
Assignment operator.
const double & getLowerLeftX() const
It returns a constant reference to the x 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.
Configuration flags for the Vector Geometry Model of TerraLib.
double getHeight() const
It returns the envelope height.
Envelope()
It constructs an envelope with invalid coordinates.
bool isValid() const
It tells if the rectangle is valid or not.