tilemill icon indicating copy to clipboard operation
tilemill copied to clipboard

Raster-Scaling Mode Problems

Open georgbachmann opened this issue 10 years ago • 2 comments

I have a GeoTiff File with discrete Color Information. So value 1 f.e. means blue, value 2 red, and so on... So I use the raster-colorizer in Tilemill and everything is fine using a scaling of near. As soon as I try another scaling method like bicubic or gaussian.

I followed the tutorial from https://www.mapbox.com/tilemill/docs/guides/discrete-raster-data/ but it's not working.

raster-opacity:1;
raster-scaling:near;
raster-colorizer-default-mode:exact;
raster-colorizer-default-color: transparent;
raster-colorizer-epsilon:0.41;

With near scaling

bildschirmfoto 2015-06-18 um 10 07 10

bicubic scaling: bildschirmfoto 2015-06-18 um 10 06 44

Any ideas? Tilemill is a clean install from the current github.

georgbachmann avatar Jun 18 '15 08:06 georgbachmann

You will need to convert your TIF's color index to RGB colors in order to use them with scaling modes other than near. Eg with gdal_translate: gdal_translate -expand rgb original.tif rgb.tif

ajashton avatar Jul 06 '15 20:07 ajashton

Good workaround @ajashton - although this may be doable in the future: https://github.com/mapnik/mapnik/issues/2902

springmeyer avatar Jul 06 '15 20:07 springmeyer