[mapserver-users] problem with gdaladdo

Holger Schiebold hschiebold at codematix.de
Fri Oct 24 03:46:46 EDT 2008


If anybody interested in, i fixed that problem with a little workaround

---
#!/bin/sh
# usage gdaladdo.sh file algo level

i=2
while [ $i -le $3 ]
do
   gdaladdo -r $2 $1 $i
   i=`expr $i + 1`
done
---

With such a little script each overview level is computed from the 
original and so you have the best quality in each downsampled image.

But know comes my next problem - when i am using such a tiff with 
overviews in mapserver he takes the wrong level i think. I wrote numbers 
in each level so that i can identify which overview mapserver/gdal 
takes. In my mapfile i use "399 541" as mapsize which is exactly the 
size of level 18 in my pyramid but mapserver takes level 10 which size 
is 717 x 974 and so the output of mapserver is not in the quality i 
expect. How does mapserver/gdal decides which level of the pyramid he 
uses and can i modify this?

thanks in advance

> Hi everyvone,
>
> I have a problem with gdaladdo while preprocessing raster images. For 
> the output of raster images in a Mapserver application I use gdaladdo 
> to build overviews of an image that represents Germany (gdaladdo -r 
> average  test.tif 2 4 8 16 32 64 128 256 512 1024). Typically just the 
> first 4 levels are used in the application. To get better output 
> results from Mapserver I used the processing method 
> "resample=average". But the problem for high quality output in the 
> Mapserver application seems to be the great difference between the 
> levels of the overviews. So I tried to build overviews with  gdaladdo 
> -r average  test.tif  2 3 4 5 6 7 ....  20. But now I have the problem 
> that at the same zoomlevels in mapserver and in the pyramid (e.g. 
> image at 500x500 pixel) the quality of the image is worse than in 
> former case. Maybe gdaladdo does compute the next level not from the 
> original image but from the previous level in the pyramid?  Is there a 
> possibility to build the each overview from original image to get the 
> best qualty in downsampled images?
>
> thanks in advance
>
> Holger Schiebold _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>



More information about the mapserver-users mailing list