<div dir="ltr"><div>Hi</div><div><br></div><div>I would like to understand why do I have different behaviour recognizing a WKT between GDAL 3.9.2 and 3.11.1, both using PROJ 9.5.0 (using C++)</div><div><br></div><div>There is a clear mistake in the WKT bellow: EPSG:102641 . It should be ESRI. But the source of the data was wrong, and we worked with that for a long time.</div><div><br></div><div>PROJCS["NAD_1983_StatePlane_California_I_FIPS_0401_Feet",GEOGCS["GCS_North_American_1983",DATUM["North_American_Datum_1983",</div><div>SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Lambert_Conformal_Conic_2SP"],</div><div>PARAMETER["False_Easting",6561666.666666666],PARAMETER["False_Northing",1640416.666666667],PARAMETER["Central_Meridian",-122],</div><div>PARAMETER["Standard_Parallel_1",40],PARAMETER["Standard_Parallel_2",41.66666666666666],PARAMETER["Latitude_Of_Origin",39.33333333333334],</div><div>UNIT["Foot_US",0.30480060960121924],AUTHORITY["EPSG","102641"]]</div><div><br></div><div>and yes, ESRI version of WKT does not have AUTHORITY. Again, the data source is what it is.</div><div><br></div><div>My failing test is because OGRCreateCoordinateTransformation called with EPSG:4326 and calStatePlaneCS (created with SetFromUserInput) is failing.</div><div>The reason I found is in GetTextRepresentation in ogrct.cpp. There it checks (if I understood correctly) if EPSG:102641 and the OGRSpatialReference constructed from the string are equivalent.</div><div>In GDAL 3.9.2 the function IsSame is returning false, and GetTextRepresentation is trying later with PROJJSON</div><div>In GDAL 3.11.1 the function IsSame returns true, and it is using EPSG:102641, that fails later in OGRProjCT::Initialize (more in particular in auto targetCRS = proj_create(ctx, pszTargetSRS);)</div><div><br></div><div>See that I am not changing the version of PROJ: 9.5.0</div><div><br></div><div>I have been looking for any change in GDAL code that would explain why the wrong "WKT from California" behaves differently, but I couldn't find anything. The changes in the code in ogrct.cpp and ogrspatialreference.cpp that I think are involved are years old (just a thread safe lock changed). But obviously I am missing something.</div><div><br></div><div>Could you help me?</div><div><br></div><div>Thanks.</div><div>Javier</div></div>