Marble

GeoSceneMercatorTileProjection.h
1 /*
2  SPDX-FileCopyrightText: 2016 Friedrich W. H. Kossebau <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef MARBLE_GEOSCENEMERCATORTILEPROJECTION_H
8 #define MARBLE_GEOSCENEMERCATORTILEPROJECTION_H
9 
10 #include "GeoSceneAbstractTileProjection.h"
11 
12 namespace Marble
13 {
14 
15 /**
16  * Converts the x and y indices of tiles to and from geo coordinates.
17  * For tiles of maps in Mercator projection.
18  *
19  * Tiles do have the same width and the same height per zoomlevel.
20  * The number of tiles per dimension is twice that of the previous lower zoomlevel.
21  * The indexing is done in x dimension eastwards, with the first tiles beginning at -180 degree
22  * and an x value of 0 and the last tiles ending at +180 degree,
23  * in y dimension southwards with the first tiles beginning at +85.05113 degree and a y value of 0
24  * and the last tiles ending at -85.05113 degree.
25  *
26  * NOTE: The method @c tileIndexes() handles any latitude value >= +85.0 degree as
27  * exactly +85.0 degree and any latitude value <= -85.0 as exactly -85.0 degree.
28  * So for higher zoomlevels the outermost tiles will be masked by that and not included in any results.
29  */
31 {
32 public:
33  /**
34  * @brief Construct a new GeoSceneMercatorTileProjection.
35  */
37 
39 
40 public:
41  /**
42  * @copydoc
43  */
44  GeoSceneAbstractTileProjection::Type type() const override;
45 
46  /**
47  * @copydoc
48  */
49  QRect tileIndexes(const GeoDataLatLonBox &latLonBox, int zoomLevel) const override;
50 
51  /**
52  * @copydoc
53  */
54  GeoDataLatLonBox geoCoordinates(int zoomLevel, int x, int y) const override;
55 
57 
58 private:
59  Q_DISABLE_COPY(GeoSceneMercatorTileProjection)
60 };
61 
62 }
63 
64 #endif
virtual GeoDataLatLonBox geoCoordinates(int zoomLevel, int x, int y) const =0
Get the boundary geo coordinates corresponding to a tile.
Converts the x and y indices of tiles to and from geo coordinates.
A class that defines a 2D bounding box for geographic data.
Binds a QML item to a specific geodetic location in screen coordinates.
A base class for projections between tile indizes and geo coordinates in Marble.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 04:12:26 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.