<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">Le 01/07/2022 à 19:16, Javier Jimenez
      Shaw a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CADRrdKuQF9500z84NJ2uGnveGjBG+czgr5G4vYY8Oc6yzP+pwQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>Hi</div>
        <div><br>
        </div>
        <div>I am a bit confused with "--identify" option in projinfo. I
          looked at the documentation of the method "identify" of CRS
          classes in C++ trying to understand.<br>
        </div>
        <div><br>
        </div>
        <div>Running</div>
        <div><span style="font-family:monospace">projinfo "$(projinfo
            ESRI:102654 -o WKT1:GDAL -q)" --identify -o WKT1:GDAL</span></div>
        <div>Produces <br>
        </div>
        <div><span style="font-family:monospace">PROJCS["NAD_1983_StatePlane_Colorado_Central_FIPS_0502_Feet
            (deprecated)",<br>
            ....</span></div>
        <div><span style="font-family:monospace">Identification match
            count: 1<br>
            ESRI:102654: 100 %</span></div>
        <div><br>
        </div>
        <div>so far so good.</div>
      </div>
    </blockquote>
    <span style="font-family:monospace">"projinfo ESRI:102654 -o
      WKT1:GDAL -q" generates a WKT with the ESRI:102654 authority node,
      hence it is used for identification<br>
    </span>
    <blockquote type="cite"
cite="mid:CADRrdKuQF9500z84NJ2uGnveGjBG+czgr5G4vYY8Oc6yzP+pwQ@mail.gmail.com">
      <div dir="ltr">
        <div><br>
        </div>
        <div>Running (I just changed the wkt1 dialect in the inner call)<br>
        </div>
        <div><span style="font-family:monospace">projinfo "$(projinfo
            ESRI:102654 -o WKT1:ESRI -q)" --identify -o WKT1:GDAL</span></div>
        <div>Produces</div>
        <div><span style="font-family:monospace">PROJCS["NAD83 /
            Colorado Central (ftUS)",</span></div>
        <div><span style="font-family:monospace">....</span></div>
        <div><span style="font-family:monospace">Identification match
            count: 1<br>
            EPSG:2232: 100 %</span></div>
        <div><br>
        </div>
        <div>Looking at the C++ documentation I think that a confidence
          of 100% means that the names are the same (I do not really
          know which names it refers to. Only the CRS name? geographic
          crs? datum? units? anything else? all?) <br>
        </div>
      </div>
    </blockquote>
    <p><span style="font-family:monospace">"projinfo ESRI:102654 -o
        WKT1:ESRI -q" strips the authority node (this is canonical for
        ESRI WKT), so for identification PROJ relies on the CRS name (to
        start with). The reason to match EPSG:2232 here is this entry in
        the database:<br>
        <br>
        ../data/sql/esri.sql:INSERT INTO alias_name
VALUES('projected_crs','EPSG','2232','NAD_1983_StatePlane_Colorado_Central_FIPS_0502_Feet','ESRI');<br>
        <br>
        which is added when importing the ESRI database where they link
        their deprecated code to the EPSG entry</span></p>
    <p><span style="font-family:monospace">I'm not sure to remember why
        it chooses the entry corresponding to the alias rather than
        ESRI:102654. Probably the fact that ESRI:102654 is deprecated.<br>
      </span></p>
    <br>
    <blockquote type="cite"
