[gdal-dev] MapServer's image quality stinks serving up these
schut at sarvision.nl
Thu Apr 24 02:54:59 EDT 2008
Glad it worked!
Those kap files are single-band colortable images, right? I'd use
nearest neighbour interpolation than, for gdalwarp, instead of bilinear.
Simple removing the '-rb' switch from your gdalwarp command should do
the trick, as nn is the default. Imho it usually makes not much sense to
interpolate colortable indices, except when this colortable is some
representation of a more or less continuous gradient.
Gregor Mosheh wrote:
> Vincent Schut wrote:
>>>> Color depth: gdalwarp on the KAPs generates 8-bit palleted TIFFs.
>>>> That may not be the best for quality.
>>>> ^^This point might be your main issue.
>> I think you can use gdal's pct2rgb.py utility for that.
> Sounds good; I've given that a try.
> My procedure from NOAA NRCs to GeoTIFFs is as follows:
> gdalwarp -tps -rb -t_srs EPSG:4326 $kap $tif0
> pct2rgb.py $tif0 $tif1
> gdal_translate -quiet -co TILED=YES -srcwin $x $y $w $h $tif1 $tif2
> gdaladdo -r average $tif2 2 4 8 16 32
> I think it looks pretty good. It's not as good as their hand-groomed
> PNGs, but it's a significant improvement!
More information about the gdal-dev