Ticket #116 (defect)

Opened 2 years ago

Last modified 1 year ago

incorrect behaviour for GetAuthorityName('GEOGCS')

Status: assigned

Reported by: cph Assigned to: dokai (accepted)
Priority: major Milestone:
Component: ZCO Version:
Keywords: Cc:

The following code :

+            if sref.GetAuthorityName('GEOGCS').upper() == 'EPSG':
+                try:
+                    # Prefer the EPSG over PROJ.4 if available
+                    epsg = int(sref.GetAuthorityCode('GEOGCS'))
+                    srs = SpatialReference(epsg=epsg)
+                except (TypeError, ValueError):
+                    pass

with a file with a SREF of :

sref= PROJCS["TM65 / Irish National Grid (deprecated)",
    GEOGCS["TM65",
        DATUM["TM65",
            SPHEROID["Airy Modified 1849",6377340.189,299.3249646,
                AUTHORITY["EPSG","7002"]],
            AUTHORITY["EPSG","6299"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.01745329251994328,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4299"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",53.5],
    PARAMETER["central_meridian",-8],
    PARAMETER["scale_factor",1.000035],
    PARAMETER["false_easting",200000],
    PARAMETER["false_northing",250000],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","29900"]]

returns 4299 which is not correct for me.

For the moment I'm commenting out this code.

Change History

02/21/07 16:16:39: Modified by cph

The relevant file is : PCL/PCL-GDAL/cartography/data/disk.py line 105

02/26/07 10:44:22: Modified by dokai

  • description changed.

09/15/07 07:43:17: Modified by dokai

  • owner changed from kai to dokai.
  • status changed from new to assigned.

Committed a possible fix at http://trac.gispython.org/projects/PCL/changeset/876 based on hobu's suggestion.

Con, would you test this with your dataset and report back.