QGIS API Documentation  3.18.1-Zürich (202f1bf7e5)
Classes | Public Member Functions | Static Public Member Functions | List of all members
QgsTerrainDownloader Class Reference

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...
 

Detailed Description

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:

Note
Not available in Python bindings
Since
QGIS 3.8

Definition at line 48 of file qgsterraindownloader.h.

Constructor & Destructor Documentation

◆ QgsTerrainDownloader()

QgsTerrainDownloader::QgsTerrainDownloader ( const QgsCoordinateTransformContext transformContext)

Constructs a QgsTerrainDownloader object.

Parameters
transformContextcoordinate transform context

Definition at line 24 of file qgsterraindownloader.cpp.

◆ ~QgsTerrainDownloader()

QgsTerrainDownloader::~QgsTerrainDownloader ( )
default

Member Function Documentation

◆ dataSource()

DataSource QgsTerrainDownloader::dataSource ( ) const
inline

Returns currently configured data source.

Definition at line 76 of file qgsterraindownloader.h.

◆ defaultDataSource()

QgsTerrainDownloader::DataSource QgsTerrainDownloader::defaultDataSource ( )
static

Returns the data source used by default.

Definition at line 41 of file qgsterraindownloader.cpp.

◆ getHeightMap()

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.

◆ setDataSource()

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.


The documentation for this class was generated from the following files: