QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
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. | |
~QgsTerrainDownloader () | |
DataSource | dataSource () const |
Returns currently configured data source. | |
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) | |
void | setDataSource (const DataSource &ds) |
Configures data source to be used for download of terrain tiles. | |
Static Public Member Functions | |
static DataSource | defaultDataSource () |
Returns the data source used by default. | |
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 74 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 122 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.