@@ -75,44 +75,13 @@ email : tim at linfiniti.com
75
75
// Static Methods and members first....
76
76
//
77
77
// ///////////////////////////////////////////////////////
78
- /* *
79
- Static member variable storing the subset of GDAL formats
80
- that we currently support.
81
-
82
- @note
83
-
84
- Some day this won't be necessary as there'll be a time when
85
- theoretically we'll support everything that GDAL can throw at us.
86
-
87
- These are GDAL driver description strings.
88
- */
89
- static const char *const mSupportedRasterFormats [] =
90
- {
91
- " AAIGrid" ,
92
- " AIG" ,
93
- " DTED" ,
94
- " ECW" ,
95
- " GRASS" ,
96
- " GTiff" ,
97
- " HFA" ,
98
- " JP2ECW" ,
99
- " JP2KAK" ,
100
- " JP2MrSID" ,
101
- " JPEG2000" ,
102
- " MrSID" ,
103
- " SDTS" ,
104
- " USGSDEM" ,
105
- " " // used to indicate end of list
106
- };
107
-
108
-
109
78
/* *
110
79
Builds the list of file filter strings to later be used by
111
80
QgisApp::addRasterLayer()
112
81
113
82
We query GDAL for a list of supported raster formats; we then build
114
83
a list of file filter strings from that list. We return a string
115
- that contains this list that is suitable for use in a a
84
+ that contains this list that is suitable for use in a
116
85
QFileDialog::getOpenFileNames() call.
117
86
118
87
*/
@@ -166,12 +135,6 @@ void QgsRasterLayer::buildSupportedRasterFileFilter(QString & theFileFiltersStri
166
135
167
136
myGdalDriverDescription = GDALGetDescription (myGdalDriver);
168
137
169
- if (!isSupportedRasterDriver (myGdalDriverDescription))
170
- {
171
- // not supported, therefore skip
172
- QgsDebugMsg (" skipping unsupported driver " + QString (GDALGetDescription (myGdalDriver)));
173
- continue ;
174
- }
175
138
// std::cerr << "got driver string " << myGdalDriver->GetDescription() << "\n";
176
139
177
140
myGdalDriverMetadata = GDALGetMetadata (myGdalDriver,NULL );
@@ -290,39 +253,6 @@ void QgsRasterLayer::registerGdalDrivers()
290
253
GDALAllRegister ();
291
254
}
292
255
293
- /* *
294
- returns true if the given raster driver name is one currently
295
- supported, otherwise it returns false
296
-
297
- @param theDriverName GDAL driver description string
298
- */
299
- bool QgsRasterLayer::isSupportedRasterDriver (QString const &theDriverName)
300
- {
301
- size_t i = 0 ;
302
-
303
- while (mSupportedRasterFormats [i][0 ]) // while not end of string list
304
- {
305
- // If we've got a case-insensitive match for a GDAL aware driver
306
- // description, then we've got a match. Why case-insensitive?
307
- // I'm just being paranoid in that I can envision a situation
308
- // whereby GDAL slightly changes driver description string case,
309
- // in which case we'd catch it here. Not that that would likely
310
- // happen, but if it does, we'll already compensate.
311
- // GS - At Qt 3.1.2, the case sensitive argument. So we change the
312
- // driverName to lower case before testing
313
- QString format = mSupportedRasterFormats [i];
314
- if (theDriverName.lower ().startsWith (format.lower ()))
315
- {
316
- return true ;
317
- }
318
-
319
- i++;
320
- }
321
-
322
- return false ;
323
- } // isSupportedRasterDriver
324
-
325
-
326
256
327
257
/* * This helper checks to see whether the filename appears to be a valid raster file name */
328
258
bool QgsRasterLayer::isValidRasterFileName (QString const & theFileNameQString)
@@ -377,7 +307,6 @@ QgsRasterLayer::QgsRasterLayer(
377
307
QString const & baseName,
378
308
bool loadDefaultStyleFlag)
379
309
: QgsMapLayer(RASTER, baseName, path),
380
- // XXX where is this? popMenu(0), //popMenu is the contextmenu obtained by right clicking on the legend
381
310
mRasterXDim( std::numeric_limits<int >::max() ),
382
311
mRasterYDim( std::numeric_limits<int >::max() ),
383
312
mDebugOverlayFlag(false ),
0 commit comments