[PROJ] confidence % in projinfo --identify

Even Rouault even.rouault at spatialys.com
Fri Jul 1 10:47:47 PDT 2022


Le 01/07/2022 à 19:16, Javier Jimenez Shaw a écrit :
> Hi
>
> 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.
>
> Running
> projinfo "$(projinfo ESRI:102654 -o WKT1:GDAL -q)" --identify -o WKT1:GDAL
> Produces
> PROJCS["NAD_1983_StatePlane_Colorado_Central_FIPS_0502_Feet (deprecated)",
> ....
> Identification match count: 1
> ESRI:102654: 100 %
>
> so far so good.
"projinfo ESRI:102654 -o WKT1:GDAL -q" generates a WKT with the 
ESRI:102654 authority node, hence it is used for identification
>
> Running (I just changed the wkt1 dialect in the inner call)
> projinfo "$(projinfo ESRI:102654 -o WKT1:ESRI -q)" --identify -o WKT1:GDAL
> Produces
> PROJCS["NAD83 / Colorado Central (ftUS)",
> ....
> Identification match count: 1
> EPSG:2232: 100 %
>
> 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?)

"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:

../data/sql/esri.sql:INSERT INTO alias_name 
VALUES('projected_crs','EPSG','2232','NAD_1983_StatePlane_Colorado_Central_FIPS_0502_Feet','ESRI');

which is added when importing the ESRI database where they link their 
deprecated code to the EPSG entry

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.


> If I use this WKT string (the ESRI one, but adding the authority at 
> the end -I found it somewhere-)
>
> PROJCS["NAD_1983_StatePlane_Colorado_Central_FIPS_0502_Feet",
> 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["Lambert_Conformal_Conic"],
> PARAMETER["False_Easting",3000000.00031608],
> PARAMETER["False_Northing",999999.999996],
> PARAMETER["Central_Meridian",-105.5],
> PARAMETER["Standard_Parallel_1",38.45],
> PARAMETER["Standard_Parallel_2",39.75],
> PARAMETER["Latitude_Of_Origin",37.8333333333333],
>   UNIT["US survey foot",0.304800609601219],
> AUTHORITY["ESRI","102654"]]
>
> Produces
> PROJCS["NAD83 / Colorado Central (ftUS)",
> ...
> Identification match count: 1
> ESRI:102654: 100 %
>
> It is also changing the name to the one in EPSG, returning the ESRI 
> code, and with a confidence of 100%

When there's a code and the provided CRS is equivalent to the one built 
from the code, the code is trusted.

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.

>
> Is all that intended? Maybe I misunderstood the meaning of the 
> confidence percentage.
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.
>
> Thanks.
> .___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ... .... ._ .__
> Entre dos pensamientos racionales
> hay infinitos pensamientos irracionales.
>
>
> _______________________________________________
> PROJ mailing list
> PROJ at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/proj

-- 
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20220701/8e1d9d5c/attachment.htm>


More information about the PROJ mailing list