diff --git a/plugins/input/gdal/gdal_featureset.cpp b/plugins/input/gdal/gdal_featureset.cpp index 8bbae041b..d69f6670a 100644 --- a/plugins/input/gdal/gdal_featureset.cpp +++ b/plugins/input/gdal/gdal_featureset.cpp @@ -397,6 +397,25 @@ feature_ptr gdal_featureset::get_feature(mapnik::query const& q) feature->set_raster(raster); break; } + case GDT_Int32: + { + mapnik::image_gray32s image(im_width, im_height); + image.set(std::numeric_limits::max()); + raster_nodata = band->GetNoDataValue(&raster_has_nodata); + raster_io_error = band->RasterIO(GF_Read, x_off, y_off, width, height, + image.data(), image.width(), image.height(), + GDT_Int32, 0, 0); + if (raster_io_error == CE_Failure) + { + throw datasource_exception(CPLGetLastErrorMsg()); + } + mapnik::raster_ptr raster = std::make_shared(feature_raster_extent, intersect, image, filter_factor); + // set nodata value to be used in raster colorizer + if (nodata_value_) raster->set_nodata(*nodata_value_); + else raster->set_nodata(raster_nodata); + feature->set_raster(raster); + break; + } default: case GDT_Int16: { diff --git a/test/data b/test/data index e83b7f7c6..eaf64519e 160000 --- a/test/data +++ b/test/data @@ -1 +1 @@ -Subproject commit e83b7f7c6d2d646a638bba404a0d637609722a09 +Subproject commit eaf64519e4aecc0b1f689aa96d4d741b22a75a87 diff --git a/test/data-visual b/test/data-visual index 54a2c2595..bacfd251d 160000 --- a/test/data-visual +++ b/test/data-visual @@ -1 +1 @@ -Subproject commit 54a2c2595c81e838810e413d42a57f09fcf41331 +Subproject commit bacfd251da550fa82ea56f6710dc6f85431480c2