23 , mFullExtent( fullExtent )
31 const double tileSide = mBaseTileSide / pow( 2, z );
32 const double mx = mMapOrigin.
x() + x * tileSide;
33 const double my = mMapOrigin.
y() + y * tileSide;
39 const double tileSide = mBaseTileSide / pow( 2, z );
40 x = ( pt.
x() - mMapOrigin.
x() ) / tileSide;
41 y = ( pt.
y() - mMapOrigin.
y() ) / tileSide;
62 if (
tileToExtent( x * 2, y * 2, z + 1 ).contains( extent ) )
67 else if (
tileToExtent( x * 2 + 1, y * 2, z + 1 ).contains( extent ) )
72 else if (
tileToExtent( x * 2, y * 2 + 1, z + 1 ).contains( extent ) )
77 else if (
tileToExtent( x * 2 + 1, y * 2 + 1, z + 1 ).contains( extent ) )
This class represents a coordinate reference system (CRS).
A class to represent a 2D point.
A rectangle specified with double values.
double xMinimum() const
Returns the x minimum value (left side of rectangle).
double yMinimum() const
Returns the y minimum value (bottom side of rectangle).
double width() const
Returns the width of the rectangle.
double height() const
Returns the height of the rectangle.
void mapToTile(const QgsPointXY &pt, int z, float &x, float &y) const
Returns tile coordinates for given map coordinates and Z level.
QgsRectangle fullExtent() const
Returns the full extent used in the constructor, which might not be square.
void extentToTile(const QgsRectangle &extent, int &x, int &y, int &z) const
Returns coordinates of a tile that most tightly fits the whole extent.
QgsPointXY tileToMap(int x, int y, int z) const
Returns map coordinates at tile coordinates (for lower-left corner of the tile)
QgsTilingScheme()=default
Creates invalid tiling scheme.
QgsRectangle tileToExtent(int x, int y, int z) const
Returns map coordinates of the extent of a tile.
const QgsCoordinateReferenceSystem & crs