Small differences in input and output

Frank Warmerdam warmerdam at POBOX.COM
Thu Jun 14 07:11:08 PDT 2007


Benoit Andrieu wrote:
...
> Theline that is inserted in the resulting output does not seem to come from
> the input neither seems to be an interpolation of the input.
> 
> As a second test, I tried to offset my extent by half the resolution of my
> input but in this output we can now see that a set of vertical lines is
> offseted.
> 
> You can see my input and output :
> http://benoit.andrieu.free.fr/images/input.png
> http://benoit.andrieu.free.fr/images/output_1.png
> http://benoit.andrieu.free.fr/images/output_2.png
> 
> As you'll see the difference is very small but I need to not have this
> difference.

Benoit,

What are you using for your EXTENT line in the mapfile?  What does
gdalinfo report for input.png?  The MapServer "extent" is from the
center of corner pixel to center of corner pixel, while the GDAL extents
are from the outer edge of the corner pixels.

So if you use gdalinfo to get the extents, you need to adjust them "in"
by half a pixel.

I *suspect* this is what is happening to you.  If not, please file a bug,
assigned to me, with a minimal map file, and input file that demonstrates
the problem and I'll dig into it.

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    | President OSGeo, http://osgeo.org



More information about the MapServer-users mailing list