Merge pull request #3859 from mapycz/fix-dgal-default-nodata

Respect raster_has_nodata
This commit is contained in:
Artem Pavlenko 2018-02-14 16:51:57 +01:00 committed by GitHub
commit b8e6a0accc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -586,8 +586,14 @@ feature_ptr gdal_featureset::get_feature(mapnik::query const& q)
}
mapnik::raster_ptr raster = std::make_shared<mapnik::raster>(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);
if (nodata_value_)
{
raster->set_nodata(*nodata_value_);
}
else if (raster_has_nodata)
{
raster->set_nodata(raster_nodata);
}
feature->set_raster(raster);
}
// report actual/original source nodata in feature attributes