@@ -99,23 +99,6 @@ class QgsRasterLayer : QgsMapLayer
99
99
ContrastEnhancementCumulativeCut
100
100
};
101
101
102
- /** \brief A list containing on ContrastEnhancement object per raster band in this raster layer */
103
- typedef QList<QgsContrastEnhancement> ContrastEnhancementList;
104
-
105
- /** \brief A list containing one RasterPyramid struct per raster band in this raster layer.
106
- * POTENTIAL pyramid layer. This works by dividing the height
107
- * and width of the raster by an incrementing number. As soon as the result
108
- * of the division is <=256 we stop allowing RasterPyramid structs
109
- * to be added to the list. Each time a RasterPyramid is created
110
- * we will check to see if a pyramid matching these dimensions already exists
111
- * in the raster layer, and if so mark the exists flag as true */
112
- /* typedef QList<QgsRasterPyramid> RasterPyramidList; */
113
-
114
- /** \brief A list containing one RasterBandStats struct per raster band in this raster layer.
115
- * Note that while every RasterBandStats element will have the name and number of its associated
116
- * band populated, any additional stats are calculated on a need to know basis.*/
117
- /* typedef QList<QgsRasterBandStats> RasterStatsList; */
118
-
119
102
//
120
103
// Static methods:
121
104
//
@@ -128,69 +111,30 @@ class QgsRasterLayer : QgsMapLayer
128
111
*/
129
112
static bool isValidRasterFileName( const QString & theFileNameQString, QString &retError );
130
113
static bool isValidRasterFileName( const QString & theFileNameQString );
131
- //static QStringList subLayers( GDALDatasetH dataset );
132
114
133
115
/** Return time stamp for given file name */
134
116
static QDateTime lastModified( const QString & name );
135
117
136
- // Keep this for now, it is used by Python interface!!!
137
- /** \brief ensures that GDAL drivers are registered, but only once */
138
- static void registerGdalDrivers();
139
-
140
118
//
141
119
// Non Static inline methods
142
120
//
143
-
144
- /** \brief Initialize default values */
145
- void init();
146
-
147
121
/** [ data provider interface ] Set the data provider */
148
122
void setDataProvider( const QString & provider );
149
123
150
- /** \brief Accessor for blue band name mapping */
151
- QString blueBandName() const;
152
-
153
- /** \brief Accessor for color shader algorithm */
154
- QgsRasterLayer::ColorShadingAlgorithm colorShadingAlgorithm() const;
155
-
156
- /** \brief Accessor for contrast enhancement algorithm */
157
- QgsContrastEnhancement::ContrastEnhancementAlgorithm contrastEnhancementAlgorithm();
158
-
159
- /** \brief Returns contrast enhancement algorithm as a string */
160
- QString contrastEnhancementAlgorithmAsString() const;
161
-
162
124
/** \brief Accessor for drawing style */
163
125
DrawingStyle drawingStyle();
164
126
165
- /** \brief Accessor for mHasPyramids (READ ONLY) */
166
- /* bool hasPyramids(); */
167
-
168
- /** \brief Accessor for mUserDefinedGrayMinimumMaximum */
169
- bool hasUserDefinedGrayMinimumMaximum() const;
170
-
171
- /** \brief Accessor for mUserDefinedRGBMinimumMaximum */
172
- bool hasUserDefinedRGBMinimumMaximum() const;
127
+ /** \brief Accessor that returns the width of the (unclipped) raster */
128
+ int width();
173
129
174
130
/** \brief Accessor that returns the height of the (unclipped) raster */
175
131
int height();
176
132
177
133
/** \brief Accessor for raster layer type (which is a read only property) */
178
134
LayerType rasterType();
179
135
180
-
181
136
/** \brief Mutator for drawing style */
182
137
void setDrawingStyle( const DrawingStyle & theDrawingStyle );
183
- /**Sets corresponding renderer for style*/
184
- void setRendererForDrawingStyle( const DrawingStyle & theDrawingStyle );
185
-
186
- /** \brief Mutator to alter the number of standard deviations that should be plotted */
187
- void setStandardDeviations( double theStandardDeviations );
188
-
189
- /** \brief Mutator for mUserDefinedGrayMinimumMaximum */
190
- void setUserDefinedGrayMinimumMaximum( bool theBool );
191
-
192
- /** \brief Mutator for mUserDefinedRGBMinimumMaximum */
193
- void setUserDefinedRGBMinimumMaximum( bool theBool );
194
138
195
139
/**Set raster renderer. Takes ownership of the renderer object*/
196
140
void setRenderer( QgsRasterRenderer* theRenderer /Transfer/ );
@@ -203,12 +147,6 @@ class QgsRasterLayer : QgsMapLayer
203
147
/** Get raster pipe */
204
148
QgsRasterPipe * pipe();
205
149
206
- /** \brief Accessor to find out how many standard deviations are being plotted */
207
- double standardDeviations() const;
208
-
209
- /** \brief Accessor that returns the width of the (unclipped) raster */
210
- int width();
211
-
212
150
//
213
151
// Non Static methods
214
152
//
@@ -218,33 +156,6 @@ class QgsRasterLayer : QgsMapLayer
218
156
/** \brief Get the name of a band given its number */
219
157
const QString bandName( int theBandNoInt );
220
158
221
- /** \brief Get the number of a band given its name. The name is the rewritten name set
222
- * up in the constructor, and will not necessarily be the same as the name retrieved directly from gdal!
223
- * If no matching band is found zero will be returned! */
224
- int bandNumber( const QString & theBandName ) const;
225
-
226
- /** \brief Accessor for ths raster layers pyramid list. A pyramid list defines the
227
- * POTENTIAL pyramids that can be in a raster. To know which of the pyramid layers
228
- * ACTUALLY exists you need to look at the existsFlag member in each struct stored in the
229
- * list.
230
- */
231
- // RasterPyramidList buildPyramidList();
232
-
233
- /** \brief Accessor for color shader algorithm */
234
- QString colorShadingAlgorithmAsString() const;
235
-
236
- /** \brief Compute the actual minimum maximum pixel values based on the current (last) display extent
237
- \note added in v1.6 */
238
- //void computeMinimumMaximumFromLastExtent( int theBand, double& theMin /Out/, double& theMax /Out/ );
239
-
240
- /** \brief Get a pointer to the contrast enhancement for the selected band */
241
- QgsContrastEnhancement* contrastEnhancement( unsigned int theBand );
242
-
243
- const QgsContrastEnhancement* constContrastEnhancement( unsigned int theBand ) const;
244
-
245
- /** \brief Get a pointer to the color table */
246
- QList<QgsColorRampShader::ColorRampItem> colorTable( int theBandNoInt );
247
-
248
159
/** Returns the data provider */
249
160
QgsRasterDataProvider* dataProvider();
250
161
@@ -266,33 +177,6 @@ class QgsRasterLayer : QgsMapLayer
266
177
QgsRasterViewPort * myRasterViewPort,
267
178
const QgsMapToPixel* theQgsMapToPixel = 0 );
268
179
269
- /** \brief Returns a string representation of drawing style
270
- *
271
- * Implemented mainly for serialisation / deserialisation of settings to xml.
272
- * NOTE: May be deprecated in the future!. DrawingStyle drawingStyle() instead.
273
- * */
274
- QString drawingStyleAsString() const;
275
-
276
- /** \brief Identify raster value(s) found on the point position */
277
- //bool identify( const QgsPoint & point, QMap<QString, QString>& results /Out/ );
278
-
279
- /** \brief Identify raster value(s) found on the point position */
280
- // bool identifyMap( const QgsPoint & point, QMap<int, QString>& results /Out/ );
281
- //%MethodCode
282
- // sipRes = sipCpp->identify( *a0, *a1 );
283
- //%End
284
-
285
- /** \brief Identify arbitrary details from the WMS server found on the point position */
286
- //QString identifyAsText( const QgsPoint & point );
287
-
288
- /** \brief Identify arbitrary details from the WMS server found on the point position
289
- * @note added in 1.5
290
- */
291
- //QString identifyAsHtml( const QgsPoint & point );
292
-
293
- /** \brief Currently returns always false */
294
- bool isEditable() const;
295
-
296
180
/** \brief [ data provider interface ] If an operation returns 0 (e.g. draw()), this function returns the text of the error associated with the failure */
297
181
QString lastError();
298
182
@@ -303,21 +187,9 @@ class QgsRasterLayer : QgsMapLayer
303
187
@note this method was added in version 1.8*/
304
188
QList< QPair< QString, QColor > > legendSymbologyItems() const;
305
189
306
- /** \brief Accessor for maximum value user for contrast enhancement */
307
- double maximumValue( unsigned int theBand );
308
-
309
- /** \brief Accessor for maximum value user for contrast enhancement */
310
- double maximumValue( QString theBand );
311
-
312
190
/** \brief Obtain GDAL Metadata for this layer */
313
191
QString metadata();
314
192
315
- /** \brief Accessor for minimum value user for contrast enhancement */
316
- double minimumValue( unsigned int theBand );
317
-
318
- /** \brief Accessor for minimum value user for contrast enhancement */
319
- double minimumValue( QString theBand );
320
-
321
193
/** \brief Get an 100x100 pixmap of the color palette. If the layer has no palette a white pixmap will be returned */
322
194
QPixmap paletteAsPixmap( int theBandNumber = 1 );
323
195
@@ -329,20 +201,9 @@ class QgsRasterLayer : QgsMapLayer
329
201
/** \brief Returns the number of raster units per each raster pixel. In a world file, this is normally the first row (without the sign) */
330
202
double rasterUnitsPerPixel();
331
203
332
- /** \brief Read color table from GDAL raster band */
333
- // bool readColorTable( int theBandNumber, QList<QgsColorRampShader::ColorRampItem>* theList );
334
-
335
- /** \brief Simple reset function that set the noDataValue back to the value stored in the first raster band */
336
- //void resetNoDataValue();
337
-
338
204
static QString contrastEnhancementLimitsAsString( QgsRasterLayer::ContrastEnhancementLimits theLimits );
339
205
static ContrastEnhancementLimits contrastEnhancementLimitsFromString( QString theLimits );
340
206
341
- /** \brief Mutator for contrast enhancement algorithm using min/max */
342
- // TODO: remove in 2.0, replaced by following
343
- // void setContrastEnhancementAlgorithm( QgsContrastEnhancement::ContrastEnhancementAlgorithm theAlgorithm,
344
- // bool theGenerateLookupTableFlag = true );
345
-
346
207
/** \brief Mutator for contrast enhancement algorithm
347
208
* @param theAlgorithm Contrast enhancement algorithm
348
209
* @param theLimits Limits
@@ -357,30 +218,12 @@ class QgsRasterLayer : QgsMapLayer
357
218
int theSampleSize = QgsRasterLayer::SAMPLE_SIZE,
358
219
bool theGenerateLookupTableFlag = true );
359
220
360
- /** \brief Mutator for contrast enhancement algorithm */
361
- void setContrastEnhancementAlgorithm( QString theAlgorithm, bool theGenerateLookupTableFlag = true );
362
-
363
- /** \brief Mutator for contrast enhancement function */
364
- void setContrastEnhancementFunction( QgsContrastEnhancementFunction* theFunction );
365
-
366
221
/** \brief Set default contrast enhancement */
367
222
void setDefaultContrastEnhancement();
368
223
369
224
/** \brief Overloaded version of the above function for convenience when restoring from xml */
370
225
void setDrawingStyle( const QString & theDrawingStyleQString );
371
226
372
- /** \brief Mutator for setting the maximum value for contrast enhancement */
373
- void setMaximumValue( unsigned int theBand, double theValue, bool theGenerateLookupTableFlag = true );
374
-
375
- /** \brief Sets the minimum and maximum values for the band(s) currently
376
- * being displayed using the only pixel values from the last/current extent
377
- * */
378
- void setMinimumMaximumUsingLastExtent();
379
-
380
- /** \brief Sets the minimum and maximum values for the band(s) currently
381
- * being displayed using the only pixel values from the dataset min/max */
382
- void setMinimumMaximumUsingDataset();
383
-
384
227
/** \brief [ data provider interface ] A wrapper function to emit a progress update signal */
385
228
void showProgress( int theValue );
386
229
@@ -413,11 +256,6 @@ class QgsRasterLayer : QgsMapLayer
413
256
virtual QDateTime timestamp() const;
414
257
415
258
public slots:
416
- /** \brief Create GDAL pyramid overviews */
417
- // QString buildPyramids( const RasterPyramidList &,
418
- // const QString & theResamplingMethod = "NEAREST",
419
- // bool theTryInternalFlag = false );
420
-
421
259
void showStatusMessage( const QString & theMessage );
422
260
423
261
/** \brief Propagate progress updates from GDAL up to the parent app */
0 commit comments