QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsTilingScheme Class Reference

3 More...

#include <qgstilingscheme.h>

Public Member Functions

 QgsTilingScheme ()=default
 Creates invalid tiling scheme.
 
 QgsTilingScheme (const QgsRectangle &fullExtent, const QgsCoordinateReferenceSystem &crs)
 Creates tiling scheme where level 0 tile is centered at the full extent and the full extent completely fits into the level 0 tile.
 
QgsCoordinateReferenceSystem crs () const
 Returns CRS of the tiling scheme.
 
void extentToTile (const QgsRectangle &extent, int &x, int &y, int &z) const
 Returns coordinates of a tile that most tightly fits the whole extent.
 
QgsRectangle fullExtent () const
 Returns the full extent used in the constructor, which might not be square.
 
void mapToTile (const QgsPointXY &pt, int z, float &x, float &y) const
 Returns tile coordinates for given map coordinates and Z level.
 
QgsRectangle tileToExtent (const QgsChunkNodeId &nodeId) const
 Returns map coordinates of the extent of a tile.
 
QgsRectangle tileToExtent (int x, int y, int z) const
 Returns map coordinates of the extent of a tile.
 
QgsPointXY tileToMap (int x, int y, int z) const
 Returns map coordinates at tile coordinates (for lower-left corner of the tile)
 

Detailed Description

3

The class encapsulates tiling scheme (just like with WMTS / TMS / XYZ layers).

The origin (tile [0,0]) is in bottom-left corner.

Note
Not available in Python bindings

Definition at line 36 of file qgstilingscheme.h.

Constructor & Destructor Documentation

◆ QgsTilingScheme() [1/2]

QgsTilingScheme::QgsTilingScheme ( )
default

Creates invalid tiling scheme.

◆ QgsTilingScheme() [2/2]

QgsTilingScheme::QgsTilingScheme ( const QgsRectangle fullExtent,
const QgsCoordinateReferenceSystem crs 
)

Creates tiling scheme where level 0 tile is centered at the full extent and the full extent completely fits into the level 0 tile.

Definition at line 21 of file qgstilingscheme.cpp.

Member Function Documentation

◆ crs()

QgsCoordinateReferenceSystem QgsTilingScheme::crs ( ) const
inline

Returns CRS of the tiling scheme.

Definition at line 60 of file qgstilingscheme.h.

◆ extentToTile()

void QgsTilingScheme::extentToTile ( const QgsRectangle extent,
int &  x,
int &  y,
int &  z 
) const

Returns coordinates of a tile that most tightly fits the whole extent.

Definition at line 56 of file qgstilingscheme.cpp.

◆ fullExtent()

QgsRectangle QgsTilingScheme::fullExtent ( ) const
inline

Returns the full extent used in the constructor, which might not be square.

Level 0 tile is centered at the full extent and the full extent completely fits into the level 0 tile

Since
QGIS 3.30

Definition at line 67 of file qgstilingscheme.h.

◆ mapToTile()

void QgsTilingScheme::mapToTile ( const QgsPointXY pt,
int  z,
float &  x,
float &  y 
) const

Returns tile coordinates for given map coordinates and Z level.

Definition at line 37 of file qgstilingscheme.cpp.

◆ tileToExtent() [1/2]

QgsRectangle QgsTilingScheme::tileToExtent ( const QgsChunkNodeId &  nodeId) const

Returns map coordinates of the extent of a tile.

Definition at line 51 of file qgstilingscheme.cpp.

◆ tileToExtent() [2/2]

QgsRectangle QgsTilingScheme::tileToExtent ( int  x,
int  y,
int  z 
) const

Returns map coordinates of the extent of a tile.

Definition at line 44 of file qgstilingscheme.cpp.

◆ tileToMap()

QgsPointXY QgsTilingScheme::tileToMap ( int  x,
int  y,
int  z 
) const

Returns map coordinates at tile coordinates (for lower-left corner of the tile)

Definition at line 29 of file qgstilingscheme.cpp.


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