Open remicres opened 1 week ago
@remicres thanks for the report! On my Macbook, I don't see a problem.
rio insp https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/raw/develop/Data/Input/SP67_FR_subset_1.tif
Rasterio 1.4.2 Interactive Inspector (Python 3.11.6)
Type "src.meta", "src.read(1)", or "help(src)" for more information.
>>> src.crs
CRS.from_wkt('PROJCS["RGF93 v1 / Lambert-93",GEOGCS["RGF93 v1",DATUM["Reseau_Geodesique_Francais_1993_v1",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4171"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",3],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",44],PARAMETER["false_easting",700000],PARAMETER["false_northing",6600000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","2154"]]')
>>> src.crs.to_epsg()
2154
>>> src.crs.is_epsg_code
True
But in an ubuntu-small-3.9.3 GDAL container I do see almost the same thing you report.
rio insp https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/raw/develop/Data/Input/SP67_FR_subset_1.tif
Rasterio 1.4.3dev Interactive Inspector (Python 3.9.20)
Type "src.meta", "src.read(1)", or "help(src)" for more information.
>>> src.crs
CRS.from_wkt('PROJCS["RGF93 v1 / Lambert-93",GEOGCS["RGF93 v1",DATUM["Reseau_Geodesique_Francais_1993_v1",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4171"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",3],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",44],PARAMETER["false_easting",700000],PARAMETER["false_northing",6600000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","2154"]]')
>>> src.crs.to_epsg()
>>> src.crs.is_epsg_code
False
On ubuntu 22.04 the change seems to occur between versions 1.4.1 and 1.4.2
Expected behavior and actual behavior.
I expected that the following code would result in the same outcome for rasterio 1.3.10 and 1.4.2. But no :cry:
Steps to reproduce the problem.
Output:
True
False
Strangely calling
to_epsg()
gives the correct EPSG code (2154) for both considered rasterio versions.Environment Information
rio --show-versions
orpython -c "import rasterio; rasterio.show_versions()"
Installation Method
pip install from an ubuntu 22.04 docker image