[gdal-dev] gdal_translate distorts PROJCS specification ?

Sjur Kolberg Sjur.A.Kolberg at sintef.no
Fri Sep 17 10:13:23 EDT 2010


Dear experts,

I have a grib2 file which I try to convert to IDRISI, extracting band 1.
Somehow the PROJCS section is distorted, leaving the IDRISI file useless for warping.

Windows 7, GDAL 1.7.0b2, FWTools 2.4.7, released 2010/01/19
I use the following sequence of commands:

gdalinfo har04_00_ext.grib2>gribinfo.txt

gdal_translate -of RST -b 1 har04_00_ext.grib2 har04_00_ext.rst
Input file size is 289, 489
0...10...20...30...40...50...60...70...80...90...100 - done.

gdalinfo har04_00_ext.rst>rstinfo.txt


Output of first GDALINFO:

Driver: GRIB/GRIdded Binary (.grb)
Files: har04_00_ext.grib2
Size is 289, 489
Coordinate System is:
PROJCS["unnamed",
    GEOGCS["Coordinate System imported from GRIB file",
        DATUM["unknown",
            SPHEROID["Sphere",6367470,0]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Lambert_Conformal_Conic_2SP"],
    PARAMETER["standard_parallel_1",64.35],
    PARAMETER["standard_parallel_2",64.35],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",337],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0]]
Origin = (1192906.028257467600000,10107044.152202457000000)
Pixel Size = (4000.000000000000000,-4000.000000000000000)
Corner Coordinates:
Upper Left  ( 1192906.028,10107044.152) ( 19d40'29.23"E, 74d32'51.23"N)
Lower Left  ( 1192906.028, 8151044.152) (  1d52'57.71"W, 58d57'40.03"N)
Upper Right ( 2348906.028,10107044.152) ( 40d41'28.49"E, 66d46'40.32"N)
Lower Right ( 2348906.028, 8151044.152) ( 14d55'47.70"E, 54d18'2.03"N)
Center      ( 1770906.028, 9129044.152) ( 16d25'18.42"E, 64d26'49.23"N)
Band 1 Block=289x1 Type=Float64, ColorInterp=Undefined
Etc... (long file)


Output of second GDALINFO, note the "-1.#INF" instead of 0 under the SPHEROID label.

Driver: RST/Idrisi Raster A.1
Files: har04_00_ext.rst
       har04_00_ext.rst.aux.xml
       har04_00_ext.rdc
       har04_00_ext.ref
Size is 289, 489
Coordinate System is:
PROJCS["unnamed",
    GEOGCS["har04_00_ext",
        DATUM["unknown",
            SPHEROID["Sphere",6367470,"-1.#INF"],
            TOWGS84[0,0,0,0,0,0,0]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Lambert_Conformal_Conic_2SP"],
    PARAMETER["standard_parallel_1",64.35],
    PARAMETER["standard_parallel_2",64.35],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",337],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["degree",0]]
Origin = (1192906.028257499900000,10107044.152202500000000)
Pixel Size = (4000.000000000000000,-4000.000000000000000)
Corner Coordinates:
Upper Left  ( 1192906.028,10107044.152)
Lower Left  ( 1192906.028, 8151044.152)
Upper Right ( 2348906.028,10107044.152)
Lower Right ( 2348906.028, 8151044.152)
Center      ( 1770906.028, 9129044.152)
Band 1 Block=289x1 Type=Float32, ColorInterp=Gray


Do anyone have a clue to why this happens?

Regards, Sjur K :-)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100917/6405fc37/attachment.html


More information about the gdal-dev mailing list