Yep, that worked !
I didn't know that the extents of the mapfile were not the same as the one
from GDAL. There was my mistake !
So I moved the four corners in order to have the whole extent reduced by one
pixel and here it was !
I am really thanking you for those fast and accurate answers !!!
Benoît
----- Original Message -----
From: "Ed McNierney" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, June 14, 2007 4:50 PM
Subject: Re: [UMN_MAPSERVER-USERS] Small differences in input and output
Frank -
For MapServer EXTENT purposes Benoit will need to adjust the extents by
one
whole pixel rather than by half a pixel? If there are N pixels
horizontally
measured from the center of the left-hand to the center of the right-hand
pixel, then there are N+1 pixels measured from the left of the left-hand
to
the right of the right-hand pixel, rather than N+0.5.
That is, if you adjust all four corners "in" by 0.5 pixel you'll reduce
the
height and width by 1 whole pixel each.
- Ed
--
Ed McNierney
President and Chief Mapmaker
Maps a la carte, Inc. / TopoZone.com
73 Princeton Street, Suite 305
North Chelmsford, MA 01863
Phone: (978) 251-4242
Fax: (978) 251-1396
[EMAIL PROTECTED]
From: Frank Warmerdam <[EMAIL PROTECTED]>
Reply-To: Frank Warmerdam <[EMAIL PROTECTED]>
Date: Thu, 14 Jun 2007 10:11:08 -0400
To: <[email protected]>
Subject: Re: [UMN_MAPSERVER-USERS] Small differences in input and output
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,
[EMAIL PROTECTED]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGeo,
http://osgeo.org