@@ -64,7 +64,9 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast
6464 EstimatedMinimumMaximum = 1 << 3 ,
6565 BuildPyramids = 1 << 4 ,
6666 Histogram = 1 << 5 ,
67- Size = 1 << 6 // has fixed source type
67+ Size = 1 << 6 , // has fixed source type
68+ Create = 1 << 7 , // create new datasets
69+ Remove = 1 << 8 // delete datasets
6870 };
6971
7072 // This is modified copy of GDALColorInterp
@@ -433,6 +435,24 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast
433435 /* * Current time stamp of data source */
434436 virtual QDateTime dataTimestamp () const { return QDateTime (); }
435437
438+ /* * Creates a new dataset with mDataSourceURI
439+ @return true in case of success*/
440+ virtual bool create ( const QString& format, int nBands,
441+ QgsRasterDataProvider::DataType type, int width, int height, double * geoTransform,
442+ const QgsCoordinateReferenceSystem& crs /* e.v. color table*/ )
443+ {
444+ Q_UNUSED ( format );
445+ Q_UNUSED ( nBands );
446+ Q_UNUSED ( type );
447+ Q_UNUSED ( width );
448+ Q_UNUSED ( height );
449+ Q_UNUSED ( geoTransform );
450+ Q_UNUSED ( crs ); return false ;
451+ }
452+
453+ /* * Remove dataset*/
454+ virtual bool remove () { return false ; }
455+
436456 signals:
437457 /* * Emit a signal to notify of the progress event.
438458 * Emited theProgress is in percents (0.0-100.0) */
0 commit comments