Opened 9 years ago

Last modified 8 years ago

#2441 new defect

incorporate string format change in morphToESRI() method

Reported by: yanchen Owned by: warmerdam
Priority: normal Milestone:
Component: OGR_SRS Version: 1.5.1
Severity: normal Keywords: morphToESRI
Cc: gaopeng, esrixz

Description

Problem 1. the spatial reference is read as Albers Conical Equal Area, it should be North_America_Albers_Equal_Area_Conic. Seems all the parameters are already there, so in morphToESRI() method we need add "North_America_" in the front, changing empty space" " to underscore "_".

Problem 2. the name of the spatial reference should be ESRI style WGS_1984_UTM_Zone_59N", not " UTM Zone 11, Northern Hemisphere"

Attachments (3)

t2441problem1.zip (818.9 KB) - added by yanchen 9 years ago.
data for problem1
t2441problem2.zip (106.7 KB) - added by yanchen 9 years ago.
data for problem2
t2441problem3.zip (434.2 KB) - added by yanchen 9 years ago.
data for problem3

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by yanchen

Attachment: t2441problem1.zip added

data for problem1

Changed 9 years ago by yanchen

Attachment: t2441problem2.zip added

data for problem2

comment:1 Changed 9 years ago by yanchen

Problem 3: It should return NAD_1927_UTM_Zone_10N, but it returns some strange string "Projection Name = UTM Units = meters GeoTIFF Units = meters". I'm not sure it is the same problem as the above 2.

Changed 9 years ago by yanchen

Attachment: t2441problem3.zip added

data for problem3

comment:2 Changed 8 years ago by warmerdam

Cc: gaopeng esrixz added; pgao@… removed
Component: defaultOGR_SRS
Milestone: 1.5.4

I have reviewed these three cases and none of them are returning the desired coordinate system names yet in trunk or the 1.6-esri branch. The current results follow, as created by this script:

from osgeo import osr, gdal
import sys

argv = gdal.GeneralCmdLineProcessor( sys.argv )
if argv is None:
    sys.exit( 0 )

if len(argv) == 1:
    print 'Usage: esri_rep.py <file>'
    sys.exit( 1 )
    
file = argv[1]

ds = gdal.Open(file)

wkt = ds.GetProjectionRef()

srs = osr.SpatialReference(wkt)
srs.MorphToESRI()
wkt_esri = srs.ExportToPrettyWkt()

print wkt_esri

The problem one file reports:

PROJCS["Albers_Conical_Equal_Area",
    GEOGCS["GCS_North_American_1983",
        DATUM["D_North_American_1983",
            SPHEROID["GRS_1980",6378137,298.257222101]],
        PRIMEM["Greenwich",0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Albers"],
    PARAMETER["standard_parallel_1",20],
    PARAMETER["standard_parallel_2",60],
    PARAMETER["latitude_of_origin",40],
    PARAMETER["central_meridian",-96],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["meters",1]]

instead of the desired "North_America_Albers_Equal_Area_Conic".

The second problem file reports this for the Imagine file:

PROJCS["UTM_Zone_17_Northern_Hemisphere",
    GEOGCS["GCS_Clarke_1866",
        DATUM["D_Clarke_1866",
            SPHEROID["Clarke_1866",6378206.4,294.9786982]],
        PRIMEM["Greenwich",0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-81],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["Meter",1]]

and this for the TIFF file:

PROJCS["UTM_Zone_17_Northern_Hemisphere",
    GEOGCS["GCS_Clarke_1866",
        DATUM["D_unknown",
            SPHEROID["Clarke_1866",6378206.4,294.9786982]],
        PRIMEM["Greenwich",0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-81],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["Meter",1]]

instead of the desired "WGS_1984_UTM_Zone_59N".

The third problem reports:

PROJCS["UTM",
    GEOGCS["GCS_North_American_1927",
        DATUM["D_North_American_1927",
            SPHEROID["Clarke_1866",6378206.4,294.9786982]],
        PRIMEM["Greenwich",0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-123],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["meters",1]]

This is an improvement over the old case where the full imagine descriptive document was in the name, but is still not the intended "NAD_1927_UTM_Zone_10N".

I have added Xiuguang Zhou to the cc: list since he did lots of work on morphToESRI() for the 1.6-esri branch. I think we need to establish if we really need to force these cases to use the full ESRI style coordinate system name or not for compatability. If not, we can just close this ticket. If so, we may need a reasonably comprehensive strategy to do so.

Comments?

Note: See TracTickets for help on using tickets.