QGIS API Documentation
3.8.0-Zanzibar (11aff65)
|
3 Takes care of downloading terrain data from a publicly available data source. 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 43 of file qgsterraindownloader.h.
QgsTerrainDownloader::QgsTerrainDownloader | ( | const QgsCoordinateTransformContext & | transformContext | ) |
Constructs a QgsTerrainDownloader object.
transformContext | coordinate transform context |
Definition at line 24 of file qgsterraindownloader.cpp.
|
default |
|
inline |
Returns currently configured data source.
Definition at line 71 of file qgsterraindownloader.h.
|
static |
Returns the data source used by default.
Definition at line 41 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 119 of file qgsterraindownloader.cpp.
void QgsTerrainDownloader::setDataSource | ( | const DataSource & | ds | ) |
Configures data source to be used for download of terrain tiles.
Definition at line 56 of file qgsterraindownloader.cpp.