<div dir="ltr">Thanks! That's an interesting link. It led me to thinking of trying something like this: <div>1) Go fetch a flat file from the repo at <a href="https://github.com/Esri/projection-engine-db-doc">https://github.com/Esri/projection-engine-db-doc</a> (CSV, JSON, whatever)</div><div>2) Parse it out and create essentially a static set of lookup tables/dictionaries. Match wkid/latestWkid to an authority field.</div><div><br></div><div>Something like wkid 20002 looks up in PROJ as ESRI:20002.</div><div><pre style="color:rgb(0,0,0);white-space:pre-wrap">{ "wkid": 20002,
    "latestWkid": 20002,
    "macro": "PE_PCS_PULKOVO_1995_GK_2",
    "name": "Pulkovo_1995_GK_Zone_2",
    "wkt": "PROJCS[\"Pulkovo_1995_GK_Zone_2\",GEOGCS[\"GCS_Pulkovo_1995\",DATUM[\"D_Pulkovo_1995\",SPHEROID[\"Krasovsky_1940\",6378245.0,298.3]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Gauss_Kruger\"],PARAMETER[\"False_Easting\",2500000.0],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",9.0],PARAMETER[\"Scale_Factor\",1.0],PARAMETER[\"Latitude_Of_Origin\",0.0],UNIT[\"Meter\",1.0]]",
    "wkt2": "PROJCRS[\"Pulkovo_1995_GK_Zone_2\",BASEGEOGCRS[\"GCS_Pulkovo_1995\",DATUM[\"D_Pulkovo_1995\",ELLIPSOID[\"Krasovsky_1940\",6378245.0,298.3,LENGTHUNIT[\"Meter\",1.0]]],PRIMEM[\"Greenwich\",0.0,ANGLEUNIT[\"Degree\",0.0174532925199433]],CS[ellipsoidal,2],AXIS[\"Latitude (lat)\",north,ORDER[1]],AXIS[\"Longitude (lon)\",east,ORDER[2]],ANGLEUNIT[\"Degree\",0.0174532925199433]],CONVERSION[\"Gauss_Kruger\",METHOD[\"Gauss_Kruger\"],PARAMETER[\"False_Easting\",2500000.0,LENGTHUNIT[\"Meter\",1.0]],PARAMETER[\"False_Northing\",0.0,LENGTHUNIT[\"Meter\",1.0]],PARAMETER[\"Central_Meridian\",9.0,ANGLEUNIT[\"Degree\",0.0174532925199433]],PARAMETER[\"Scale_Factor\",1.0,SCALEUNIT[\"Unity\",1.0]],PARAMETER[\"Latitude_Of_Origin\",0.0,ANGLEUNIT[\"Degree\",0.0174532925199433]]],CS[Cartesian,2],AXIS[\"Easting (X)\",east,ORDER[1]],AXIS[\"Northing (Y)\",north,ORDER[2]],LENGTHUNIT[\"Meter\",1.0]]",
    "description": "Pulkovo 1995 GK Zone 2",
    "authority": "Esri",
    "version": "8.0.1",
    "deprecated": "no",
    "areaname": "Europe - 6~E to 12~E and Pulkovo by country",
    "extent":
    { "slat": 50.21,
      "nlat": 54.18,
      "llon": 9.93,
      "rlon": 12.0
    }
  },</pre></div><div><br></div><div>But I did run into a bit of a counterexample with 9712. In PROJ it doesn't look up under ESRI:9712 but as ESPG:9712, despite the authority value being "Esri". I wonder if it's just an error on account of the ESRI docs not updating their field, or maybe something with how PROJ imports its ESRI values (I'm not familiar with that process myself as it might use some other data source?).<br><div><br></div><div><pre style="color:rgb(0,0,0);white-space:pre-wrap">{ "wkid": 9712,
    "latestWkid": 9712,
    "macro": "PE_PCS_NAD83_UTM_24N",
    "name": "NAD_1983_UTM_Zone_24N",
    "wkt": "PROJCS[\"NAD_1983_UTM_Zone_24N\",GEOGCS[\"GCS_North_American_1983\",DATUM[\"D_North_American_1983\",SPHEROID[\"GRS_1980\",6378137.0,298.257222101]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_Easting\",500000.0],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",-39.0],PARAMETER[\"Scale_Factor\",0.9996],PARAMETER[\"Latitude_Of_Origin\",0.0],UNIT[\"Meter\",1.0]]",
    "wkt2": "PROJCRS[\"NAD_1983_UTM_Zone_24N\",BASEGEOGCRS[\"GCS_North_American_1983\",DATUM[\"D_North_American_1983\",ELLIPSOID[\"GRS_1980\",6378137.0,298.257222101,LENGTHUNIT[\"Meter\",1.0]]],PRIMEM[\"Greenwich\",0.0,ANGLEUNIT[\"Degree\",0.0174532925199433]],CS[ellipsoidal,2],AXIS[\"Latitude (lat)\",north,ORDER[1]],AXIS[\"Longitude (lon)\",east,ORDER[2]],ANGLEUNIT[\"Degree\",0.0174532925199433]],CONVERSION[\"Transverse_Mercator\",METHOD[\"Transverse_Mercator\"],PARAMETER[\"False_Easting\",500000.0,LENGTHUNIT[\"Meter\",1.0]],PARAMETER[\"False_Northing\",0.0,LENGTHUNIT[\"Meter\",1.0]],PARAMETER[\"Central_Meridian\",-39.0,ANGLEUNIT[\"Degree\",0.0174532925199433]],PARAMETER[\"Scale_Factor\",0.9996,SCALEUNIT[\"Unity\",1.0]],PARAMETER[\"Latitude_Of_Origin\",0.0,ANGLEUNIT[\"Degree\",0.0174532925199433]]],CS[Cartesian,2],AXIS[\"Easting (X)\",east,ORDER[1]],AXIS[\"Northing (Y)\",north,ORDER[2]],LENGTHUNIT[\"Meter\",1.0]]",
    "description": "NAD 1983 UTM Zone 24N",
    "authority": "Esri",
    "version": "12.9.0",
    "deprecated": "no",
    "areaname": "Canada - east of 42~W",
    "extent":
    { "slat": 45.53,
      "nlat": 49.53,
      "llon": -42.0,
      "rlon": -40.73
    }
  },</pre><div><pre style="color:rgb(0,0,0);white-space:pre-wrap"><font face="arial, sans-serif">With the existence of the counterexample, trying ESRI:CODE or ESPG:CODE and hoping for the best still remains a viable option. Though the ESRI data dump DOES provide the WKT as an alternative to the lookup method too!</font></pre></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 27, 2022 at 1:32 AM Javier Jimenez Shaw <<a href="mailto:j1@jimenezshaw.com">j1@jimenezshaw.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi Peter</div><div><br></div><div>Looking at <a href="https://jjimenezshaw.github.io/crs-explorer/?ignoreWorld=false&allowDeprecated=false&authorities=ESRI&activeTypes=PROJECTED_CRS,GEOGRAPHIC_2D_CRS,GEOGRAPHIC_3D_CRS,GEOCENTRIC_CRS,GEODETIC_CRS,VERTICAL_CRS,COMPOUND_CRS,CRS" target="_blank">https://jjimenezshaw.github.io/crs-explorer/?ignoreWorld=false&allowDeprecated=false&authorities=ESRI&activeTypes=PROJECTED_CRS,GEOGRAPHIC_2D_CRS,GEOGRAPHIC_3D_CRS,GEOCENTRIC_CRS,GEODETIC_CRS,VERTICAL_CRS,COMPOUND_CRS,CRS</a></div><div>You can see there are some of them below 32767 (allow deprecated to get some more)<br></div><div><br></div><div>In this other project <a href="https://jjimenezshaw.github.io/Esri-codes-analyzer/not-deprecated-esri.html" target="_blank">https://jjimenezshaw.github.io/Esri-codes-analyzer/not-deprecated-esri.html</a> the data from ESRI is listed. See the GitHub repo to see from where is it getting the data (PROJ is using the same source). Maybe you can get more useful information there.<br></div><div><br></div><div>Cheers,</div><div>Javier<br></div><div><div><div dir="ltr">.___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ... .... ._ .__<br>Entre dos pensamientos racionales <br>hay infinitos pensamientos irracionales.<br><br></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 27 Apr 2022 at 00:21, Peter Townsend via PROJ <<a href="mailto:proj@lists.osgeo.org" target="_blank">proj@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Greetings! I'm going to be responding to calls to a FeatureServer and it gives me back a response that looks like this:</div><div><br></div><div>{<br>  "objectIdFieldName": "objectid",<br>  "globalIdFieldName": "",<br>  "geometryType": "esriGeometryPoint",<br>  "spatialReference": {<br>    "wkid": 26949,<br>    "latestWkid": 26949<br>  },<br>  "fields": [<br>    {<br>      "name": "objectid",<br>      "alias": "OBJECTID",<br>      "type": "esriFieldTypeOID"<br>    },<br>    ...<br>  ],<br>  "features": [<br>    {<br>      "attributes": {<br>        "objectid": 1,<br>        "cities_lam": 25552,<br>        "cities_l_1": 25552,<br>        "citiesx020": 25552,<br>        "feature": "Populated Place",<br>        "name": "Harris",<br>        "pop_range_": "Undetermined",<br>        "pop_90": -99999,<br>        "pop_98": -99999,<br>        "fips55": "31320",<br>        "county": "Mohave County",<br>        "fips": "04015",<br>        "state": "AZ",<br>        "state_fips": "04",<br>        "display": 0<br>      },<br>      "geometry": {<br>        "x": 15704.363599999808,<br>        "y": 460919.1546<br>      }<br>    },<br>    ...<br>  ]<br>}<br clear="all"><div><br></div><div>It's obviously ESRI related. The problem is the "wkid"/"latestWkid" field. We'd like to turn that into a PROJ CRS lookup. In the case of 26949, it turns out to match up nicely to EPSG:26949, aka "NAD83 / Arizona Central". In the ARCGIS docs, it has the name "NAD_1983_StatePlane_Arizona_Central_FIPS_0202". A PROJ CRS lookup by that name also returns EPSG:26949.</div><div><br></div><div>But then consider WKID 102649. It's outside of the EPSG code range, right? So EPSG:102649 doesn't turn up anything. But it is findable under ESRI:102649, with the name "NAD_1983_StatePlane_Arizona_Central_FIPS_0202_Feet".</div><div><br></div><div>My question is thus, is it safe to assume that if I encounter an ESRI wkid greater than 32767 that I should try looking it up with the ESRI authority? And less than or equal, that it is the same as the EPSG code?</div><div><br></div><div>A quick search through the list history found me a semi-related question from 11 years ago that kind of implies this, so it wouldn't hurt to ask again.</div><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div>Peter Townsend<br></div>Senior Software Developer<br></div></div></div></div>
_______________________________________________<br>
PROJ mailing list<br>
<a href="mailto:PROJ@lists.osgeo.org" target="_blank">PROJ@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/proj" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/proj</a><br>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Peter Townsend<br></div>Senior Software Developer<br></div></div>