An Envelope defines a 2D rectangular region. More...
#include <Envelope.h>
| Public Member Functions | |
| Basic Envelope Methods | |
| Basic Envelope methods. | |
| Envelope () | |
| It constructs an envelope with invalid coordinates.  More... | |
| Envelope (const double &llx, const double &lly, const double &urx, const double &ury) | |
| Constructor.  More... | |
| Envelope (const std::vector< double > &vectd) | |
| Constructor.  More... | |
| Envelope (const Envelope &rhs) | |
| Copy constructor.  More... | |
| void | init (const double &llx, const double &lly, const double &urx, const double &ury) | 
| It initializes (sets) the envelope bounds.  More... | |
| const double & | getLowerLeftX () const | 
| It returns a constant reference to the x coordinate of the lower left corner.  More... | |
| double & | getLowerLeftX () | 
| It returns a constant reference to the x coordinate of the lower left corner.  More... | |
| const double & | getLowerLeftY () const | 
| It returns a constant refernce to the y coordinate of the lower left corner.  More... | |
| double & | getLowerLeftY () | 
| It returns a constant refernce to the y coordinate of the lower left corner.  More... | |
| const double & | getUpperRightX () const | 
| It returns a constant refernce to the x coordinate of the upper right corner.  More... | |
| double & | getUpperRightX () | 
| It returns a constant refernce to the y coordinate of the upper right corner.  More... | |
| const double & | getUpperRightY () const | 
| It returns a constant refernce to the x coordinate of the upper right corner.  More... | |
| double & | getUpperRightY () | 
| It returns a constant refernce to the y coordinate of the upper right corner.  More... | |
| Coord2D | getLowerLeft () const | 
| It returns the lower left coordinate of the envelope.  More... | |
| Coord2D | getUpperRight () const | 
| It returns the upper right coordinate of the envelope.  More... | |
| Coord2D | getCenter () const | 
| It returns the rectangle's center coordinate.  More... | |
| void | makeInvalid () | 
| It will invalidated the envelope.  More... | |
| bool | isValid () const | 
| It tells if the rectangle is valid or not.  More... | |
| double | getWidth () const | 
| It returns the envelope width.  More... | |
| double | getHeight () const | 
| It returns the envelope height.  More... | |
| double | getArea () const | 
| It returns the area of this envelope as measured in the spatial reference system of it.  More... | |
| Envelope Operators | |
| Overloaded operators for an envelope. | |
| Envelope & | operator= (const Envelope &rhs) | 
| Assignment operator.  More... | |
| bool | operator== (const Envelope &rhs) const | 
| Equal operator.  More... | |
| Spatial Operations | |
| Methods for testing spatial relations between Envelope objects and to perform some operations over envelope type. | |
| bool | equals (const Envelope &rhs) const | 
| It returns true if the envelopes are "spatially equal".  More... | |
| bool | disjoint (const Envelope &rhs) const | 
| It returns true if this envelope is "spatially disjoint" from rhs envelope.  More... | |
| bool | intersects (const Envelope &rhs) const | 
| It returns true if the envelopes "spatially intersects".  More... | |
| bool | touches (const Envelope &rhs) const | 
| It returns true if the envelopes "spatially touches".  More... | |
| bool | within (const Envelope &rhs) const | 
| It returns true if this envelope is "spatially within" the rhs envelope.  More... | |
| bool | contains (const Envelope &rhs) const | 
| It returns true if this envelope "spatially contains" the rhs envelope.  More... | |
| double | distance (const Envelope &rhs) const | 
| It returns the shortest distance between any two points in the two envelopes.  More... | |
| Envelope | intersection (const Envelope &rhs) const | 
| It returns an envelope that represents the point set intersection with another envelope.  More... | |
| void | Union (const Envelope &rhs) | 
| It updates the envelop with coordinates of another envelope.  More... | |
| void | transform (int oldsrid, int newsrid) | 
| It will transform the coordinates of the Envelope from the old SRS to the new one.  More... | |
| Public Attributes | |
| double | m_llx | 
| Lower left corner x-coordinate.  More... | |
| double | m_lly | 
| Lower left corner y-coordinate.  More... | |
| double | m_urx | 
| Upper right corner x-coordinate.  More... | |
| double | m_ury | 
| Upper right corner y-coordinate.  More... | |
An Envelope defines a 2D rectangular region.
Definition at line 51 of file Envelope.h.
| 
 | inline | 
It constructs an envelope with invalid coordinates.
Definition at line 350 of file Envelope.h.
References makeInvalid().
Referenced by intersection().
| 
 | inline | 
