Opened 9 years ago

Closed 5 years ago

#6079 closed defect (wontfix)

img files (HFA) are created with simplified prj strings

Reported by: ccjklppp Owned by: warmerdam
Priority: high Milestone: closed_because_of_github_migration
Component: GDAL_Raster Version: 2.0.1
Severity: normal Keywords:
Cc:

Description

when creating img files (HFA driver), the files are created with simplified prj strings (i.e. a prj with no authority codes). for example: img file created by gdalwarp with epsg 4326, contains the following prj (read by gdalinfo):

GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433]]

On the contrary, when I use erdas imagine to create an img file (from the same source), the output contains the following prj (read by gdalinfo):

GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0,
        AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.0174532925199433,
        AUTHORITY["EPSG","9122"]],
    AUTHORITY["EPSG","4326"]]

Attachments (3)

input.tif (29.7 KB ) - added by ccjklppp 9 years ago.
output-ERDAS14.img (14.5 KB ) - added by ccjklppp 9 years ago.
output-GDAL.img (59.3 KB ) - added by ccjklppp 9 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 by ccjklppp, 9 years ago

Milestone: 2.0.1

comment:2 by Even Rouault, 9 years ago

Could you attach a file generated by ERDAS Imagine that is reported with AUTHORITY["EPSG","4326"] by gdalinfo ?

by ccjklppp, 9 years ago

Attachment: input.tif added

by ccjklppp, 9 years ago

Attachment: output-ERDAS14.img added

by ccjklppp, 9 years ago

Attachment: output-GDAL.img added

comment:3 by ccjklppp, 9 years ago

I added 3 files for example (input, ouputs - erdas,gdal)

comment:4 by Even Rouault, 9 years ago

Component: defaultGDAL_Raster
Resolution: fixed
Status: newclosed

trunk r29763, branches/2.0 r29764 "HFA: when reading projection, preserve EPSG code if AutoIdentifyEPSG() identified the SRS, even if a PE string is present (#6079)"

comment:5 by ccjklppp, 9 years ago

Resolution: fixed
Status: closedreopened

It seems that the repair that was performed fixed only some coordinate systems such as Wgs84, Wgs72... The prj written for other coordinate systems such as Ed1950 (EPSG: 4230) is still as before the change (without EPSG code in the output header)

comment:6 by ccjklppp, 9 years ago

Milestone: 2.0.12.0.2
Version: 2.0.02.0.1

in reply to:  5 comment:7 by Even Rouault, 9 years ago

Milestone: 2.0.2

Replying to ccjklppp:

It seems that the repair that was performed fixed only some coordinate systems such as Wgs84, Wgs72... The prj written for other coordinate systems such as Ed1950 (EPSG: 4230) is still as before the change (without EPSG code in the output header)

Yes, this is a limitation of the Imagine coordinate system format. It doesn't store EPSG codes. So only a few codes can be retrieved back the AutoIdentifyEPSG() method. A much more involved method would be needed to identify the EPSG code from the definitions of the EPSG database. I'm removing the target milestone as, personaly, I'm not planning to tackle that without appropriate funding. If you are interested, you can contact me at contact@…

comment:8 by Even Rouault, 5 years ago

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: reopenedclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.