• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • lib
  • marble
  • projections
MercatorProjection.h
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2007 Inge Wallin <ingwa@kde.org>
9 // Copyright 2007-2012 Torsten Rahn <rahn@kde.org>
10 //
11 
12 
13 #ifndef MARBLE_MERCATORPROJECTION_H
14 #define MARBLE_MERCATORPROJECTION_H
15 
16 
25 #include "CylindricalProjection.h"
26 
27 namespace Marble
28 {
29 
34 class MercatorProjection : public CylindricalProjection
35 {
36  // Not a QObject so far because we don't need to send signals.
37  public:
38 
42  MercatorProjection();
43 
44  virtual ~MercatorProjection();
45 
46  virtual qreal maxValidLat() const;
47  virtual qreal minValidLat() const;
48 
49  virtual PreservationType preservationType() const { return Conformal; }
50 
60  bool screenCoordinates( const GeoDataCoordinates &coordinates,
61  const ViewportParams *params,
62  qreal &x, qreal &y, bool &globeHidesPoint ) const;
63 
64  bool screenCoordinates( const GeoDataCoordinates &coordinates,
65  const ViewportParams * viewport,
66  qreal *x, qreal &y, int &pointRepeatNum,
67  const QSizeF& size,
68  bool &globeHidesPoint ) const;
69 
70  using CylindricalProjection::screenCoordinates;
71 
85  bool geoCoordinates( const int x, const int y,
86  const ViewportParams *params,
87  qreal& lon, qreal& lat,
88  GeoDataCoordinates::Unit = GeoDataCoordinates::Degree ) const;
89 
90  GeoDataLatLonAltBox latLonAltBox( const QRect &screenRect,
91  const ViewportParams *viewport ) const;
92 
93  bool mapCoversViewport( const ViewportParams *viewport ) const;
94 
95  private:
96  Q_DISABLE_COPY( MercatorProjection )
97 };
98 
99 }
100 
101 #endif
Marble::GeoDataCoordinates::Unit
Unit
enum used constructor to specify the units used
Definition: GeoDataCoordinates.h:64
Marble::GeoDataCoordinates
A 3d point representation.
Definition: GeoDataCoordinates.h:52
Marble::MercatorProjection::MercatorProjection
MercatorProjection()
Construct a new MercatorProjection.
Definition: MercatorProjection.cpp:27
Marble::MercatorProjection::screenCoordinates
bool screenCoordinates(const GeoDataCoordinates &coordinates, const ViewportParams *params, qreal &x, qreal &y, bool &globeHidesPoint) const
Get the screen coordinates corresponding to geographical coordinates in the map.
Definition: MercatorProjection.cpp:50
Marble::MercatorProjection::mapCoversViewport
bool mapCoversViewport(const ViewportParams *viewport) const
Definition: MercatorProjection.cpp:244
Marble::MercatorProjection::preservationType
virtual PreservationType preservationType() const
Definition: MercatorProjection.h:49
Marble::GeoDataCoordinates::Degree
Definition: GeoDataCoordinates.h:66
QRect
Marble::CylindricalProjection
A base class for the Equirectangular and Mercator projections in Marble.
Definition: CylindricalProjection.h:33
Marble::CylindricalProjection::screenCoordinates
virtual bool screenCoordinates(const GeoDataLineString &lineString, const ViewportParams *viewport, QVector< QPolygonF * > &polygons) const
Definition: CylindricalProjection.cpp:81
Marble::AbstractProjection::Conformal
Definition: AbstractProjection.h:64
Marble::ViewportParams
A public class that controls what is visible in the viewport of a Marble map.
Definition: ViewportParams.h:44
Marble::MercatorProjection::latLonAltBox
GeoDataLatLonAltBox latLonAltBox(const QRect &screenRect, const ViewportParams *viewport) const
Definition: MercatorProjection.cpp:206
CylindricalProjection.h
This file contains the headers for CylindricalProjection.
Marble::AbstractProjection::PreservationType
PreservationType
Definition: AbstractProjection.h:62
QSizeF
Marble::MercatorProjection::~MercatorProjection
virtual ~MercatorProjection()
Definition: MercatorProjection.cpp:34
Marble::MercatorProjection::minValidLat
virtual qreal minValidLat() const
Definition: MercatorProjection.cpp:44
Marble::MercatorProjection::geoCoordinates
bool geoCoordinates(const int x, const int y, const ViewportParams *params, qreal &lon, qreal &lat, GeoDataCoordinates::Unit=GeoDataCoordinates::Degree) const
Get the earth coordinates corresponding to a pixel in the map.
Definition: MercatorProjection.cpp:156
Marble::MercatorProjection
A class to implement the Mercator projection.
Definition: MercatorProjection.h:34
Marble::GeoDataLatLonAltBox
A class that defines a 3D bounding box for geographic data.
Definition: GeoDataLatLonAltBox.h:49
Marble::MercatorProjection::maxValidLat
virtual qreal maxValidLat() const
Definition: MercatorProjection.cpp:38
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal