Opened 20 years ago

Closed 17 years ago

#456 closed defect (worksforme)

ESRI to OGR Parameter Mapping Issues

Reported by: hgrabows@… Owned by: warmerdam
Priority: high Milestone: 1.4.1
Component: OGR_SRS Version: unspecified
Severity: major Keywords:
Cc:

Description (last modified by warmerdam)

There are many cases where the projection parameters between ESRI and OGR differ in name. There are two included examples of where this occurs. The second one, the World Mercator projection, has an additional problem where "Standard_Parallel_1" is used by ESRI but isn't considered a valid parameter by OGR. Therefore this projection fails to validate correctly.

PROJCS["North_America_Equidistant_Conic",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Equidistant_Conic"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-96.0],PARAMETER["Standard_Parallel_1",20.0],PARAMETER["Standard_Parallel_2",60.0],PARAMETER["Latitude_Of_Origin",40.0],UNIT["Meter",1.0]]

PROJCS["World_Mercator",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]

Change History (3)

comment:1 by warmerdam, 20 years ago

This should be reviewed before the GDAL 1.2.0 release.

comment:3 by warmerdam, 17 years ago

Description: modified (diff)
Milestone: 1.4.1
Priority: highesthigh

Reviewing for 1.4.1 release.

comment:4 by warmerdam, 17 years ago

Resolution: worksforme
Status: assignedclosed

There is now mapping logic for Equidistant Conic in the morphToESRI() and morphFromESRI() logic.

So this ESRI definition:

PROJCS["North_America_Equidistant_Conic",
    GEOGCS["GCS_North_American_1983",
        DATUM["D_North_American_1983",
            SPHEROID["GRS_1980",6378137.0,298.257222101]],
        PRIMEM["Greenwich",0.0],
        UNIT["Degree",0.0174532925199433]],
    PROJECTION["Equidistant_Conic"],
    PARAMETER["False_Easting",0.0],
    PARAMETER["False_Northing",0.0],
    PARAMETER["Central_Meridian",-96.0],
    PARAMETER["Standard_Parallel_1",20.0],
    PARAMETER["Standard_Parallel_2",60.0],
    PARAMETER["Latitude_Of_Origin",40.0],
    UNIT["Meter",1.0]]

maps to this OGR definition:

PROJCS["North_America_Equidistant_Conic",
    GEOGCS["GCS_North_American_1983",
        DATUM["North_American_Datum_1983",
            SPHEROID["GRS_1980",6378137.0,298.257222101]],
        PRIMEM["Greenwich",0.0],
        UNIT["Degree",0.0174532925199433]],
    PROJECTION["Equidistant_Conic"],
    PARAMETER["False_Easting",0.0],
    PARAMETER["False_Northing",0.0],
    PARAMETER["longitude_of_center",-96.0],
    PARAMETER["Standard_Parallel_1",20.0],
    PARAMETER["Standard_Parallel_2",60.0],
    PARAMETER["latitude_of_center",40.0],
    UNIT["Meter",1.0]]

and back to ESRI as this:

PROJCS["North_America_Equidistant_Conic",
    GEOGCS["GCS_North_American_1983",
        DATUM["D_North_American_1983",
            SPHEROID["GRS_1980",6378137.0,298.257222101]],
        PRIMEM["Greenwich",0.0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Equidistant_Conic"],
    PARAMETER["False_Easting",0.0],
    PARAMETER["False_Northing",0.0],
    PARAMETER["central_meridian",-96.0],
    PARAMETER["Standard_Parallel_1",20.0],
    PARAMETER["Standard_Parallel_2",60.0],
    PARAMETER["latitude_of_origin",40.0],
    UNIT["Meter",1.0]]

There are two parameters mapped per:

static char *apszECMapping[] = {
    SRS_PP_CENTRAL_MERIDIAN, SRS_PP_LONGITUDE_OF_CENTER, 
    SRS_PP_LATITUDE_OF_ORIGIN, SRS_PP_LATITUDE_OF_CENTER, 
    NULL, NULL };

So I conclude that Equidistant Conic is now properly handled.


Similarly, it seems that Mercator / Mercator_1SP is now handled. This is the raw ESRI definition:

PROJCS["World_Mercator",
    GEOGCS["GCS_WGS_1984",
        DATUM["D_WGS_1984",
            SPHEROID["WGS_1984",6378137.0,298.257223563]],
        PRIMEM["Greenwich",0.0],
        UNIT["Degree",0.0174532925199433]],
    PROJECTION["Mercator"],
    PARAMETER["False_Easting",0.0],
    PARAMETER["False_Northing",0.0],
    PARAMETER["Central_Meridian",0.0],
    PARAMETER["Standard_Parallel_1",0.0],
    UNIT["Meter",1.0]]

This is converted to OGR format:

PROJCS["World_Mercator",
    GEOGCS["GCS_WGS_1984",
        DATUM["WGS_1984",
            SPHEROID["WGS_1984",6378137.0,298.257223563]],
        PRIMEM["Greenwich",0.0],
        UNIT["Degree",0.0174532925199433]],
    PROJECTION["Mercator_1SP"],
    PARAMETER["False_Easting",0.0],
    PARAMETER["False_Northing",0.0],
    PARAMETER["Central_Meridian",0.0],
    PARAMETER["latitude_of_origin",0.0],
    UNIT["Meter",1.0]]

and back to ESRI format as:

PROJCS["World_Mercator",
    GEOGCS["GCS_WGS_1984",
        DATUM["D_WGS_1984",
            SPHEROID["WGS_1984",6378137.0,298.257223563]],
        PRIMEM["Greenwich",0.0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Mercator"],
    PARAMETER["False_Easting",0.0],
    PARAMETER["False_Northing",0.0],
    PARAMETER["Central_Meridian",0.0],
    PARAMETER["standard_parallel_1",0.0],
    UNIT["Meter",1.0]]

So it seems that the Mercator translation is also handled properly now.

I'm closing this bug report, but please reopen it if you still see problems in 1.4.0 or later with these two projections. Handling ESRI/OGR morphing is an ongoing battle. :-)

Note: See TracTickets for help on using tickets.