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 #include "GeoSceneAbstractTileProjection.h" 0008 0009 #include "GeoDataLatLonBox.h" 0010 #include <TileId.h> 0011 0012 namespace Marble 0013 { 0014 0015 class GeoSceneAbstractTileProjectionPrivate 0016 { 0017 public: 0018 GeoSceneAbstractTileProjectionPrivate(); 0019 0020 public: 0021 int levelZeroColumns; 0022 int levelZeroRows; 0023 }; 0024 0025 GeoSceneAbstractTileProjectionPrivate::GeoSceneAbstractTileProjectionPrivate() 0026 : levelZeroColumns(1) 0027 , levelZeroRows(1) 0028 { 0029 } 0030 0031 GeoSceneAbstractTileProjection::GeoSceneAbstractTileProjection() 0032 : d_ptr(new GeoSceneAbstractTileProjectionPrivate()) 0033 { 0034 } 0035 0036 GeoSceneAbstractTileProjection::~GeoSceneAbstractTileProjection() 0037 { 0038 } 0039 0040 int GeoSceneAbstractTileProjection::levelZeroColumns() const 0041 { 0042 return d_ptr->levelZeroColumns; 0043 } 0044 0045 void GeoSceneAbstractTileProjection::setLevelZeroColumns(int levelZeroColumns) 0046 { 0047 d_ptr->levelZeroColumns = levelZeroColumns; 0048 } 0049 0050 int GeoSceneAbstractTileProjection::levelZeroRows() const 0051 { 0052 return d_ptr->levelZeroRows; 0053 } 0054 0055 void GeoSceneAbstractTileProjection::setLevelZeroRows(int levelZeroRows) 0056 { 0057 d_ptr->levelZeroRows = levelZeroRows; 0058 } 0059 0060 GeoDataLatLonBox GeoSceneAbstractTileProjection::geoCoordinates(const TileId &tileId) const 0061 { 0062 return geoCoordinates(tileId.zoomLevel(), tileId.x(), tileId.y()); 0063 } 0064 0065 }