QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
3d
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
#include "
qgscoordinatereferencesystem.h
"
21
#include "
qgspointxy.h
"
22
23
#define SIP_NO_FILE
24
25
class
QgsRectangle
;
26
struct
QgsChunkNodeId;
27
28
36
class
_3D_EXPORT
QgsTilingScheme
37
{
38
public
:
40
QgsTilingScheme
() =
default
;
41
43
QgsTilingScheme
(
const
QgsRectangle
&
fullExtent
,
const
QgsCoordinateReferenceSystem
&
crs
);
44
46
QgsPointXY
tileToMap
(
int
x,
int
y,
int
z )
const
;
48
void
mapToTile
(
const
QgsPointXY
&pt,
int
z,
float
&x,
float
&y )
const
;
49
51
QgsRectangle
tileToExtent
(
int
x,
int
y,
int
z )
const
;
52
54
QgsRectangle
tileToExtent
(
const
QgsChunkNodeId &nodeId )
const
;
55
57
void
extentToTile
(
const
QgsRectangle
&extent,
int
&x,
int
&y,
int
&z )
const
;
58
60
QgsCoordinateReferenceSystem
crs
()
const
{
return
mCrs; }
61
67
QgsRectangle
fullExtent
()
const
{
return
mFullExtent; }
68
69
private
:
70
QgsPointXY
mMapOrigin;
71
double
mBaseTileSide = 0;
72
QgsCoordinateReferenceSystem
mCrs;
73
QgsRectangle
mFullExtent;
74
};
75
76
#endif
// QGSTILINGSCHEME_H
QgsCoordinateReferenceSystem
Represents a coordinate reference system (CRS).
Definition
qgscoordinatereferencesystem.h:216
QgsPointXY
Represents a 2D point.
Definition
qgspointxy.h:62
QgsRectangle
A rectangle specified with double values.
Definition
qgsrectangle.h:47
QgsTilingScheme::mapToTile
void mapToTile(const QgsPointXY &pt, int z, float &x, float &y) const
Returns tile coordinates for given map coordinates and Z level.
Definition
qgstilingscheme.cpp:37
QgsTilingScheme::crs
QgsCoordinateReferenceSystem crs() const
Returns CRS of the tiling scheme.
Definition
qgstilingscheme.h:60
QgsTilingScheme::fullExtent
QgsRectangle fullExtent() const
Returns the full extent used in the constructor, which might not be square.
Definition
qgstilingscheme.h:67
QgsTilingScheme::extentToTile
void extentToTile(const QgsRectangle &extent, int &x, int &y, int &z) const
Returns coordinates of a tile that most tightly fits the whole extent.
Definition
qgstilingscheme.cpp:56
QgsTilingScheme::tileToMap
QgsPointXY tileToMap(int x, int y, int z) const
Returns map coordinates at tile coordinates (for lower-left corner of the tile).
Definition
qgstilingscheme.cpp:29
QgsTilingScheme::QgsTilingScheme
QgsTilingScheme()=default
Creates invalid tiling scheme.
QgsTilingScheme::tileToExtent
QgsRectangle tileToExtent(int x, int y, int z) const
Returns map coordinates of the extent of a tile.
Definition
qgstilingscheme.cpp:44
qgscoordinatereferencesystem.h
qgspointxy.h
Generated on
for QGIS API Documentation by
1.17.0