QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
25 mBaseTileSide = std::max( fullExtent.
width(), fullExtent.
height() );
30 const double tileSide = mBaseTileSide / pow( 2, z );
31 const double mx = mMapOrigin.
x() + x * tileSide;
32 const double my = mMapOrigin.
y() + y * tileSide;
38 const double tileSide = mBaseTileSide / pow( 2, z );
39 x = ( pt.
x() - mMapOrigin.
x() ) / tileSide;
40 y = ( pt.
y() - mMapOrigin.
y() ) / tileSide;
61 if (
tileToExtent( x * 2, y * 2, z + 1 ).contains( extent ) )
66 else if (
tileToExtent( x * 2 + 1, y * 2, z + 1 ).contains( extent ) )
71 else if (
tileToExtent( x * 2, y * 2 + 1, z + 1 ).contains( extent ) )
76 else if (
tileToExtent( x * 2 + 1, y * 2 + 1, z + 1 ).contains( extent ) )
QgsTilingScheme()=default
Creates invalid tiling scheme.
double height() const SIP_HOLDGIL
Returns the height of the rectangle.
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)
double yMinimum() const SIP_HOLDGIL
Returns the y minimum value (bottom side of rectangle).
A rectangle specified with double values.
void mapToTile(const QgsPointXY &pt, int z, float &x, float &y) const
Returns tile coordinates for given map coordinates and Z level.
double xMinimum() const SIP_HOLDGIL
Returns the x minimum value (left side of rectangle).
QgsRectangle tileToExtent(int x, int y, int z) const
Returns map coordinates of the extent of a tile.
This class represents a coordinate reference system (CRS).
A class to represent a 2D point.
double width() const SIP_HOLDGIL
Returns the width of the rectangle.