QGIS API Documentation  3.10.0-A Coruña (6c816b4204)
Static Public Member Functions | List of all members
QgsGdalUtils Class Reference

Utilities for working with GDAL. More...

#include <qgsgdalutils.h>

Static Public Member Functions

static gdal::dataset_unique_ptr createSingleBandMemoryDataset (GDALDataType dataType, QgsRectangle extent, int width, int height, const QgsCoordinateReferenceSystem &crs)
 Creates a new single band memory dataset with given parameters. More...
 
static gdal::dataset_unique_ptr createSingleBandTiffDataset (QString filename, GDALDataType dataType, QgsRectangle extent, int width, int height, const QgsCoordinateReferenceSystem &crs)
 Creates a new single band TIFF dataset with given parameters. More...
 
static QString helpCreationOptionsFormat (QString format)
 Gets creation options metadata for a given format. More...
 
static char ** papszFromStringList (const QStringList &list)
 Helper function. More...
 
static void resampleSingleBandRaster (GDALDatasetH hSrcDS, GDALDatasetH hDstDS, GDALResampleAlg resampleAlg)
 Resamples a single band raster to the destination dataset with different resolution (and possibly with different CRS). More...
 
static bool supportsRasterCreate (GDALDriverH driver)
 Reads whether a driver supports GDALCreate() for raster purposes. More...
 
static QString validateCreationOptionsFormat (const QStringList &createOptions, QString format)
 Validates creation options for a given format, regardless of layer. More...
 

Detailed Description

Utilities for working with GDAL.

Note
not available in Python bindings
Since
QGIS 3.4

Definition at line 34 of file qgsgdalutils.h.

Member Function Documentation

◆ createSingleBandMemoryDataset()

gdal::dataset_unique_ptr QgsGdalUtils::createSingleBandMemoryDataset ( GDALDataType  dataType,
QgsRectangle  extent,
int  width,
int  height,
const QgsCoordinateReferenceSystem crs 
)
static

Creates a new single band memory dataset with given parameters.

Since
QGIS 3.8

Definition at line 37 of file qgsgdalutils.cpp.

◆ createSingleBandTiffDataset()

gdal::dataset_unique_ptr QgsGdalUtils::createSingleBandTiffDataset ( QString  filename,
GDALDataType  dataType,
QgsRectangle  extent,
int  width,
int  height,
const QgsCoordinateReferenceSystem crs 
)
static

Creates a new single band TIFF dataset with given parameters.

Since
QGIS 3.8

Definition at line 62 of file qgsgdalutils.cpp.

◆ helpCreationOptionsFormat()

QString QgsGdalUtils::helpCreationOptionsFormat ( QString  format)
static

Gets creation options metadata for a given format.

Since
QGIS 3.10

Definition at line 123 of file qgsgdalutils.cpp.

◆ papszFromStringList()

char ** QgsGdalUtils::papszFromStringList ( const QStringList &  list)
static

Helper function.

Since
QGIS 3.10

Definition at line 152 of file qgsgdalutils.cpp.

◆ resampleSingleBandRaster()

void QgsGdalUtils::resampleSingleBandRaster ( GDALDatasetH  hSrcDS,
GDALDatasetH  hDstDS,
GDALResampleAlg  resampleAlg 
)
static

Resamples a single band raster to the destination dataset with different resolution (and possibly with different CRS).

Ideally the source dataset should cover the whole area or the destination dataset.

Since
QGIS 3.8

Definition at line 93 of file qgsgdalutils.cpp.

◆ supportsRasterCreate()

bool QgsGdalUtils::supportsRasterCreate ( GDALDriverH  driver)
static

Reads whether a driver supports GDALCreate() for raster purposes.

Parameters
driverGDAL driver
Returns
true if a driver supports GDALCreate() for raster purposes.

Definition at line 24 of file qgsgdalutils.cpp.

◆ validateCreationOptionsFormat()

QString QgsGdalUtils::validateCreationOptionsFormat ( const QStringList &  createOptions,
QString  format 
)
static

Validates creation options for a given format, regardless of layer.

Since
QGIS 3.10

Definition at line 163 of file qgsgdalutils.cpp.


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