[mapserver-users] problem with gdaladdo

Frank Warmerdam warmerdam at pobox.com
Fri Oct 24 09:40:02 EDT 2008


Holger Schiebold wrote:
> 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?

Holger,

Is it possible you are going through the complex resampling case in MapServer?
This kicks in when reprojecting, but can also be activated by use of the
RESAMPLE PROCESSING directive or requesting a non-square pixel size on your
map.  In this case MapServer requests the imagery at greater than final
resolution and downsamples from that.

If you run with debugging on you should see output from this debugging
statement if you are going through the resampler.

         msDebug( "msResampleGDALToMap in effect: cellsize = %f\n",
                  sDummyMap.cellsize );

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-users mailing list