[Gdal-dev] reprojecting 2.0

Maciek Sieczka werchowyna at pf.pl
Sat Jun 26 08:17:08 EDT 2004


Hello!

Some time ago I sent a post about some basic issues with reprojecting
rasters. Now I resend it in a detailed form as the first version was a mess.

Question: imagine I reprojected raster A from one coord system to raster B
in the another system. Is it now possible to derive exactly the original
raster A from the raster B back, or, if not, how do I proceed to derive it
back possibly unchanged?

example:

I converted the SRTM BIL to a following GTIFF (using the Markus Neteler's
Grass script 'r.in.srtm' http://mpa.itc.it/rs/srtm/):

    Driver: GTiff/GeoTIFF
    Size is 1201, 1201
    Coordinate System is:
    GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.2572235630016,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree (supplier to define representation)",0.01745329251994328],
    AUTHORITY["EPSG","4326"]]
    Origin = (14.999583,51.000417)
    Pixel Size = (0.00083333,-0.00083333)
    Corner Coordinates:
    Upper Left  (  14.9995833,  51.0004167) ( 14d59'58.50"E, 51d 0'1.50"N)
    Lower Left  (  14.9995833,  49.9995833) ( 14d59'58.50"E, 49d59'58.50"N)
    Upper Right (  16.0004167,  51.0004167) ( 16d 0'1.50"E, 51d 0'1.50"N)
    Lower Right (  16.0004167,  49.9995833) ( 16d 0'1.50"E, 49d59'58.50"N)
    Center      (  15.5000000,  50.5000000) ( 15d30'0.00"E, 50d30'0.00"N)
    Band 1 Block=1201x3 Type=Int16, ColorInterp=Gray

Next I converted it into an "ETRS89 / Poland CS92" and then back into GEOGCS
projection (the projection of the SRTM by default). And now the pixel size
and the corner and centre coords are different than in the original so the
SRTM was distorted during the reprojecting. Is it unavoidable?

the 'distorted' GEOGCS SRTM is:

    (...) (as above)
    Pixel Size = (0.00085946,-0.00085946)
    Corner Coordinates:
    Upper Left  (  14.9142554,  51.0303873) ( 14d54'51.32"E, 51d 1'49.39"N)
    Lower Left  (  14.9142554,  49.9698135) ( 14d54'51.32"E, 49d58'11.33"N)
    Upper Right (  16.0633536,  51.0303873) ( 16d 3'48.07"E, 51d 1'49.39"N)
    Lower Right (  16.0633536,  49.9698135) ( 16d 3'48.07"E, 49d58'11.33"N)
    Center      (  15.4888045,  50.5001004) ( 15d29'19.70"E, 50d30'0.36"N)
    Band 1 Block=1337x3 Type=Int16, ColorInterp=Gray

Maciek




More information about the Gdal-dev mailing list