[gdal-dev] MapServer's image quality stinks serving up these NOAA NRCs

Gregor Mosheh gregor at hostgis.com
Wed Apr 23 13:45:27 EDT 2008

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!

Gregor Mosheh / Greg Allensworth, BS, A+
System Administrator
HostGIS cartographic development & hosting services

"Remember that no one cares if you can back up,
  only if you can restore." - AMANDA

More information about the gdal-dev mailing list