[GRASS-SVN] r60482 - grass/trunk/raster/r.out.gdal
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun May 25 14:24:19 PDT 2014
Author: martinl
Date: 2014-05-25 14:24:19 -0700 (Sun, 25 May 2014)
New Revision: 60482
Modified:
grass/trunk/raster/r.out.gdal/main.c
Log:
r.out.gdal: Starting with GDAL 2.0, vector drivers can also be returned (fix -f flag)
Modified: grass/trunk/raster/r.out.gdal/main.c
===================================================================
--- grass/trunk/raster/r.out.gdal/main.c 2014-05-25 21:22:26 UTC (rev 60481)
+++ grass/trunk/raster/r.out.gdal/main.c 2014-05-25 21:24:19 UTC (rev 60482)
@@ -54,6 +54,13 @@
GDALDriverH hDriver = GDALGetDriver(iDr);
const char *pszRWFlag;
+#ifdef GDAL_DCAP_RASTER
+ /* Starting with GDAL 2.0, vector drivers can also be returned */
+ /* Only keep raster drivers */
+ if (!GDALGetMetadataItem(hDriver, GDAL_DCAP_RASTER, NULL))
+ continue;
+#endif
+
if (GDALGetMetadataItem(hDriver, GDAL_DCAP_CREATE, NULL))
pszRWFlag = "rw+";
else if (GDALGetMetadataItem(hDriver, GDAL_DCAP_CREATECOPY, NULL))
More information about the grass-commit
mailing list