From 541e1b7ba2284bc5354816088bc3e867282df95f Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 13 Mar 2013 12:19:10 -0700 Subject: [PATCH] round floating point to int - refs #1672 --- plugins/input/gdal/gdal_featureset.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/input/gdal/gdal_featureset.cpp b/plugins/input/gdal/gdal_featureset.cpp index 780c6ee90..f5bbbcf28 100644 --- a/plugins/input/gdal/gdal_featureset.cpp +++ b/plugins/input/gdal/gdal_featureset.cpp @@ -451,7 +451,7 @@ feature_ptr gdal_featureset::get_feature(mapnik::query const& q) { MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Loading colour table..."; - unsigned nodata_value = static_cast(nodata); // FIXME: is it realy unsigned ? + unsigned nodata_value = static_cast(std::floor(nodata+.5)); // FIXME: is it realy unsigned ? if (hasNoData) { feature->put("NODATA",static_cast(nodata_value));