round floating point to int - refs #1672

This commit is contained in:
Dane Springmeyer 2013-03-13 12:19:10 -07:00
parent 9c7b155b1d
commit 541e1b7ba2

View file

@ -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<unsigned>(nodata); // FIXME: is it realy unsigned ?
unsigned nodata_value = static_cast<unsigned>(std::floor(nodata+.5)); // FIXME: is it realy unsigned ?
if (hasNoData)
{
feature->put("NODATA",static_cast<mapnik::value_integer>(nodata_value));