@@ -64,7 +64,9 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast
64
64
EstimatedMinimumMaximum = 1 << 3 ,
65
65
BuildPyramids = 1 << 4 ,
66
66
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
68
70
};
69
71
70
72
// This is modified copy of GDALColorInterp
@@ -433,6 +435,24 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast
433
435
/* * Current time stamp of data source */
434
436
virtual QDateTime dataTimestamp () const { return QDateTime (); }
435
437
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
+
436
456
signals:
437
457
/* * Emit a signal to notify of the progress event.
438
458
* Emited theProgress is in percents (0.0-100.0) */
0 commit comments