QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
|
3 More...
#include <qgsterraindownloader.h>
Classes | |
struct | DataSource |
Definition of data source for terrain tiles (assuming "terrarium" data encoding with usual XYZ tiling scheme) More... | |
Public Member Functions | |
QgsTerrainDownloader (const QgsCoordinateTransformContext &transformContext) | |
Constructs a QgsTerrainDownloader object. More... | |
~QgsTerrainDownloader () | |
DataSource | dataSource () const |
Returns currently configured data source. More... | |
QByteArray | getHeightMap (const QgsRectangle &extentOrig, int res, const QgsCoordinateReferenceSystem &destCrs, const QgsCoordinateTransformContext &context=QgsCoordinateTransformContext(), QString tmpFilenameImg=QString(), QString tmpFilenameTif=QString()) |
For given extent and resolution (number of pixels for width/height) in specified CRS, download necessary tile images (if not cached already) and produce height map out of them (byte array of res*res float values) More... | |
void | setDataSource (const DataSource &ds) |
Configures data source to be used for download of terrain tiles. More... | |
Static Public Member Functions | |
static DataSource | defaultDataSource () |
Returns the data source used by default. More... | |
3
Takes care of downloading terrain data from a publicly available data source.
Currently using terrain tiles in Terrarium format hosted on AWS. More info:
Definition at line 48 of file qgsterraindownloader.h.
QgsTerrainDownloader::QgsTerrainDownloader | ( | const QgsCoordinateTransformContext & | transformContext | ) |
Constructs a QgsTerrainDownloader object.
transformContext | coordinate transform context |
Definition at line 25 of file qgsterraindownloader.cpp.
|
default |
|
inline |
Returns currently configured data source.
Definition at line 76 of file qgsterraindownloader.h.
|
static |
Returns the data source used by default.
Definition at line 43 of file qgsterraindownloader.cpp.
QByteArray QgsTerrainDownloader::getHeightMap | ( | const QgsRectangle & | extentOrig, |
int | res, | ||
const QgsCoordinateReferenceSystem & | destCrs, | ||
const QgsCoordinateTransformContext & | context = QgsCoordinateTransformContext() , |
||
QString | tmpFilenameImg = QString() , |
||
QString | tmpFilenameTif = QString() |
||
) |
For given extent and resolution (number of pixels for width/height) in specified CRS, download necessary tile images (if not cached already) and produce height map out of them (byte array of res*res float values)
Definition at line 121 of file qgsterraindownloader.cpp.
void QgsTerrainDownloader::setDataSource | ( | const DataSource & | ds | ) |
Configures data source to be used for download of terrain tiles.
Definition at line 58 of file qgsterraindownloader.cpp.