ThinkGeo.com    |     Documentation    |     Premium Support

Can't get SRID from Proj

Seems none of these methods to get srid work in v14. The prj is direct input from a valid .prj file and the converted proj string in line 2 looks correct. All the methods to get srid return -1. Why do you have so many methods that appear to be equivalent in the first place?

        string prj = "PROJCS[\"WGS_1984_UTM_Zone_15N\",GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",-93],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"Meter\",1]]\r\n";
        string proj = Projection.ConvertWktToProjString(prj);

        // None of these methods work!
        int srid = Projection.GetEpsgSridByProjString(proj);            
        srid = Projection.GetEpsgSridByProjString(prj);            
        srid = Projection.ConvertProjStringToEpsg(prj);
        srid = Projection.ConvertProjStringToEpsg(proj);
        srid = Projection.GetEsriSridByProjString(proj);
        srid = Projection.GetEsriSridByProjString(prj);

Regards,
Damian

It’s recreated and we need to dig in a bit, will keep you posted.

It’s been a while Ben. Do you have an update?

We found the cause of it but it’s not that easy to fix. We will work on it after the v14.4 release (next month).