trouble displaying ortho
Dylan Keon
keon at NACSE.ORG
Wed Aug 11 13:17:35 PDT 2004
Frank Warmerdam wrote:
> Dylan Keon wrote:
>
>> I'm having trouble displaying a TIFF image (merged orthophoto). It
>> looks pretty noisy in my mapserver app.
>>
>> Bad image: http://gis.nacse.org/mstemp/109224912061641.png
>> What it should look like: http://gis.nacse.org/mstemp/ortho_small.png
>>
>> I tried displaying it as both 8-bit and 24-bit with no difference, but
>> it should display ok as 8-bit anyway. The funny thing is it looks
>> correct in an existing ArcIMS app, and in the eog and kview image
>> viewers. But then it looks noisy in the mapserver app, in gimp, and
>> also when I view it in Irfanview on Windows. Not sure what's up.
>
>
> Dylan,
>
> MapServer uses nearest neighbour sampling when downsampling image data.
> This is much faster than averaging or other techniques but can produce
> "noisy" effects under some circumstances. It isn't wrong, but it can be
> less appealing.
>
> One thing you can do is to pre-build overviews on the file in question
> with averaging. This can be done with the "gdaladdo" utility from the
> GDAL distribution.
>
> eg.
>
> gdaladdo -r average ortho.tif 2 4 8 16 32 64
>
> There are various "issues" that can arise but hopefully this will work out
> of the box for you.
Worked perfectly out of the box. And it's nice to understand why it was
happening. Thanks Frank!
--Dylan
More information about the MapServer-users
mailing list