QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
19 #include "qgis_core.h"
42 : mColumn( tc ), mRow( tr ), mZoomLevel( tz )
47 int column()
const {
return mColumn; }
49 int row()
const {
return mRow; }
54 QString
toString()
const {
return QStringLiteral(
"X=%1 Y=%2 Z=%3" ).arg( mColumn ).arg( mRow ).arg( mZoomLevel ); }
75 : mStartColumn( c1 ), mEndColumn( c2 ), mStartRow( r1 ), mEndRow( r2 ) {}
78 bool isValid()
const {
return mStartColumn >= 0 && mEndColumn >= 0 && mStartRow >= 0 && mEndRow >= 0; }
87 int endRow()
const {
return mEndRow; }
120 const QgsPointXY &z0TopLeftPoint,
double z0Dimension,
121 int z0MatrixWidth = 1,
int z0MatrixHeight = 1 );
170 double scale()
const {
return mScaleDenom; }
178 void setScale(
double scale ) { mScaleDenom = scale; }
190 QPointF mapToTileCoordinates(
const QgsPointXY &mapPoint )
const;
233 bool isEmpty()
const;
238 void addGoogleCrs84QuadTiles(
int minimumZoom = 0,
int maximumZoom = 14 );
257 int minimumZoom()
const;
264 int maximumZoom()
const;
270 void dropMatricesOutsideZoomRange(
int minimumZoom,
int maximumZoom );
285 double scaleToZoom(
double scale )
const;
292 int scaleToZoomLevel(
double scale )
const;
306 double calculateTileScaleForMap(
double actualMapScale,
323 virtual QDomElement writeXml( QDomDocument &document,
const QgsReadWriteContext &context )
const;
341 QMap< int, QgsTileMatrix > mTileMatrices;
void setZoomLevel(int level)
Sets the zoom level of the tile matrix.
@ MapBox
Uses a scale doubling approach to account for hi-DPI tiles, and rounds to the nearest tile level for ...
Stores coordinates of a tile in a tile matrix set. Tile matrix is identified by the zoomLevel(),...
The class is used as a container of context for various read/write operations on other objects.
Range of tiles in a tile matrix to be rendered. The selection is rectangular, given by start/end row ...
const QgsCoordinateReferenceSystem & crs
QgsTileXYZ(int tc=-1, int tr=-1, int tz=-1)
Constructs a tile identifier from given column, row and zoom level indices.
Contains information about the context of a rendering operation.
A rectangle specified with double values.
void setCrs(const QgsCoordinateReferenceSystem &crs)
Sets the crs of the tile matrix.
ScaleToTileZoomLevelMethod
Available methods for converting map scales to tile zoom levels.
QgsCoordinateReferenceSystem crs() const
Returns the crs of the tile matrix.
bool isRootTileMatrix() const
Returns the root status of the tile matrix (zoom level == 0)
int zoomLevel() const
Returns the zoom level of the tile matrix.
int endRow() const
Returns index of the last row in the range.
Defines a matrix of tiles for a single zoom level: it is defined by its size (width *.
int matrixHeight() const
Returns number of rows of the tile matrix.
QgsRectangle extent() const
Returns extent of the tile matrix.
QgsTileRange(int c1=-1, int c2=-1, int r1=-1, int r2=-1)
Constructs a range of tiles from given span of columns and rows.
Defines a set of tile matrices for multiple zoom levels.
QString toString() const
Returns tile coordinates in a formatted string.
bool isValid() const
Returns whether the range is valid (when all row/column numbers are not negative)
int endColumn() const
Returns index of the last column in the range.
int zoomLevel() const
Returns tile's zoom level (Z)
This class represents a coordinate reference system (CRS).
A class to represent a 2D point.
int startRow() const
Returns index of the first row in the range.
void setScale(double scale)
Sets the scale denominator of the tile matrix.
int row() const
Returns tile's row index (Y)
void setScaleToTileZoomMethod(Qgis::ScaleToTileZoomLevelMethod method)
Sets the scale to tile zoom method.
int matrixWidth() const
Returns number of columns of the tile matrix.
double scale() const
Returns scale denominator of the tile matrix.
Qgis::ScaleToTileZoomLevelMethod scaleToTileZoomMethod() const
Returns the scale to tile zoom method.
int startColumn() const
Returns index of the first column in the range.
int column() const
Returns tile's column index (X)