Marble::EquirectProjection

Search for usage in LXR

Marble::EquirectProjection Class Reference

#include <EquirectProjection.h>

Inheritance diagram for Marble::EquirectProjection:

Public Member Functions

 EquirectProjection ()
 
QString description () const override
 
bool geoCoordinates (const int x, const int y, const ViewportParams *params, qreal &lon, qreal &lat, GeoDataCoordinates::Unit 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
 
QString name () const override
 
PreservationType preservationType () const override
 
bool screenCoordinates (const GeoDataCoordinates &coordinates, const ViewportParams *params, qreal &x, qreal &y, bool &globeHidesPoint) const override
 
virtual bool screenCoordinates (const GeoDataCoordinates &coordinates, const ViewportParams *viewport, qreal *x, qreal &y, int &pointRepeatNum, const QSizeF &size, bool &globeHidesPoint) const =0
 
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
 
virtual bool screenCoordinates (const GeoDataCoordinates &geopoint, const ViewportParams *viewport, qreal &x, qreal &y, bool &globeHidesPoint) const =0
 
virtual bool screenCoordinates (const GeoDataLineString &lineString, const ViewportParams *viewport, QVector< QPolygonF * > &polygons) const =0
 
bool screenCoordinates (const GeoDataLineString &lineString, const ViewportParams *viewport, QVector< 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
 
virtual qreal maxValidLat () const
 
qreal minLat () const
 
virtual qreal minValidLat () 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 Equirectangular projection used by the "Flat Map" view.

Definition at line 30 of file EquirectProjection.h.

Constructor & Destructor Documentation

◆ EquirectProjection()

EquirectProjection::EquirectProjection ( )

Construct a new EquirectProjection.

Definition at line 22 of file EquirectProjection.cpp.

◆ ~EquirectProjection()

EquirectProjection::~EquirectProjection ( )
override

Definition at line 29 of file EquirectProjection.cpp.

Member Function Documentation

◆ description()

QString EquirectProjection::description ( ) const
overridevirtual

Returns a short user description of the projection that can be used in tooltips or dialogs.

Implements Marble::AbstractProjection.

Definition at line 38 of file EquirectProjection.cpp.

◆ geoCoordinates()

bool EquirectProjection::geoCoordinates ( const int x,
const int y,
const ViewportParams * params,
qreal & lon,
qreal & lat,
GeoDataCoordinates::Unit unit = GeoDataCoordinates::Degree ) const
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
xthe x coordinate of the pixel
ythe y coordinate of the pixel
paramsparameters of the viewport
lonthe longitude angle is returned through this parameter
latthe latitude angle is returned through this parameter
unitthe unit
Returns
true if the pixel (x, y) is within the map false if the pixel (x, y) is above or underneath the map

Implements Marble::AbstractProjection.

Definition at line 141 of file EquirectProjection.cpp.

◆ icon()

QIcon EquirectProjection::icon ( ) const
overridevirtual

Returns an icon for the projection.

Implements Marble::AbstractProjection.

Definition at line 43 of file EquirectProjection.cpp.

◆ latLonAltBox()

GeoDataLatLonAltBox EquirectProjection::latLonAltBox ( const QRect & screenRect,
const ViewportParams * viewport ) const
overridevirtual

Returns a GeoDataLatLonAltBox bounding box of the given screenrect inside the given viewport.

Reimplemented from Marble::AbstractProjection.

Definition at line 190 of file EquirectProjection.cpp.

◆ mapCoversViewport()

bool EquirectProjection::mapCoversViewport ( const ViewportParams * viewport) const
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 248 of file EquirectProjection.cpp.

◆ name()

QString EquirectProjection::name ( ) const
overridevirtual

Returns the user-visible name of the projection.

Implements Marble::AbstractProjection.

Definition at line 33 of file EquirectProjection.cpp.

◆ preservationType()

PreservationType Marble::EquirectProjection::preservationType ( ) const
inlineoverridevirtual

Reimplemented from Marble::AbstractProjection.

Definition at line 58 of file EquirectProjection.h.

◆ screenCoordinates() [1/8]

bool EquirectProjection::screenCoordinates ( const GeoDataCoordinates & coordinates,
const ViewportParams * params,
qreal & x,
qreal & y,
bool & globeHidesPoint ) const
overridevirtual

Get the screen coordinates corresponding to geographical coordinates in the map.

Parameters
coordinatesthe coordinates of the requested pixel position
paramsthe viewport parameters
xthe x coordinate of the pixel is returned through this parameter
ythe y coordinate of the pixel is returned through this parameter
globeHidesPointwhether the globe hides the point
Returns
true if the geographical coordinates are visible on the screen false if the geographical coordinates are not visible on the screen

Reimplemented from Marble::CylindricalProjection.

Definition at line 48 of file EquirectProjection.cpp.

◆ screenCoordinates() [2/8]

virtual bool Marble::AbstractProjection::screenCoordinates ( const GeoDataCoordinates & coordinates,
const ViewportParams * viewport,
qreal * x,
qreal & y,
int & pointRepeatNum,
const QSizeF & size,
bool & globeHidesPoint ) const
virtual

Get the coordinates of screen points for geographical coordinates in the map.

Parameters
coordinatesthe point on earth, including altitude, that we want the coordinates for.
viewportthe viewport parameters
xthe x coordinates of the pixels are returned through this parameter
ythe y coordinate of the pixel is returned through this parameter
pointRepeatNumthe amount of times that a single geographical point gets represented on the map
sizethe size
globeHidesPointwhether the point gets hidden on the far side of the earth
Returns
true if the geographical coordinates are visible on the screen false if the geographical coordinates are not visible on the screen
See also
ViewportParams

Reimplemented from Marble::CylindricalProjection.

◆ screenCoordinates() [3/8]

bool EquirectProjection::screenCoordinates ( const GeoDataCoordinates & coordinates,
const ViewportParams * viewport,
qreal * x,
qreal & y,
int & pointRepeatNum,
const QSizeF & size,
bool & globeHidesPoint ) const
overridevirtual

Get the coordinates of screen points for geographical coordinates in the map.

Parameters
coordinatesthe point on earth, including altitude, that we want the coordinates for.
viewportthe viewport parameters
xthe x coordinates of the pixels are returned through this parameter
ythe y coordinate of the pixel is returned through this parameter
pointRepeatNumthe amount of times that a single geographical point gets represented on the map
sizethe size
globeHidesPointwhether the point gets hidden on the far side of the earth
Returns
true if the geographical coordinates are visible on the screen false if the geographical coordinates are not visible on the screen
See also
ViewportParams

Reimplemented from Marble::CylindricalProjection.

Definition at line 80 of file EquirectProjection.cpp.

◆ screenCoordinates() [4/8]

bool AbstractProjection::screenCoordinates ( const GeoDataCoordinates & geopoint,
const ViewportParams * viewport,
qreal & x,
qreal & y ) const

Definition at line 48 of file AbstractProjection.cpp.

◆ screenCoordinates() [5/8]

virtual bool Marble::AbstractProjection::screenCoordinates ( const GeoDataCoordinates & geopoint,
const ViewportParams * viewport,
qreal & x,
qreal & y,
bool & globeHidesPoint ) const
virtual

Get the screen coordinates corresponding to geographical coordinates in the map.

Parameters
geopointthe point on earth, including altitude, that we want the coordinates for.
viewportthe viewport parameters
xthe x coordinate of the pixel is returned through this parameter
ythe y coordinate of the pixel is returned through this parameter
globeHidesPointwhether the point gets hidden on the far side of the earth
Returns
true if the geographical coordinates are visible on the screen false if the geographical coordinates are not visible on the screen
See also
ViewportParams

Reimplemented from Marble::CylindricalProjection.

◆ screenCoordinates() [6/8]

virtual bool Marble::AbstractProjection::screenCoordinates ( const GeoDataLineString & lineString,
const ViewportParams * viewport,
QVector< QPolygonF * > & polygons ) const
virtual

Reimplemented from Marble::CylindricalProjection.

◆ screenCoordinates() [7/8]

bool Marble::CylindricalProjection::screenCoordinates ( const GeoDataLineString & lineString,
const ViewportParams * viewport,
QVector< QPolygonF * > & polygons ) const
overridevirtual

Reimplemented from Marble::CylindricalProjection.

Definition at line 44 of file CylindricalProjection.cpp.

◆ screenCoordinates() [8/8]

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
lonthe lon coordinate of the requested pixel position in radians
latthe lat coordinate of the requested pixel position in radians
viewportthe viewport parameters
xthe x coordinate of the pixel is returned through this parameter
ythe y coordinate of the pixel is returned through this parameter
Returns
true if the geographical coordinates are visible on the screen false if the geographical coordinates are not visible on the screen
See also
ViewportParams

Definition at line 48 of file AbstractProjection.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:18 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.