Go to the documentation of this file.
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();
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;
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
bool equals(const Envelope &rhs) const
It returns true if the envelopes are "spatially equal".
An Envelope defines a 2D rectangular region.
const double & getLowerLeftX() const
It returns a constant reference to the x coordinate of the lower left corner.
bool isValid() const
It tells if the rectangle is valid or not.
Envelope()
It constructs an envelope with invalid coordinates.
TEDATAACCESSEXPORT te::da::Expression * operator==(const te::da::Expression &e1, const te::da::Expression &e2)
double getArea() const
It returns the area of this envelope as measured in the spatial reference system of it.
double getWidth() const
It returns the envelope width.
double distance(const Envelope &rhs) const
It returns the shortest distance between any two points in the two envelopes.
Coord2D getCenter() const
It returns the rectangle's center coordinate.
void makeInvalid()
It will invalidated the 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.
bool operator==(const Envelope &rhs) const
Equal operator.
Coord2D getUpperRight() const
It returns the upper right coordinate of the envelope.
void Union(const Envelope &rhs)
It updates the envelop with coordinates of another envelope.
double m_urx
Upper right corner x-coordinate.
Envelope & operator=(const Envelope &rhs)
Assignment operator.
bool touches(const Envelope &rhs) const
It returns true if the envelopes "spatially touches".
Envelope intersection(const Envelope &rhs) const
It returns an envelope that represents the point set intersection with another envelope.
const double & getLowerLeftY() const
It returns a constant refernce to the y coordinate of the lower left corner.
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 contains(const Envelope &rhs) const
It returns true if this envelope "spatially contains" the rhs envelope.
Coord2D getLowerLeft() const
It returns the lower left coordinate of the envelope.
const double & getUpperRightX() const
It returns a constant refernce to the x coordinate of the upper right corner.
An utility struct for representing 2D coordinates.
Proxy configuration file for TerraView (see terraview_config.h).
void init(const double &llx, const double &lly, const double &urx, const double &ury)
It initializes (sets) the envelope bounds.
double m_ury
Upper right corner y-coordinate.
bool intersects(const Envelope &rhs) const
It returns true if the envelopes "spatially intersects".
double getHeight() const
It returns the envelope height.
void transform(int oldsrid, int newsrid)
It will transform the coordinates of the Envelope from the old SRS to the new one.
const double & getUpperRightY() const
It returns a constant refernce to the x coordinate of the upper right corner.
bool disjoint(const Envelope &rhs) const
It returns true if this envelope is "spatially disjoint" from rhs envelope.