Constructor.
| llx | Lower left corner x-coordinate. | 
| lly | Lower left corner y-coordinate. | 
| urx | Upper right corner x-coordinate. | 
| ury | Upper right corner y-coordinate. | 
Definition at line 355 of file Envelope.h.
| 
 | inline | 
Constructor.
| vectd | Vector of doubles representing the envelope lower left and upper right corners. | 
Definition at line 365 of file Envelope.h.
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| double te::gm::Envelope::distance | ( | const Envelope & | rhs | ) | const | 
It returns the shortest distance between any two points in the two envelopes.
| rhs | The other envelope. | 
| 
 | inline | 
It returns true if the envelopes are "spatially equal".
| rhs | The another envelope to be compared. | 
Definition at line 481 of file Envelope.h.
| 
 | inline | 
It returns the area of this envelope as measured in the spatial reference system of it.
Definition at line 457 of file Envelope.h.
References getHeight(), and getWidth().
Referenced by te::sam::rtree::Index< te::edit::VertexIndex, 8 >::classify(), te::sam::rtree::Index< te::edit::VertexIndex, 8 >::pickBranch(), and te::sam::rtree::Index< te::edit::VertexIndex, 8 >::pigeonhole().
| Coord2D te::gm::Envelope::getCenter | ( | ) | const | 
It returns the rectangle's center coordinate.
| 
 | inline | 
It returns the envelope height.
Definition at line 452 of file Envelope.h.
Referenced by getArea().
| Coord2D te::gm::Envelope::getLowerLeft | ( | ) | const | 
It returns the lower left coordinate of the envelope.
| 
 | inline | 
It returns a constant reference to the x coordinate of the lower left corner.
Definition at line 394 of file Envelope.h.
References m_llx.
| 
 | inline | 
It returns a constant reference to the x coordinate of the lower left corner.
Definition at line 399 of file Envelope.h.
References m_llx.
| 
 | inline | 
It returns a constant refernce to the y coordinate of the lower left corner.
Definition at line 404 of file Envelope.h.
References m_lly.
| 
 | inline | 
It returns a constant refernce to the y coordinate of the lower left corner.
Definition at line 409 of file Envelope.h.
References m_lly.
| Coord2D te::gm::Envelope::getUpperRight | ( | ) | const | 
It returns the upper right coordinate of the envelope.
| 
 | inline | 
It returns a constant refernce to the x coordinate of the upper right corner.
Definition at line 414 of file Envelope.h.
References m_urx.
| 
 | inline | 
It returns a constant refernce to the y coordinate of the upper right corner.
Definition at line 419 of file Envelope.h.
References m_urx.
| 
 | inline | 
It returns a constant refernce to the x coordinate of the upper right corner.
Definition at line 424 of file Envelope.h.
References m_ury.
| 
 | inline | 
It returns a constant refernce to the y coordinate of the upper right corner.
Definition at line 429 of file Envelope.h.
References m_ury.
| 
 | inline | 
It returns the envelope width.
Definition at line 447 of file Envelope.h.
Referenced by getArea().
| 
 | inline | 
It initializes (sets) the envelope bounds.
| llx | Lower left corner x-coordinate. | 
| lly | Lower left corner y-coordinate. | 
| urx | Upper right corner x-coordinate. | 
| ury | Upper right corner y-coordinate. | 
Definition at line 385 of file Envelope.h.
References m_llx, m_lly, m_urx, and m_ury.
Referenced by Envelope(), makeInvalid(), and operator=().
It returns an envelope that represents the point set intersection with another envelope.
| rhs | The other envelope whose intersection with this envelope will be calculated. | 
Definition at line 547 of file Envelope.h.
References Envelope(), intersects(), m_llx, m_lly, m_urx, and m_ury.
| 
 | inline | 
It returns true if the envelopes "spatially intersects".
| rhs | The other envelope to be compared. | 
Definition at line 497 of file Envelope.h.
References m_llx, m_lly, m_urx, and m_ury.
Referenced by intersection(), te::sam::rtree::Index< te::edit::VertexIndex, 8 >::remove2(), and te::sam::rtree::Index< te::edit::VertexIndex, 8 >::search().
| 
 | inline | 
| 
 | inline | 
It will invalidated the envelope.
Definition at line 434 of file Envelope.h.
References init().
Referenced by Envelope().
| 
 | inline | 
| 
 | inline | 
