QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
24 mBaseTileSide = std::max( fullExtent.
width(), fullExtent.
height() );
29 double tileSide = mBaseTileSide / pow( 2, z );
30 double mx = mMapOrigin.
x() + x * tileSide;
31 double my = mMapOrigin.
y() + y * tileSide;
37 double tileSide = mBaseTileSide / pow( 2, z );
38 x = ( pt.
x() - mMapOrigin.
x() ) / tileSide;
39 y = ( pt.
y() - mMapOrigin.
y() ) / tileSide;
55 if (
tileToExtent( x * 2, y * 2, z + 1 ).contains( extent ) )
60 else if (
tileToExtent( x * 2 + 1, y * 2, z + 1 ).contains( extent ) )
65 else if (
tileToExtent( x * 2, y * 2 + 1, z + 1 ).contains( extent ) )
70 else if (
tileToExtent( x * 2 + 1, y * 2 + 1, z + 1 ).contains( extent ) )
QgsTilingScheme()=default
Creates invalid 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.
const QgsCoordinateReferenceSystem & crs
QgsPointXY tileToMap(int x, int y, int z) const
Returns map coordinates at tile coordinates (for lower-left corner of the tile)
void mapToTile(const QgsPointXY &pt, int z, float &x, float &y) const
Returns tile coordinates for given map coordinates and Z level.
QgsRectangle tileToExtent(int x, int y, int z) const
Returns map coordinates of the extent of a tile.
double height() const
Returns the height of the rectangle.
double yMinimum() const
Returns the y minimum value (bottom side of rectangle).
double width() const
Returns the width of the rectangle.
double xMinimum() const
Returns the x minimum value (left side of rectangle).