@@ -75,44 +75,13 @@ email : tim at linfiniti.com
7575// Static Methods and members first....
7676//
7777// ///////////////////////////////////////////////////////
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-
10978/* *
11079 Builds the list of file filter strings to later be used by
11180 QgisApp::addRasterLayer()
11281
11382 We query GDAL for a list of supported raster formats; we then build
11483 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
11685 QFileDialog::getOpenFileNames() call.
11786
11887*/
@@ -166,12 +135,6 @@ void QgsRasterLayer::buildSupportedRasterFileFilter(QString & theFileFiltersStri
166135
167136 myGdalDriverDescription = GDALGetDescription (myGdalDriver);
168137
169- if (!isSupportedRasterDriver (myGdalDriverDescription))
170- {
171- // not supported, therefore skip
172- QgsDebugMsg (" skipping unsupported driver " + QString (GDALGetDescription (myGdalDriver)));
173- continue ;
174- }
175138 // std::cerr << "got driver string " << myGdalDriver->GetDescription() << "\n";
176139
177140 myGdalDriverMetadata = GDALGetMetadata (myGdalDriver,NULL );
@@ -290,39 +253,6 @@ void QgsRasterLayer::registerGdalDrivers()
290253 GDALAllRegister ();
291254}
292255
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-
326256
327257/* * This helper checks to see whether the filename appears to be a valid raster file name */
328258bool QgsRasterLayer::isValidRasterFileName (QString const & theFileNameQString)
@@ -377,7 +307,6 @@ QgsRasterLayer::QgsRasterLayer(
377307 QString const & baseName,
378308 bool loadDefaultStyleFlag)
379309 : QgsMapLayer(RASTER, baseName, path),
380- // XXX where is this? popMenu(0), //popMenu is the contextmenu obtained by right clicking on the legend
381310 mRasterXDim( std::numeric_limits<int >::max() ),
382311 mRasterYDim( std::numeric_limits<int >::max() ),
383312 mDebugOverlayFlag(false ),
0 commit comments