marble
#include <GeoDataLatLonBox.h>
Static Public Member Functions | |
static GeoDataLatLonBox | fromLineString (const GeoDataLineString &lineString) |
Friends | |
bool GEODATA_EXPORT | operator!= (GeoDataLatLonBox const &lhs, GeoDataLatLonBox const &rhs) |
bool GEODATA_EXPORT | operator== (GeoDataLatLonBox const &lhs, GeoDataLatLonBox const &rhs) |
Additional Inherited Members | |
Protected Member Functions inherited from Marble::GeoDataObject | |
virtual bool | equals (const GeoDataObject &other) const |
Detailed Description
A class that defines a 2D bounding box for geographic data.
GeoDataLatLonBox is a 2D bounding box that describes a geographic area in terms of latitude and longitude.
The bounding box gets described by assigning the northern, southern, eastern and western boundary. So usually the value of the eastern boundary is bigger than the value of the western boundary.
This is also true if the GeoDataLatLonBox covers the whole longitude range from 180 deg West to 180 deg East. Notably in this case the bounding box crosses the date line.
If the GeoDataLatLonBox does not cover the whole longitude range but still crosses the date line then the eastern boundary has got a smaller value than the western one.
Definition at line 51 of file GeoDataLatLonBox.h.
Constructor & Destructor Documentation
Marble::GeoDataLatLonBox::GeoDataLatLonBox | ( | ) |
Definition at line 64 of file GeoDataLatLonBox.cpp.
Marble::GeoDataLatLonBox::GeoDataLatLonBox | ( | qreal | north, |
qreal | south, | ||
qreal | east, | ||
qreal | west, | ||
GeoDataCoordinates::Unit | unit = GeoDataCoordinates::Radian |
||
) |
Definition at line 70 of file GeoDataLatLonBox.cpp.
Marble::GeoDataLatLonBox::GeoDataLatLonBox | ( | const GeoDataLatLonBox & | other | ) |
Definition at line 77 of file GeoDataLatLonBox.cpp.
|
virtual |
Definition at line 83 of file GeoDataLatLonBox.cpp.
Member Function Documentation
void Marble::GeoDataLatLonBox::boundaries | ( | qreal & | north, |
qreal & | south, | ||
qreal & | east, | ||
qreal & | west, | ||
GeoDataCoordinates::Unit | unit = GeoDataCoordinates::Radian |
||
) | const |
Definition at line 198 of file GeoDataLatLonBox.cpp.
|
virtual |
returns the center of this box
- Returns
- a coordinate, face-center of the box
Reimplemented in Marble::GeoDataLatLonAltBox.
Definition at line 276 of file GeoDataLatLonBox.cpp.
|
virtual |
Resets the bounding box to its uninitialised state (and thus contains nothing).
Reimplemented in Marble::GeoDataLatLonAltBox.
Definition at line 773 of file GeoDataLatLonBox.cpp.
|
virtual |
Reimplemented in Marble::GeoDataLatLonAltBox.
Definition at line 309 of file GeoDataLatLonBox.cpp.
bool Marble::GeoDataLatLonBox::contains | ( | const GeoDataLatLonBox & | other | ) | const |
Definition at line 327 of file GeoDataLatLonBox.cpp.
Detect whether the bounding box contains one of the poles.
- Returns
true
the bounding box contains one of the poles.false
the bounding box doesn't contain one of the poles.
Definition at line 289 of file GeoDataLatLonBox.cpp.
bool Marble::GeoDataLatLonBox::crossesDateLine | ( | ) | const |
Detect whether the bounding box crosses the IDL.
- Returns
true
the bounding box crosses the +/-180 deg longitude.false
the bounding box doesn't cross the +/-180 deg longitude.
Definition at line 266 of file GeoDataLatLonBox.cpp.
qreal Marble::GeoDataLatLonBox::east | ( | GeoDataCoordinates::Unit | unit = GeoDataCoordinates::Radian | ) | const |
Get the eastern boundary of the bounding box.
- Returns
- the longitude of the eastern boundary.
Definition at line 135 of file GeoDataLatLonBox.cpp.
|
static |
Create the smallest bounding box from a line string.
- Returns
- the smallest bounding box that contains the linestring.
Definition at line 620 of file GeoDataLatLonBox.cpp.
qreal Marble::GeoDataLatLonBox::height | ( | GeoDataCoordinates::Unit | unit = GeoDataCoordinates::Radian | ) | const |
Get the height of the latitude interval.
- Returns
- the angle covered by the latitude range.
Definition at line 255 of file GeoDataLatLonBox.cpp.
|
virtual |
Definition at line 385 of file GeoDataLatLonBox.cpp.
|
virtual |
Indicates whether the bounding box is not initialised (and contains nothing).
- Returns
- Return value is true if bounding box is not initialised.
Definition at line 768 of file GeoDataLatLonBox.cpp.
|
virtual |
Indicates whether the bounding box only contains a single 2D point ("singularity").
- Returns
- Return value is true if the height and the width of the bounding box equal zero.
Reimplemented in Marble::GeoDataLatLonAltBox.
Definition at line 760 of file GeoDataLatLonBox.cpp.
|
virtual |
Provides type information for downcasting a GeoData.
Implements Marble::GeoDataObject.
Reimplemented in Marble::GeoDataLatLonAltBox.
Definition at line 88 of file GeoDataLatLonBox.cpp.
qreal Marble::GeoDataLatLonBox::north | ( | GeoDataCoordinates::Unit | unit = GeoDataCoordinates::Radian | ) | const |
Get the northern boundary of the bounding box.
- Returns
- the latitude of the northern boundary.
Definition at line 93 of file GeoDataLatLonBox.cpp.
GeoDataLatLonBox & Marble::GeoDataLatLonBox::operator= | ( | const GeoDataLatLonBox & | other | ) |
Definition at line 586 of file GeoDataLatLonBox.cpp.
GeoDataLatLonBox Marble::GeoDataLatLonBox::operator| | ( | const GeoDataLatLonBox & | other | ) | const |
Definition at line 594 of file GeoDataLatLonBox.cpp.
GeoDataLatLonBox & Marble::GeoDataLatLonBox::operator|= | ( | const GeoDataLatLonBox & | other | ) |
Unites this bounding box with the given one.
- Returns
- Returns a reference to self.
Definition at line 599 of file GeoDataLatLonBox.cpp.
|
virtual |
Serialize the contents of the feature to stream
.
Reimplemented from Marble::GeoDataObject.
Reimplemented in Marble::GeoDataLatLonAltBox.
Definition at line 606 of file GeoDataLatLonBox.cpp.
qreal Marble::GeoDataLatLonBox::rotation | ( | GeoDataCoordinates::Unit | unit = GeoDataCoordinates::Radian | ) | const |
Get the rotation of the bounding box.
- Returns
- the rotation of the bounding box.
Definition at line 190 of file GeoDataLatLonBox.cpp.
void Marble::GeoDataLatLonBox::setBoundaries | ( | qreal | north, |
qreal | south, | ||
qreal | east, | ||
qreal | west, | ||
GeoDataCoordinates::Unit | unit = GeoDataCoordinates::Radian |
||
) |
Definition at line 217 of file GeoDataLatLonBox.cpp.
void Marble::GeoDataLatLonBox::setEast | ( | const qreal | east, |
GeoDataCoordinates::Unit | unit = GeoDataCoordinates::Radian |
||
) |
Definition at line 143 of file GeoDataLatLonBox.cpp.
void Marble::GeoDataLatLonBox::setNorth | ( | const qreal | north, |
GeoDataCoordinates::Unit | unit = GeoDataCoordinates::Radian |
||
) |
Definition at line 101 of file GeoDataLatLonBox.cpp.
void Marble::GeoDataLatLonBox::setRotation | ( | const qreal | rotation, |
GeoDataCoordinates::Unit | unit = GeoDataCoordinates::Radian |
||
) |
Definition at line 177 of file GeoDataLatLonBox.cpp.
void Marble::GeoDataLatLonBox::setSouth | ( | const qreal | south, |
GeoDataCoordinates::Unit | unit = GeoDataCoordinates::Radian |
||
) |
Definition at line 122 of file GeoDataLatLonBox.cpp.
void Marble::GeoDataLatLonBox::setWest | ( | const qreal | west, |
GeoDataCoordinates::Unit | unit = GeoDataCoordinates::Radian |
||
) |
Definition at line 164 of file GeoDataLatLonBox.cpp.
qreal Marble::GeoDataLatLonBox::south | ( | GeoDataCoordinates::Unit | unit = GeoDataCoordinates::Radian | ) | const |
Get the southern boundary of the bounding box.
- Returns
- the latitude of the southern boundary.
Definition at line 114 of file GeoDataLatLonBox.cpp.
GeoDataLatLonBox Marble::GeoDataLatLonBox::toCircumscribedRectangle | ( | ) | const |
- Returns
- Returns the smallest bounding box that contains this LatLonBox rotated with its given angle.
Definition at line 506 of file GeoDataLatLonBox.cpp.
|
virtual |
Creates a text string of the bounding box.
Reimplemented in Marble::GeoDataLatLonAltBox.
Definition at line 568 of file GeoDataLatLonBox.cpp.
GeoDataLatLonBox Marble::GeoDataLatLonBox::united | ( | const GeoDataLatLonBox & | other | ) | const |
Returns the bounding LatLonBox of this box with the given one.
Definition at line 446 of file GeoDataLatLonBox.cpp.
|
virtual |
Unserialize the contents of the feature from stream
.
Reimplemented from Marble::GeoDataObject.
Reimplemented in Marble::GeoDataLatLonAltBox.
Definition at line 613 of file GeoDataLatLonBox.cpp.
qreal Marble::GeoDataLatLonBox::west | ( | GeoDataCoordinates::Unit | unit = GeoDataCoordinates::Radian | ) | const |
Get the western boundary of the bounding box.
- Returns
- the longitude of the western boundary.
Definition at line 156 of file GeoDataLatLonBox.cpp.
qreal Marble::GeoDataLatLonBox::width | ( | GeoDataCoordinates::Unit | unit = GeoDataCoordinates::Radian | ) | const |
Get the width of the longitude interval.
- Returns
- the angle covered by the longitude range.
Definition at line 236 of file GeoDataLatLonBox.cpp.
Friends And Related Function Documentation
|
friend |
Definition at line 59 of file GeoDataLatLonBox.cpp.
|
friend |
Definition at line 50 of file GeoDataLatLonBox.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:44 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.