[gdal-dev] Anti-Aliasing

Christopher Barker Chris.Barker at noaa.gov
Mon Oct 5 12:49:01 EDT 2009


Chris Emberson wrote:
> The rasters do have colour tables applied, that are expressed using RGB 
> values, using gdaldem:
> 75%    107    0    0
> 50%    196    109    27
> 25%    247    195    72
> 0%    252    233    109
> nv    0    0    0 0
> 
> They are not derived from vector data however. I am unsure of your 
> requirement in terms of the source of the raster data. All of the pixel 
> values have been created and either fall between the values of 1-4 or 
> contain no data.

This is your problem -- gdal only does nearest-neighbor when working 
with palleted images -- you can't get a smoother result without adding 
the in-between colors.

I think recent versions of GDAL had some code added to convert to RBG.

untested, but using gdal_translate, with the "-expand rgb" flag may do 
it. Then use gdalwarp on the resulting image.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov


More information about the gdal-dev mailing list