Opened 18 years ago

Closed 17 years ago

#1281 closed defect (fixed)

WGS84 name wrong for HFA driver

Reported by: wegmann@… Owned by: warmerdam
Priority: normal Milestone: 1.4.1
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords:
Cc:

Description (last modified by warmerdam)

using GRASS 6.3 cvs
LatLong WGS84

r.out.gdal
GIS format: hfa

output by gdal as: wgs 84
but ERDAS imagine 8.7 only recognises 
WGS 84

regards, Martin

Change History (3)

comment:2 by warmerdam, 17 years ago

Description: modified (diff)
Milestone: 1.4.1
Status: newassigned

comment:3 by warmerdam, 17 years ago

Priority: highestnormal
Summary: gdal export to hfa typoWGS84 name wrong for HFA driver

comment:4 by warmerdam, 17 years ago

Resolution: fixed
Status: assignedclosed

It appears the following was added to correct this bug, but I haven't been able to trace when it was added, but I can confirm it was done for 1.4.0.

        /* try to morph WGS84 varients to "WGS 84" (bug 1281) */
        if( EQUALN(sDatum.datumname,"wgs",3) 
            && strstr(sDatum.datumname,"84") != NULL )
            sDatum.datumname = "WGS 84";

I have generalized this to use the datum recognistion code in OGRSpatialReference in 1.5 by using the following code:

        /* Map some EPSG datum codes directly to Imagine names */
        int nGCS = poGeogSRS->GetEPSGGeogCS();

        if( nGCS == 4326 )
            sDatum.datumname = "WGS 84";
        if( nGCS == 4322 )
            sDatum.datumname = "WGS 1972";
        if( nGCS == 4267 )
            sDatum.datumname = "North_American_Datum_1927";
        if( nGCS == 4269 )
            sDatum.datumname = "North_American_Datum_1983";

Note: See TracTickets for help on using tickets.