Ticket #4293 (new defect)

Opened 19 months ago

Last modified 19 months ago

Problem with morphing WKT to/from ESRI for several projections using a scale factor (eg Mercator-1SP, Polar Stereo)

Reported by: pds Owned by: warmerdam
Priority: normal Milestone:
Component: OGR_SRS Version: svn-trunk
Severity: normal Keywords: ESRI, OGR, Mercator
Cc:

Description

Similar to #4279, found while doing some tests using HFA driver that morphing to/from OGC WKT to ESRI strings doesn't handle well projections with a scale_factor.

E.g. if I translate a GeoTIFF with Mercator 1SP to HFA, and then run gdalinfo, I get:

gdalinfo on GeoTiff?, projection part:

    PROJECTION["Mercator_1SP"],
    PARAMETER["central_meridian",145],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    gdal_translate melb-small_M-1SP.tif -of HFA melb-small_M-1SP.img

gdalinfo projection part on HFA:

    PROJECTION["Mercator_1SP"],
    PARAMETER["central_meridian",145],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    PARAMETER["latitude_of_origin",0.0],

IE the 'scale_factor' has disappeared and been replaced by a latitude_of_origin.

Attachments

melb-small_M-1SP.tif Download (15.7 KB) - added by pds 19 months ago.
Sample GeoTiff?
melb-small_M-1SP.img Download (30.3 KB) - added by pds 19 months ago.
Sample HFA file, translated from GeoTiff?

Change History

Changed 19 months ago by pds

Sample GeoTiff?

Changed 19 months ago by pds

Sample HFA file, translated from GeoTiff?

Changed 19 months ago by pds

Looking at the source:/trunk/gdal/ogr/ogr_srs_esri.cpp file, it again seems to be a case where adjustment is done on morphToESRI():

        DeleteParamBasedOnPrjName( this, pszProjection, (char **)apszDeleteParametersBasedOnProjection);

(and apszDeleteParametersBasedOnProjection is defined in ogr_srs_esri_names.h)

but there's no equivalent reverse operation being done in morphFromESRI().

Note: See TracTickets for help on using tickets.