QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
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.
 
 ~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.
 

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 25 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 43 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 121 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 58 of file qgsterraindownloader.cpp.


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