[GRASS5] Re: [Gdal-dev] ERDAS/IMG driver error for NULL values

Otto Dassau otto.dassau at gmx.de
Wed Jun 30 08:58:33 EDT 2004


On Wed, 30 Jun 2004 13:25:39 +0100
Paul Kelly <paul-grass at stjohnspoint.co.uk> wrote:

> 		
> 
> Paul Kelly wrote:
> > 
> > 
> > This looks like a deficiency in the r.out.gdal script. In GRASS 5.7 now
> > the co-ordinate system can be printed in WKT format using `g.proj -wf`.
> > I assume gdal_translate has a command-line option to specify the output
> > co-ordinate system and this could be easily added to the corresponding
> > line in the r.out.gdal script.
> > 
> 
> To follow up on this, I think it would mean changing the last line in
> r.out.gdal from
> gdal_translate -of $FORMAT $CREATEKEY $METAKEY $CELLHD $OUTPUT
> to
> gdal_translate -of $FORMAT -a_srs '`g.proj -wf`' $CREATEKEY $METAKEY
> $CELLHD $OUTPUT

Hi Paul,

you are right:)

gdalinfo -mm baltrum.img
Driver: HFA/Erdas Imagine Images (.img)
Size is 17559, 8026
Coordinate System is:
PROJCS["Transverse Mercator",
    GEOGCS["unknown",
        DATUM["unknown",
            SPHEROID["bessel",6377397.155,299.1528128000033],
            TOWGS84[590.5,69.5,411.6,-0.796,-0.052,-3.601,8.3]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    UNIT["meters",1],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",9],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",3500000],
    PARAMETER["false_northing",0]]
Origin = (3391622.720000,5957462.080000)
Pixel Size = (0.32000000,-0.32000000)
Corner Coordinates:
Upper Left  ( 3391622.720, 5957462.080) (  7d21'26.28"E, 53d44'19.05"N)
Lower Left  ( 3391622.720, 5954893.760) (  7d21'29.52"E, 53d42'56.00"N)
Upper Right ( 3397241.600, 5957462.080) (  7d26'32.75"E, 53d44'23.14"N)
Lower Right ( 3397241.600, 5954893.760) (  7d26'35.82"E, 53d43'0.09"N)
Center      ( 3394432.160, 5956177.920) (  7d24'1.09"E, 53d43'39.60"N)
Band 1 Block=64x64 Type=UInt16, ColorInterp=Palette
    Computed Min/Max=4228.000,65535.000
  Color Table (RGB with 256 entries)
    0: 0,0,0,255
    1: 7,0,0,255
    2: 15,0,0,255
    3: 23,0,0,255
    4: 31,0,0,255
    5: 41,0,0,255
    6: 49,0,0,255
    ...
    255: 255,57,0,255

 thanks for your help
    Otto





More information about the grass-dev mailing list