cite="mid:CADRrdKuQF9500z84NJ2uGnveGjBG+czgr5G4vYY8Oc6yzP+pwQ@mail.gmail.com">
      <div dir="ltr">
        <div>If I use this WKT string (the ESRI one, but adding the
          authority at the end -I found it somewhere-)<br>
        </div>
        <div><br>
        </div>
        <div><span style="font-family:monospace">PROJCS["NAD_1983_StatePlane_Colorado_Central_FIPS_0502_Feet",</span></div>
        <div><span style="font-family:monospace"> 
            GEOGCS["GCS_North_American_1983",</span></div>
        <div><span style="font-family:monospace">   
            DATUM["D_North_American_1983",</span></div>
        <div><span style="font-family:monospace">     
            SPHEROID["GRS_1980",6378137.0,298.257222101]],</span></div>
        <div><span style="font-family:monospace">   
            PRIMEM["Greenwich",0.0],</span></div>
        <div><span style="font-family:monospace">   
            UNIT["Degree",0.0174532925199433]],</span></div>
        <div><span style="font-family:monospace"> 
            PROJECTION["Lambert_Conformal_Conic"],</span></div>
        <div><span style="font-family:monospace"> 
            PARAMETER["False_Easting",3000000.00031608],</span></div>
        <div><span style="font-family:monospace"> 
            PARAMETER["False_Northing",999999.999996],</span></div>
        <div><span style="font-family:monospace"> 
            PARAMETER["Central_Meridian",-105.5],</span></div>
        <div><span style="font-family:monospace"> 
            PARAMETER["Standard_Parallel_1",38.45],</span></div>
        <div><span style="font-family:monospace"> 
            PARAMETER["Standard_Parallel_2",39.75],</span></div>
        <div><span style="font-family:monospace"> 
            PARAMETER["Latitude_Of_Origin",37.8333333333333],</span></div>
        <div><span style="font-family:monospace">  UNIT["US survey
            foot",0.304800609601219],</span></div>
        <div><span style="font-family:monospace"> 
            AUTHORITY["ESRI","102654"]]</span></div>
        <div><span style="font-family:monospace"><br>
          </span></div>
        <div>Produces</div>
        <div><span style="font-family:monospace">PROJCS["NAD83 /
            Colorado Central (ftUS)",</span></div>
        <div><span style="font-family:monospace">...</span></div>
        <div><span style="font-family:monospace">Identification match
            count: 1<br>
            ESRI:102654: 100 %</span></div>
        <div><br>
        </div>
        <div>It is also changing the name to the one in EPSG, returning
          the ESRI code, and with a confidence of 100%</div>
      </div>
    </blockquote>
    <p>When there's a code and the provided CRS is equivalent to the one
      built from the code, the code is trusted.</p>
    <p>Regarding the change of name to the one of EPSG, that's due to
      the morphing done by PROJ when importing ESRI WKT to use EPSG
      CRS/datum/projection method/projection parameter names.  The
      reverse morphing is done when exporting to ESRI WKT.<br>
    </p>
    <blockquote type="cite"
cite="mid:CADRrdKuQF9500z84NJ2uGnveGjBG+czgr5G4vYY8Oc6yzP+pwQ@mail.gmail.com">
      <div dir="ltr">
        <div><br>
        </div>
        <div>Is all that intended? Maybe I misunderstood the meaning of
          the confidence percentage.<br>
        </div>
      </div>
    </blockquote>
    Overall yes what you observe is intended. It is really difficult to
    document every aspect of what some functions does, as there are a
    lot of heuristics added to make things work smoothly and describing
    everything can be confusing (and here there are considerations
    related to import/export of ESRI WKT in additions of purely
    identification issues). But documentation contributions that could
    makes things clearer are welcome. Perhaps the doc could be modified
    to indicate that 100% also takes into account registered alias
    names.<br>
    <blockquote type="cite"
cite="mid:CADRrdKuQF9500z84NJ2uGnveGjBG+czgr5G4vYY8Oc6yzP+pwQ@mail.gmail.com">
      <div dir="ltr">
        <div><br>
        </div>
        <div>Thanks.<br>
        </div>
        .___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ... .... ._ .__<br>
        <div>
          <div>
            <div dir="ltr" data-smartmail="gmail_signature">Entre dos
              pensamientos racionales <br>
              hay infinitos pensamientos irracionales.<br>
              <br>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
PROJ mailing list
<a class="moz-txt-link-abbreviated" href="mailto:PROJ@lists.osgeo.org">PROJ@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/proj">https://lists.osgeo.org/mailman/listinfo/proj</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </body>
</html>