mirror of
https://git.osgeo.org/gitea/postgis/postgis
synced 2024-10-23 16:42:35 +00:00
basic support for GDAL 2.0
git-svn-id: http://svn.osgeo.org/postgis/trunk@12584 b70326c6-7e19-0410-871a-916f4a2858ee
This commit is contained in:
parent
e29722f668
commit
6042e16a83
|
@ -910,7 +910,12 @@ rt_raster_gdal_polygonize(
|
|||
/*****************************
|
||||
* Register ogr mem driver
|
||||
*****************************/
|
||||
#ifdef GDAL_DCAP_RASTER
|
||||
/* in GDAL 2.0, OGRRegisterAll() is an alias to GDALAllRegister() */
|
||||
rt_util_gdal_register_all(0);
|
||||
#else
|
||||
OGRRegisterAll();
|
||||
#endif
|
||||
|
||||
RASTER_DEBUG(3, "creating OGR MEM vector");
|
||||
|
||||
|
|
|
@ -1728,6 +1728,14 @@ rt_raster_gdal_drivers(uint32_t *drv_count, uint8_t cancc) {
|
|||
for (i = 0, j = 0; i < count; i++) {
|
||||
drv = GDALGetDriver(i);
|
||||
|
||||
#ifdef GDAL_DCAP_RASTER
|
||||
/* Starting with GDAL 2.0, vector drivers can also be returned */
|
||||
/* Only keep raster drivers */
|
||||
state = GDALGetMetadataItem(drv, GDAL_DCAP_RASTER, NULL);
|
||||
if (state == NULL || !EQUAL(state, "YES"))
|
||||
continue;
|
||||
#endif
|
||||
|
||||
if (cancc) {
|
||||
/* CreateCopy support */
|
||||
state = GDALGetMetadataItem(drv, GDAL_DCAP_CREATECOPY, NULL);
|
||||
|
|
Loading…
Reference in a new issue