QGIS API Documentation  3.10.0-A Coruña (6c816b4204)
qgsgdalutils.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsgdalutils.h
3  --------------
4  begin : September 2018
5  copyright : (C) 2018 Even Rouault
6  email : even.rouault at spatialys.com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #ifndef QGSGDALUTILS_H
17 #define QGSGDALUTILS_H
18 
19 #define SIP_NO_FILE
20 
21 #include "qgis_core.h"
22 #include <gdal.h>
23 
24 #include "qgsogrutils.h"
25 
34 class CORE_EXPORT QgsGdalUtils
35 {
36  public:
37 
43  static bool supportsRasterCreate( GDALDriverH driver );
44 
49  static gdal::dataset_unique_ptr createSingleBandMemoryDataset( GDALDataType dataType, QgsRectangle extent, int width, int height, const QgsCoordinateReferenceSystem &crs );
50 
55  static gdal::dataset_unique_ptr createSingleBandTiffDataset( QString filename, GDALDataType dataType, QgsRectangle extent, int width, int height, const QgsCoordinateReferenceSystem &crs );
56 
57 
63  static void resampleSingleBandRaster( GDALDatasetH hSrcDS, GDALDatasetH hDstDS, GDALResampleAlg resampleAlg );
64 
69  static QString helpCreationOptionsFormat( QString format );
70 
75  static QString validateCreationOptionsFormat( const QStringList &createOptions, QString format );
76 
81  static char **papszFromStringList( const QStringList &list );
82 };
83 
84 #endif // QGSGDALUTILS_H
A rectangle specified with double values.
Definition: qgsrectangle.h:41
const QgsCoordinateReferenceSystem & crs
void * GDALDatasetH
This class represents a coordinate reference system (CRS).
std::unique_ptr< std::remove_pointer< GDALDatasetH >::type, GDALDatasetCloser > dataset_unique_ptr
Scoped GDAL dataset.
Definition: qgsogrutils.h:134
Utilities for working with GDAL.
Definition: qgsgdalutils.h:34