Marble::MercatorProjection
#include <MercatorProjection.h>
Public Member Functions | |
MercatorProjection () | |
QString | description () const override |
bool | geoCoordinates (const int x, const int y, const ViewportParams *params, qreal &lon, qreal &lat, GeoDataCoordinates::Unit=GeoDataCoordinates::Degree) const override |
QIcon | icon () const override |
GeoDataLatLonAltBox | latLonAltBox (const QRect &screenRect, const ViewportParams *viewport) const override |
bool | mapCoversViewport (const ViewportParams *viewport) const override |
qreal | maxValidLat () const override |
qreal | minValidLat () const override |
QString | name () const override |
PreservationType | preservationType () const override |
bool | screenCoordinates (const GeoDataCoordinates &coordinates, const ViewportParams *params, qreal &x, qreal &y, bool &globeHidesPoint) const override |
bool | screenCoordinates (const GeoDataCoordinates &coordinates, const ViewportParams *viewport, qreal *x, qreal &y, int &pointRepeatNum, const QSizeF &size, bool &globeHidesPoint) const override |
bool | screenCoordinates (const GeoDataCoordinates &geopoint, const ViewportParams *viewport, qreal &x, qreal &y) const |
bool | screenCoordinates (const GeoDataLineString &lineString, const ViewportParams *viewport, QList< QPolygonF * > &polygons) const override |
bool | screenCoordinates (const qreal lon, const qreal lat, const ViewportParams *viewport, qreal &x, qreal &y) const |
Public Member Functions inherited from Marble::CylindricalProjection | |
QPainterPath | mapShape (const ViewportParams *viewport) const override |
bool | repeatableX () const override |
bool | screenCoordinates (const GeoDataCoordinates &geopoint, const ViewportParams *viewport, qreal &x, qreal &y) const |
bool | screenCoordinates (const qreal lon, const qreal lat, const ViewportParams *viewport, qreal &x, qreal &y) const |
SurfaceType | surfaceType () const override |
bool | traversableDateLine () const override |
bool | traversablePoles () const override |
Public Member Functions inherited from Marble::AbstractProjection | |
AbstractProjection () | |
virtual qreal | clippingRadius () const |
virtual bool | isClippedToSphere () const |
virtual bool | isOrientedNormal () const |
QRegion | mapRegion (const ViewportParams *viewport) const |
qreal | maxLat () const |
qreal | minLat () const |
bool | screenCoordinates (const GeoDataCoordinates &geopoint, const ViewportParams *viewport, qreal &x, qreal &y) const |
bool | screenCoordinates (const qreal lon, const qreal lat, const ViewportParams *viewport, qreal &x, qreal &y) const |
void | setMaxLat (qreal maxLat) |
void | setMinLat (qreal minLat) |
Additional Inherited Members | |
Public Types inherited from Marble::AbstractProjection | |
enum | PreservationType { NoPreservation , Conformal , EqualArea } |
enum | SurfaceType { Cylindrical , Pseudocylindrical , Hybrid , Conical , Pseudoconical , Azimuthal } |
Protected Member Functions inherited from Marble::CylindricalProjection | |
CylindricalProjection (CylindricalProjectionPrivate *dd) | |
Protected Member Functions inherited from Marble::AbstractProjection | |
AbstractProjection (AbstractProjectionPrivate *dd) | |
Protected Attributes inherited from Marble::AbstractProjection | |
const QScopedPointer< AbstractProjectionPrivate > | d_ptr |
Detailed Description
A class to implement the Mercator projection.
Definition at line 26 of file MercatorProjection.h.
Constructor & Destructor Documentation
◆ MercatorProjection()
MercatorProjection::MercatorProjection | ( | ) |
Construct a new MercatorProjection.
Definition at line 20 of file MercatorProjection.cpp.
Member Function Documentation
◆ description()
|
overridevirtual |
Returns a short user description of the projection that can be used in tooltips or dialogs.
Implements Marble::AbstractProjection.
Definition at line 36 of file MercatorProjection.cpp.
◆ geoCoordinates()
|
overridevirtual |
Get the earth coordinates corresponding to a pixel in the map.
If the pixel (x, y) is outside the globe, only lon
will be calculated, and lat will be unchanged.
- Parameters
-
x the x coordinate of the pixel y the y coordinate of the pixel params the viewport parameters lon the longitude angle is returned through this parameter lat the latitude angle is returned through this parameter unit the unit
- Returns
true
if the pixel (x, y) is within the globefalse
if the pixel (x, y) is outside the globe, i.e. in space.
Implements Marble::AbstractProjection.
Definition at line 154 of file MercatorProjection.cpp.
◆ icon()
|
overridevirtual |
Returns an icon for the projection.
Implements Marble::AbstractProjection.
Definition at line 41 of file MercatorProjection.cpp.
◆ latLonAltBox()
|
overridevirtual |
Returns a GeoDataLatLonAltBox bounding box of the given screenrect inside the given viewport.
Reimplemented from Marble::AbstractProjection.
Definition at line 201 of file MercatorProjection.cpp.
◆ mapCoversViewport()
|
overridevirtual |
Returns whether the projected data fully obstructs the current viewport.
In this case there are no black areas visible around the actual map. This case allows for performance optimizations.
Implements Marble::AbstractProjection.
Definition at line 237 of file MercatorProjection.cpp.
◆ maxValidLat()
|
overridevirtual |
Returns the maximum (northern) latitude that is mathematically defined and reasonable.
Example: For many projections the value will represent +90 degrees in Radian. In the case of Mercator this value will equal +85.05113 degrees in Radian.
Reimplemented from Marble::AbstractProjection.
Definition at line 46 of file MercatorProjection.cpp.
◆ minValidLat()
|
overridevirtual |
Returns the minimum (southern) latitude that is mathematically defined and reasonable.
Example: For many projections the value will represent -90 degrees in Radian. In the case of Mercator this value will equal -85.05113 degrees in Radian.
Reimplemented from Marble::AbstractProjection.
Definition at line 52 of file MercatorProjection.cpp.
◆ name()
|
overridevirtual |
Returns the user-visible name of the projection.
Implements Marble::AbstractProjection.
Definition at line 31 of file MercatorProjection.cpp.
◆ preservationType()
|
inlineoverridevirtual |
Reimplemented from Marble::AbstractProjection.
Definition at line 56 of file MercatorProjection.h.
◆ screenCoordinates() [1/5]
|
overridevirtual |
Get the screen coordinates corresponding to geographical coordinates in the map.
- Parameters
-
coordinates the coordinates of the requested pixel position params the viewport parameters x the x coordinate of the pixel is returned through this parameter y the y coordinate of the pixel is returned through this parameter globeHidesPoint whether the globe hides the point
- Returns
true
if the geographical coordinates are visible on the screenfalse
if the geographical coordinates are not visible on the screen
Reimplemented from Marble::CylindricalProjection.
Definition at line 58 of file MercatorProjection.cpp.
◆ screenCoordinates() [2/5]
|
overridevirtual |
Get the coordinates of screen points for geographical coordinates in the map.
- Parameters
-
coordinates the point on earth, including altitude, that we want the coordinates for. viewport the viewport parameters x the x coordinates of the pixels are returned through this parameter y the y coordinate of the pixel is returned through this parameter pointRepeatNum the amount of times that a single geographical point gets represented on the map size the size globeHidesPoint whether the point gets hidden on the far side of the earth
- Returns
true
if the geographical coordinates are visible on the screenfalse
if the geographical coordinates are not visible on the screen
- See also
- ViewportParams
Reimplemented from Marble::CylindricalProjection.
Definition at line 93 of file MercatorProjection.cpp.
◆ screenCoordinates() [3/5]
bool AbstractProjection::screenCoordinates | ( | const GeoDataCoordinates & | geopoint, |
const ViewportParams * | viewport, | ||
qreal & | x, | ||
qreal & | y ) const |
Definition at line 57 of file AbstractProjection.cpp.
◆ screenCoordinates() [4/5]
|
overridevirtual |
Reimplemented from Marble::CylindricalProjection.
Definition at line 55 of file CylindricalProjection.cpp.
◆ screenCoordinates() [5/5]
bool AbstractProjection::screenCoordinates | ( | const qreal | lon, |
const qreal | lat, | ||
const ViewportParams * | viewport, | ||
qreal & | x, | ||
qreal & | y ) const |
Get the screen coordinates corresponding to geographical coordinates in the map.
- Parameters
-
lon the lon coordinate of the requested pixel position in radians lat the lat coordinate of the requested pixel position in radians viewport the viewport parameters x the x coordinate of the pixel is returned through this parameter y the y coordinate of the pixel is returned through this parameter
- Returns
true
if the geographical coordinates are visible on the screenfalse
if the geographical coordinates are not visible on the screen
- See also
- ViewportParams
Definition at line 57 of file AbstractProjection.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:52:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.