QGIS API Documentation  3.20.0-Odense (decaadbb31)
Public Member Functions | Static Public Member Functions | List of all members
QgsTileMatrix Class Reference

Defines a matrix of tiles for a single zoom level: it is defined by its size (width *. More...

#include <qgstiles.h>

Public Member Functions

QgsRectangle extent () const
 Returns extent of the tile matrix. More...
 
QPointF mapToTileCoordinates (const QgsPointXY &mapPoint) const
 Returns row/column coordinates (floating point number) from the given point in map coordinates. More...
 
int matrixHeight () const
 Returns number of rows of the tile matrix. More...
 
int matrixWidth () const
 Returns number of columns of the tile matrix. More...
 
double scale () const
 Returns scale denominator of the tile matrix. More...
 
QgsPointXY tileCenter (QgsTileXYZ id) const
 Returns center of the given tile in this matrix. More...
 
QgsRectangle tileExtent (QgsTileXYZ id) const
 Returns extent of the given tile in this matrix. More...
 
QgsTileRange tileRangeFromExtent (const QgsRectangle &mExtent)
 Returns tile range that fully covers the given extent. More...
 
int zoomLevel () const
 Returns zoom level of the tile matrix. More...
 

Static Public Member Functions

static QgsTileMatrix fromWebMercator (int mZoomLevel)
 Returns a tile matrix for the usual web mercator. More...
 

Detailed Description

Defines a matrix of tiles for a single zoom level: it is defined by its size (width *.

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).

Since
QGIS 3.14

Definition at line 102 of file qgstiles.h.

Member Function Documentation

◆ extent()

QgsRectangle QgsTileMatrix::extent ( ) const
inline

Returns extent of the tile matrix.

Definition at line 119 of file qgstiles.h.

◆ fromWebMercator()

QgsTileMatrix QgsTileMatrix::fromWebMercator ( int  mZoomLevel)
static

Returns a tile matrix for the usual web mercator.

Definition at line 20 of file qgstiles.cpp.

◆ mapToTileCoordinates()

QPointF QgsTileMatrix::mapToTileCoordinates ( const QgsPointXY mapPoint) const

Returns row/column coordinates (floating point number) from the given point in map coordinates.

Definition at line 78 of file qgstiles.cpp.

◆ matrixHeight()

int QgsTileMatrix::matrixHeight ( ) const
inline

Returns number of rows of the tile matrix.

Definition at line 116 of file qgstiles.h.

◆ matrixWidth()

int QgsTileMatrix::matrixWidth ( ) const
inline

Returns number of columns of the tile matrix.

Definition at line 113 of file qgstiles.h.

◆ scale()

double QgsTileMatrix::scale ( ) const
inline

Returns scale denominator of the tile matrix.

Definition at line 122 of file qgstiles.h.

◆ tileCenter()

QgsPointXY QgsTileMatrix::tileCenter ( QgsTileXYZ  id) const

Returns center of the given tile in this matrix.

Definition at line 47 of file qgstiles.cpp.

◆ tileExtent()

QgsRectangle QgsTileMatrix::tileExtent ( QgsTileXYZ  id) const

Returns extent of the given tile in this matrix.

Definition at line 38 of file qgstiles.cpp.

◆ tileRangeFromExtent()

QgsTileRange QgsTileMatrix::tileRangeFromExtent ( const QgsRectangle mExtent)

Returns tile range that fully covers the given extent.

Definition at line 54 of file qgstiles.cpp.

◆ zoomLevel()

int QgsTileMatrix::zoomLevel ( ) const
inline

Returns zoom level of the tile matrix.

Definition at line 110 of file qgstiles.h.


The documentation for this class was generated from the following files: