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