File indexing completed on 2025-01-05 03:59:10
0001 /* 0002 SPDX-FileCopyrightText: 2016 Friedrich W. H. Kossebau <kossebau@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef MARBLE_GEOSCENEEQUIRECTTILEPROJECTION_H 0008 #define MARBLE_GEOSCENEEQUIRECTTILEPROJECTION_H 0009 0010 #include "GeoSceneAbstractTileProjection.h" 0011 0012 namespace Marble 0013 { 0014 0015 /** 0016 * Converts the x and y indices of tiles to and from geo coordinates. 0017 * For tiles of maps in Equirectangular projection. 0018 * 0019 * Tiles do have the same width and the same height per zoomlevel. 0020 * The number of tiles per dimension is twice that of the previous lower zoomlevel. 0021 * The indexing is done in x dimension eastwards, with the first tiles beginning at -180 degree 0022 * and an x value of 0 and the last tiles ending at +180 degree, 0023 * in y dimension southwards with the first tiles beginning at +90 degree and a y value of 0 0024 * and the last tiles ending at -90 degree. 0025 */ 0026 class DIGIKAM_EXPORT GeoSceneEquirectTileProjection : public GeoSceneAbstractTileProjection 0027 { 0028 public: 0029 /** 0030 * @brief Construct a new GeoSceneEquirectTileProjection. 0031 */ 0032 GeoSceneEquirectTileProjection(); 0033 0034 ~GeoSceneEquirectTileProjection() override; 0035 0036 public: 0037 /** 0038 * @copydoc 0039 */ 0040 GeoSceneAbstractTileProjection::Type type() const override; 0041 0042 /** 0043 * @copydoc 0044 */ 0045 QRect tileIndexes(const GeoDataLatLonBox &latLonBox, int zoomLevel) const override; 0046 0047 /** 0048 * @copydoc 0049 */ 0050 GeoDataLatLonBox geoCoordinates(int zoomLevel, int x, int y) const override; 0051 0052 using GeoSceneAbstractTileProjection::geoCoordinates; 0053 0054 private: 0055 Q_DISABLE_COPY(GeoSceneEquirectTileProjection) 0056 }; 0057 0058 } 0059 0060 #endif