QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
qgstilingscheme.h
Go to the documentation of this file.
1/***************************************************************************
2 qgstilingscheme.h
3 --------------------------------------
4 Date : July 2017
5 Copyright : (C) 2017 by Martin Dobias
6 Email : wonder dot sk at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSTILINGSCHEME_H
17#define QGSTILINGSCHEME_H
18
19#include "qgis_3d.h"
20
22#include <qgspointxy.h>
23
24class QgsRectangle;
25struct QgsChunkNodeId;
26
27#define SIP_NO_FILE
28
37class _3D_EXPORT QgsTilingScheme
38{
39 public:
41 QgsTilingScheme() = default;
42
45
47 QgsPointXY tileToMap( int x, int y, int z ) const;
49 void mapToTile( const QgsPointXY &pt, int z, float &x, float &y ) const;
50
52 QgsRectangle tileToExtent( int x, int y, int z ) const;
53
55 QgsRectangle tileToExtent( const QgsChunkNodeId &nodeId ) const;
56
58 void extentToTile( const QgsRectangle &extent, int &x, int &y, int &z ) const;
59
61 QgsCoordinateReferenceSystem crs() const { return mCrs; }
62
68 QgsRectangle fullExtent() const { return mFullExtent; }
69
70 private:
71 QgsPointXY mMapOrigin;
72 double mBaseTileSide = 0;
74 QgsRectangle mFullExtent;
75
76
77};
78
79#endif // QGSTILINGSCHEME_H
This class represents a coordinate reference system (CRS).
A class to represent a 2D point.
Definition qgspointxy.h:59
A rectangle specified with double values.
QgsCoordinateReferenceSystem crs() const
Returns CRS of the tiling scheme.
QgsRectangle fullExtent() const
Returns the full extent used in the constructor, which might not be square.
QgsTilingScheme()=default
Creates invalid tiling scheme.
const QgsCoordinateReferenceSystem & crs