Opened 6 years ago

Closed 2 years ago

#3958 closed defect (fixed)

Imagine projection 69 - mercator or stereographic south pole

Reported by: warmerdam Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: HFA imagine
Cc: esrixz

Description

I have been supplied a .img file by Erdas with the following projection node:

    Projection(Eprj_ProParameters) @ 1896 + 174 @ 2024
    + proType = EPRJ_INTERNAL
    + proNumber = 69
    + proExeName = (no values)
    + proName = `Mercator (Variant A)'
    + proZone = 0
    + proParams[0] = 0.000000
    + proParams[1] = 0.000000
    + proParams[2] = 1.000000
    + proParams[3] = 0.000000
    + proParams[4] = 0.000000
    + proParams[5] = 0.000000
    + proParams[6] = 0.000000
    + proParams[7] = 0.000000
    + proSpheroid = 
    +     sphereName = `WGS 84'
    +     a = 6378137.000000
    +     b = 6356752.314245
    +     eSquared = 0.006694
    +     radius = 6371007.180918

It is intended that this be essentially EPSG:3395, World Mercator:

PROJCS["WGS 84 / World Mercator",
    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"]],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    PROJECTION["Mercator_1SP"],
    PARAMETER["central_meridian",0],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    AUTHORITY["EPSG","3395"],
    AXIS["Easting",EAST],
    AXIS["Northing",NORTH]]

The coordinate system is completely unrecognised by GDAL "trunk", but the 1.6-esri branch reports it as:

PROJCS["Mercator (Variant A)",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            TOWGS84[0,0,0,0,0,0,0],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9108"]],
        AXIS["Lat",NORTH],
        AXIS["Long",EAST],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Stereographic_South_Pole"],
    PARAMETER["central_meridian",57.29577951308232],
    PARAMETER["standard_parallel_1",0],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["meters",1]]

I see that GDAL trunk ends the list of EPRJ_ definitions in gdal/frmts/hfa/hfa.h with:

#define EPRJ_STEREOGRAPHIC_EXTENDED             50
#define EPRJ_CASSINI                            51
#define EPRJ_TWO_POINT_EQUIDISTANT              52
#define EPRJ_STEREOGRAPHIC_NORTH_POLE           53
#define EPRJ_STEREOGRAPHIC_SOUTH_POLE           54

while the 1.6-esri branch has many extra codes, and some differences like this:

#define EPRJ_STEREOGRAPHIC_EXTENDED             50
#define EPRJ_CASSINI                            51
#define EPRJ_TWO_POINT_EQUIDISTANT              52
#define EPRJ_LOCAL                              53
#define EPRJ_KROVAK                             54
#define EPRJ_DOUBLE_STEREOGRAPHIC               55
#define EPRJ_AITOFF                             56
#define EPRJ_CRASTER_PARABOLIC                  57
#define EPRJ_CYLINDRICAL_EQUAL_AREA             58
#define EPRJ_FLAT_POLAR_QUARTIC                 59
#define EPRJ_TIMES                              60
#define EPRJ_WINKEL_TRIPEL                      61
#define EPRJ_HAMMER_AITOFF                      62
#define EPRJ_VERTICAL_NEAR_SIDE_PERSPECTIVE     63
#define EPRJ_HOTINE_OBLIQUE_MERCATOR_AZIMUTH_CENTER           64
#define EPRJ_HOTINE_OBLIQUE_MERCATOR_TWO_POINT_CENTER         65
#define EPRJ_HOTINE_OBLIQUE_MERCATOR_TWO_POINT_NATURAL_ORIGIN 66
#define EPRJ_HOTINE_OBLIQUE_MERCATOR_AZIMUTH_NATURAL_ORIGIN   67
#define EPRJ_STEREOGRAPHIC_NORTH_POLE           68
#define EPRJ_STEREOGRAPHIC_SOUTH_POLE           69

In this ticket I would like to get handling of EPRJ code 69 corrected, resolve the apparent contradictions between 1.6-esri and trunk and carry any stuff in 1.6-esri and missing in trunk over.

Change History (4)

comment:1 Changed 6 years ago by warmerdam

Status: newassigned

Reena at Erdas reports:

I looked at the link you provided. The following entries in 1.6-esri branch do not match ours.

#define EPRJ_HOTINE_OBLIQUE_MERCATOR_AZIMUTH_NATURAL_ORIGIN   67
#define EPRJ_STEREOGRAPHIC_NORTH_POLE           68
#define EPRJ_STEREOGRAPHIC_SOUTH_POLE           69

The above numbers are mapped as follows

"Lambert Conic Conformal (1SP)" 67
"Pseudo Mercator"  68
"Mercator (Variant A)" 69

comment:2 Changed 6 years ago by warmerdam

Reena has provided a full list of projection definitions and I have updated the EPRJ_ list based on it. I have also added logic to roundtrip Mercator (Variant A) and Krovak based on that as well as "one way" for pseudo-mercator but so far I don't know how pseudo-mercator should different from regular mercator. trunk only (r21687).

Lots and lots of changes that still need to be merged in from 1.6-esri.

comment:3 Changed 6 years ago by warmerdam

Major merge of stuff from 1.6-esri in trunk (r21718).

comment:4 Changed 2 years ago by Jukka Rahkonen

Resolution: fixed
Status: assignedclosed

Because major stuff is applied 4 years ago I close this ticket as fixed. However, there is this file that is listing 4 remaining tasks: trunk/gdal/frmts/hfa/TODO_Projections.txt

Note: See TracTickets for help on using tickets.