[Gdal-dev] Re: [GRASSLIST:6144] r.proj and gdawarp give differernt results

Frank Warmerdam fwarmerdam at gmail.com
Mon Mar 14 13:25:24 EST 2005

On Mon, 14 Mar 2005 13:39:54 +0100, Maciek Sieczka <werchowyna at epf.pl> wrote:
>     6. both gdalwarp and r.proj product have the *same* number of columns,
>     rows and res but the extent and apperance are still somewhat different:


I think this is a very significant issue.  The difference in
georeferencing seems
to be only a small portion of a pixel, but this can frequently be significant.

To test I tried tracking back one pixel that was different in the two
warpers.  I
tracked back the center of a pixel from the GDAL warp output:

Output Location

Value: 82
Pixel/Line = 39.5, 138.5
Georef     = 337548.161466, 277562.731833

Input Location

cs2cs -f '%.6f' +init=epsg:2180 +to +init=epsg:32633

Georef: 622113.023072   5578151.357107

Pixel/Line: 36.054, 136.782

Value: 82

So, in this case the GDAL result seems to be proper, but the 
difference in georeferencing between the r.proj and gdalwarp
output images is approximately 1.28 meters or approximately 
0.08882 pixels which would account for the sampling coming
from the neighbouring pixel (which we see in the r.proj result).

I have not traced any other pixels.  My suggestion is that you
do what you need to do to get exactly the same georeferencing
in both output products and then compare the results.  If there is
still a difference then try tracking back some pixels to see why 
they differ (well - at least which is correct). 

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 Gdal-dev mailing list