[Gdal-dev] hatches rendering issues

Eric Lemoine eric.c2c at gmail.com
Fri Nov 9 16:31:49 EST 2007


On Nov 8, 2007 3:05 PM, Frank Warmerdam <warmerdam at pobox.com> wrote:
> Eric Lemoine wrote:
> > If my original image is 1/5000 and if I use <gdaladdo file.tif 2 4>,
> > is MapServer going to do its own downsampling? I was expecting
> > MapServer to rely on the overviews created by gdaladdo and do nothing
> > more.
>
> Eric,
>
> Generally speaking MapServer will work from the overview corresponding to
> the resolution of the map request.  If there is no direct correspondence
> it will work from the closest *higher resolution* overview.
>
> Things are also complicated by the fact that in some modes (ie. AVERAGE
> resampling, reprojecting) MapServer requests the source data somewhat
> oversampled and downsamples/warps from that.  So you may actually end up
> loading a higher resolution overview than you would otherwise expect.
>
> If the overview level requested for "normal" views does not correspond
> to the resolution of an overview, downsampling must still be done by
> MapServer.

Frank,

At 72 dpi my original tif wasn't 1/5000 but somewhere near 1/900 (it
is 1/5000 for 400 dpi). That's why the 1/5000 image I posted hadn't a
uniform hatching spacing.

Anyway, here's how I managed getting good results:

$gdaladdo -r average 2 4 8 16 file.tif

and request images from MapServer at the exact resolutions, that is
(if r is the initial resolution): r, r/2, r/4, r/8, r/16. Previously I
was requesting images at 1/1000, 1/2000, 1/5000, 1/10000, 1/20000,
which forced MapServer to do its own downsampling I guess.

Anyway, rendering is good now. Thanks for your help Frank,

--
Eric



More information about the gdal-dev mailing list