Opened 11 years ago

Closed 4 years ago

#4293 closed defect (wontfix)

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: closed_because_of_github_migration
Component: OGR_SRS Version: svn-trunk
Severity: normal Keywords: ESRI, OGR, Mercator
Cc: Kyle Shannon

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 (2)

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

Download all attachments as: .zip

Change History (5)

by pds, 11 years ago

Attachment: melb-small_M-1SP.tif added

Sample GeoTiff

by pds, 11 years ago

Attachment: melb-small_M-1SP.img added

Sample HFA file, translated from GeoTiff

comment:1 by pds, 11 years ago

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().

comment:2 by Kyle Shannon, 8 years ago

Cc: Kyle Shannon added

comment:3 by Even Rouault, 4 years ago

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: newclosed

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.