/
qgstiles.sip.in
191 lines (155 loc) · 4.97 KB
/
qgstiles.sip.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgstiles.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsTileXYZ
{
%Docstring(signature="appended")
Stores coordinates of a tile in a tile matrix set. Tile matrix is identified
by the :py:func:`~zoomLevel`, and the position within tile matrix is given by :py:func:`~column`
and :py:func:`~row`.
.. versionadded:: 3.14
%End
%TypeHeaderCode
#include "qgstiles.h"
%End
public:
QgsTileXYZ( int tc = -1, int tr = -1, int tz = -1 );
%Docstring
Constructs a tile identifier from given column, row and zoom level indices
%End
int column() const;
%Docstring
Returns tile's column index (X)
%End
int row() const;
%Docstring
Returns tile's row index (Y)
%End
int zoomLevel() const;
%Docstring
Returns tile's zoom level (Z)
%End
QString toString() const;
%Docstring
Returns tile coordinates in a formatted string
%End
};
class QgsTileRange
{
%Docstring(signature="appended")
Range of tiles in a tile matrix to be rendered. The selection is rectangular,
given by start/end row and column numbers.
.. versionadded:: 3.14
%End
%TypeHeaderCode
#include "qgstiles.h"
%End
public:
QgsTileRange( int c1 = -1, int c2 = -1, int r1 = -1, int r2 = -1 );
%Docstring
Constructs a range of tiles from given span of columns and rows
%End
bool isValid() const;
%Docstring
Returns whether the range is valid (when all row/column numbers are not negative)
%End
int startColumn() const;
%Docstring
Returns index of the first column in the range
%End
int endColumn() const;
%Docstring
Returns index of the last column in the range
%End
int startRow() const;
%Docstring
Returns index of the first row in the range
%End
int endRow() const;
%Docstring
Returns index of the last row in the range
%End
};
class QgsTileMatrix
{
%Docstring(signature="appended")
Defines a matrix of tiles for a single zoom level: it is defined by its size (width * \brief height)
and map extent that it covers.
Please note that we follow the XYZ convention of X/Y axes, i.e. top-left tile has [0,0] coordinate
(which is different from TMS convention where bottom-left tile has [0,0] coordinate).
.. versionadded:: 3.14
%End
%TypeHeaderCode
#include "qgstiles.h"
%End
public:
static QgsTileMatrix fromWebMercator( int zoomLevel );
%Docstring
Returns a tile matrix for the usual web mercator
%End
static QgsTileMatrix fromCustomDef( int zoomLevel, const QgsCoordinateReferenceSystem &crs,
const QgsPointXY &z0TopLeftPoint, double z0Dimension,
int z0MatrixWidth = 1, int z0MatrixHeight = 1 );
%Docstring
Returns a tile matrix for a specific CRS, top left point, zoom level 0 dimension in CRS units
%End
static QgsTileMatrix fromTileMatrix( const int &zoomLevel, const QgsTileMatrix &tileMatrix );
%Docstring
Returns a tile matrix based on another one
%End
QgsCoordinateReferenceSystem crs() const;
%Docstring
Returns the authority identifier for the CRS of the tile matrix
%End
int zoomLevel() const;
%Docstring
Returns zoom level of the tile matrix
%End
int matrixWidth() const;
%Docstring
Returns number of columns of the tile matrix
%End
int matrixHeight() const;
%Docstring
Returns number of rows of the tile matrix
%End
QgsRectangle extent() const;
%Docstring
Returns extent of the tile matrix
%End
double scale() const;
%Docstring
Returns scale denominator of the tile matrix
%End
QgsRectangle tileExtent( QgsTileXYZ id ) const;
%Docstring
Returns extent of the given tile in this matrix
%End
QgsPointXY tileCenter( QgsTileXYZ id ) const;
%Docstring
Returns center of the given tile in this matrix
%End
QgsTileRange tileRangeFromExtent( const QgsRectangle &mExtent );
%Docstring
Returns tile range that fully covers the given extent
%End
QPointF mapToTileCoordinates( const QgsPointXY &mapPoint ) const;
%Docstring
Returns row/column coordinates (floating point number) from the given point in map coordinates
%End
bool isRootTileMatrix() const;
%Docstring
Returns the root status of the tile matrix (zoom level == 0)
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgstiles.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/