Opened 9 years ago

Closed 7 years ago

#5955 closed enhancement (fixed)

Cannot retrieve EPSG authority from stateplane projections via via PRJ name

Reported by: christapley Owned by: warmerdam
Priority: normal Milestone: 2.3.0
Component: OGR_SRS Version: 1.11.0
Severity: normal Keywords: stateplane srs epsg prj
Cc:

Description

e.g.:

OGRErr eError = oSRS.ImportFromESRIStatePlaneWKT(0, NULL, NULL, 32767, "NAD_1983_HARN_StatePlane_Alabama_East_FIPS_0101"));
oError = oSRS.AutoIdentifyEPSG();
// oError == 7

We have modified the relevant .csv files so that EPSG Authority tags are present for the projections that have EPSG definitions and with that change the code above works.

Please see the attached files.

Thanks!

Attachments (1)

esri_StatePlane.zip (22.3 KB ) - added by christapley 9 years ago.

Download all attachments as: .zip

Change History (5)

by christapley, 9 years ago

Attachment: esri_StatePlane.zip added

comment:1 by Even Rouault, 9 years ago

I'm not completely convinced this is a good idea to add AUTHORITY EPSG for ESRI specific codes... And when comparing to the current files, it seems you have added done many other changes than just adding AUTHORITY. How has this file been generated ?

comment:2 by christapley, 9 years ago

Hello,

It was only added for CRS's that have an EPSG code defined. As users of GDAL we find this behavior more useful. The ID was also changed to match the EPSG. We thought this was the convention (e.g. pcs.csv). If this is not I can change the ID's back so the only thing that changes is the additional EPSG authority for relevant CRS's.

Thanks,

Chris

comment:3 by Even Rouault, 7 years ago

Fixed per https://trac.osgeo.org/gdal/changeset/40207

$ gdalsrsinfo -e ESRI::'PROJCS[""NAD_1983_HARN_StatePlane_Alabama_East_FIPS_0101"",GEOGCS[""GCS_North_American_1983_HARN"",DATUM[""D_North_American_1983_HARN"",SPHEROID[""GRS_1980"",6378137.0,298.257222101]],PRIMEM[""Greenwich"",0.0],UNIT[""Degree"",0.0174532925199433]],PROJECTION[""Transverse_Mercator""],PARAMETER[""False_Easting"",200000.0],PARAMETER[""False_Northing"",0.0],PARAMETER[""Central_Meridian"",-85.83333333333333],PARAMETER[""Scale_Factor"",0.99996],PARAMETER[""Latitude_Of_Origin"",30.5],UNIT[""Meter"",1.0]]'

EPSG:2759

PROJ.4 : +proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.99996 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs 

OGC WKT :
PROJCS["NAD83(HARN) / Alabama East",
    GEOGCS["NAD83(HARN)",
        DATUM["NAD83_High_Accuracy_Reference_Network",
            SPHEROID["GRS 1980",6378137,298.257222101,
                AUTHORITY["EPSG","7019"]],
            TOWGS84[0,0,0,0,0,0,0],
            AUTHORITY["EPSG","6152"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4152"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",30.5],
    PARAMETER["central_meridian",-85.83333333333333],
    PARAMETER["scale_factor",0.99996],
    PARAMETER["false_easting",200000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AXIS["X",EAST],
    AXIS["Y",NORTH],
    AUTHORITY["EPSG","2759"]]

comment:4 by Even Rouault, 7 years ago

Milestone: 2.3.0
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.