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

Frank Warmerdam fwarmerdam at gmail.com
Sat Mar 19 10:27:01 EST 2005


Maciek,

I see the different in the warp results that you are mentioning.  I have
picked a particular pixel that differs in the two results and I have
"manually" processed it.  

The summary is that with my understanding of the coordinate system 
conversion taking place, gdalwarp appears to have done the right 
thing.  Either there is an issue in the rproj algorithm, or more likely 
there is a subtle difference in the actual reprojection operation taking 
place in rproj due to differences in coordinate system detail handling 
between gdal and GRASS.  

Particular points to watch for is whether there might be some
reason that r.proj is actually applying a datum shift.  It is also
possible that I kept insufficient precision in my calculations, though
it seems to me that I kept enough. 

The point in question (feel free to check my results!) is:

Output Location
---------------

Value:       98 (75 in rproj)
Pixel/Line = 20.5, 11.5
Georef     = 337276.125, 279378.375
long/lat   = 16d42'41.641"E  50d21'32.477"N  (proj -I +init=epsg:2180)


GCS Conversion
--------------
The Geographic Coordinate System for EPSG 2180 is EPSG 4258 which is 
GRS80 with no datum shift information (in GDAL).  The GCS for the source
file is WGS84 (EPSG 4326) which is based on a WGS84 ellipsoid and is for
the precision of PROJ.4 identical to EPSG 4258. 

SPHEROID["WGS 84",  6378137,298.257223563]
SPHEROID["GRS 1980",6378137,298.257222101]

warmerda at gdal2200[164]% cs2cs +init=epsg:4258 +to +init=epsg:4326
16d42'41.641"E  50d21'32.477"N                  (input)
16d42'41.641"E  50d21'32.477"N -0.000           (output)


Input Location
--------------

long/lat    = 16d42'41.641"E  50d21'32.477"N
Georef      = 621743.762, 5579950.040    (proj -f '%.3f' +init=epsg:32633)
Pixel/Line  = 10.14, 10.56

Value: 98    (pixel 9.5,10.5 is value 75)

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