Marble

GeoSceneMercatorTileProjection.h
1/*
2 SPDX-FileCopyrightText: 2016 Friedrich W. H. Kossebau <kossebau@kde.org>
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
12namespace 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{
32public:
33 /**
34 * @brief Construct a new GeoSceneMercatorTileProjection.
35 */
37
39
40public:
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
56 using GeoSceneAbstractTileProjection::geoCoordinates;
57
58private:
59 Q_DISABLE_COPY(GeoSceneMercatorTileProjection)
60};
61
62}
63
64#endif
A class that defines a 2D bounding box for geographic data.
A base class for projections between tile indizes and geo coordinates in Marble.
Converts the x and y indices of tiles to and from geo coordinates.
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 21 2024 12:00:07 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.