| void te::gm::Envelope::transform | ( | int | oldsrid, | 
| int | newsrid | ||
| ) | 
It will transform the coordinates of the Envelope from the old SRS to the new one.
After calling this method the Envelope will be associated to the new SRID.
| oldsrid | The old Spatial Reference System. | 
| newsrid | The new Spatial Reference System used to transform the coordinates of the Envelope. | 
| Exception | It may throw an exception if it can not do the transformation. | 
| 
 | inline | 
It updates the envelop with coordinates of another envelope.
| rhs | The other envelope whose coordinates will be used to update this one. | 
Definition at line 559 of file Envelope.h.
References m_llx, m_lly, m_urx, and m_ury.
Referenced by te::sam::rtree::Index< te::edit::VertexIndex, 8 >::combineRect().
| 
 | inline | 
| double te::gm::Envelope::m_llx | 
Lower left corner x-coordinate.
Definition at line 344 of file Envelope.h.
Referenced by te::sam::kdtree::AdaptativeIndex< KdTreeNode >::build(), contains(), te::pgis::Convert2PostGIS(), disjoint(), Envelope(), te::pgis::GetEnvelope(), getLowerLeftX(), getWidth(), init(), te::rst::PolygonIterator< T >::initialize(), intersection(), intersects(), isValid(), te::sam::kdtree::AdaptativeIndex< KdTreeNode >::nearestNeighborSearch(), operator=(), operator==(), te::sam::rtree::Index< te::edit::VertexIndex, 8 >::pickSeeds(), te::sam::kdtree::Index< KdTreeNode >::search(), te::sam::kdtree::AdaptativeIndex< KdTreeNode >::search(), touches(), Union(), te::sam::kdtree::AdaptativeIndex< KdTreeNode >::update(), and within().
| double te::gm::Envelope::m_lly | 
Lower left corner y-coordinate.
Definition at line 345 of file Envelope.h.
Referenced by te::sam::kdtree::AdaptativeIndex< KdTreeNode >::build(), contains(), te::pgis::Convert2PostGIS(), disjoint(), Envelope(), te::pgis::GetEnvelope(), getHeight(), getLowerLeftY(), init(), te::rst::PolygonIterator< T >::initialize(), intersection(), intersects(), isValid(), te::sam::kdtree::AdaptativeIndex< KdTreeNode >::nearestNeighborSearch(), operator=(), operator==(), te::sam::rtree::Index< te::edit::VertexIndex, 8 >::pickSeeds(), te::sam::kdtree::Index< KdTreeNode >::search(), te::sam::kdtree::AdaptativeIndex< KdTreeNode >::search(), touches(), Union(), te::sam::kdtree::AdaptativeIndex< KdTreeNode >::update(), and within().
| double te::gm::Envelope::m_urx | 
Upper right corner x-coordinate.
Definition at line 346 of file Envelope.h.
Referenced by te::sam::kdtree::AdaptativeIndex< KdTreeNode >::build(), contains(), te::pgis::Convert2PostGIS(), disjoint(), Envelope(), te::pgis::GetEnvelope(), getUpperRightX(), getWidth(), init(), te::rst::PolygonIterator< T >::initialize(), intersection(), intersects(), isValid(), te::sam::kdtree::AdaptativeIndex< KdTreeNode >::nearestNeighborSearch(), operator=(), operator==(), te::sam::rtree::Index< te::edit::VertexIndex, 8 >::pickSeeds(), te::sam::kdtree::Index< KdTreeNode >::search(), te::sam::kdtree::AdaptativeIndex< KdTreeNode >::search(), touches(), Union(), te::sam::kdtree::AdaptativeIndex< KdTreeNode >::update(), and within().
| double te::gm::Envelope::m_ury | 
Upper right corner y-coordinate.
Definition at line 347 of file Envelope.h.
Referenced by te::sam::kdtree::AdaptativeIndex< KdTreeNode >::build(), contains(), te::pgis::Convert2PostGIS(), disjoint(), Envelope(), te::pgis::GetEnvelope(), getHeight(), getUpperRightY(), init(), te::rst::PolygonIterator< T >::initialize(), intersection(), intersects(), isValid(), te::sam::kdtree::AdaptativeIndex< KdTreeNode >::nearestNeighborSearch(), operator=(), operator==(), te::sam::rtree::Index< te::edit::VertexIndex, 8 >::pickSeeds(), te::sam::kdtree::Index< KdTreeNode >::search(), te::sam::kdtree::AdaptativeIndex< KdTreeNode >::search(), touches(), Union(), te::sam::kdtree::AdaptativeIndex< KdTreeNode >::update(), and within().