[gdal-dev] Re: gdal to define projection, EPSG:3412

Hermann Peifer peifer at gmx.eu
Thu Nov 12 03:33:23 EST 2009


John Callahan wrote:
> Thanks for responding Hermann. Yes, I tried using -s_srs EPSG:3412 as 
> well as the full PROJ4 string with the same result. When specifying 
> -s_srs, does gdalwarp ignore (override) the project information in the 
> hdr file?
> 

Hmm. AFAIK: gdal_translate -a_srs does override the file's projection 
information. I have a random.tif in LAEA projection (EPSG:3035), so I 
tried the following with gdal 1.6.2:

gdal_translate random.tif out1.tif -a_srs EPSG:3412  # this results in [1]

gdal_translate random.tif out2.tif -a_srs "+proj=stere +lat_0=-90 
+lat_ts=-70 +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378273 +b=6356889.449 
+units=m +no_defs"  # this gives [2]

To me as an innocent GDAL user, this behaviour looks similar to 
http://trac.osgeo.org/gdal/ticket/3016. I might be wrong, though, in 
particular as you wrote that using the PROJ.4 string didn't help (and 
your source file isn't a GeoTIFF in the first place).

Hermann


[1]
$ gdalinfo out1.tif
Driver: GTiff/GeoTIFF
Files: out1.tif
Size is 570, 460
Coordinate System is:
PROJCS["NSIDC Sea Ice Polar Stereographic South",
     GEOGCS["Unspecified datum based upon the Hughes 1980 ellipsoid",
         DATUM["Not_specified_based_on_Hughes_1980_ellipsoid",
             SPHEROID["Hughes 1980",6378273,298.279411123064,
                 AUTHORITY["EPSG","7058"]],
             AUTHORITY["EPSG","6054"]],
         PRIMEM["Greenwich",0],
         UNIT["degree",0.0174532925199433],
         AUTHORITY["EPSG","4054"]],
     UNIT["metre",1,
         AUTHORITY["EPSG","9001"]],
     AUTHORITY["EPSG","3412"]]
Origin = (1500000.000000000000000,5500000.000000000000000)
Pixel Size = (10000.000000000000000,-10000.000000000000000)
(...)


[2]
gdalinfo out2.tif
Driver: GTiff/GeoTIFF
Files: out2.tif
Size is 570, 460
Coordinate System is:
PROJCS["unnamed",
     GEOGCS["unnamed ellipse",
         DATUM["unknown",
             SPHEROID["unnamed",6378273,298.279411123064]],
         PRIMEM["Greenwich",0],
         UNIT["degree",0.0174532925199433]],
     PROJECTION["Polar_Stereographic"],
     PARAMETER["latitude_of_origin",-70],
     PARAMETER["central_meridian",0],
     PARAMETER["scale_factor",1],
     PARAMETER["false_easting",0],
     PARAMETER["false_northing",0],
     UNIT["metre",1,
         AUTHORITY["EPSG","9001"]]]
Origin = (1500000.000000000000000,5500000.000000000000000)
Pixel Size = (10000.000000000000000,-10000.000000000000000)
(...)


More information about the gdal-dev mailing list