DataReader.crs is empty with new environment?


Denise Draper
 

Hi ---

I just got a new (Windows 10) laptop, and recreated my software environment from my old laptop.  Code that had previously worked didn't.  In particular, on opening a file, I find the crs field is empty:

import rasterio
foo = rasterio.open('path_to_file.tif')
foo.crs  # returns nothing

I assume it is some sort of version difference at fault.   However, I have tried upgrading on an old machine and downgrading on the new one, and neither helped.   So far I've only looked at the rasterio version and the gdal version.  What else should I be looking at?    I use miniconda to create the software environment if that matters.

Here's a summary of version combinations that I tried

Old Windows 10 machine
rasterio version 1.0.22   gdal version 2040100 ==> crs is CRS.from_epsg(32629)

Cloud Linux VM
rasterio version 1.0.28  gdal version 3000100 ==> crs is CRS.from_epsg(32629)
rasterio version 1.1.00  gdal version 3000100 ==> crs is CRS.from_epsg(32629)

New Windows 10 machine
rasterio version 1.1.00  gdal version 3000100 ==> crs is NULL
rasterio version 1.0.28  gdal version 3000100 ==> crs is NULL

Also: I've independently verified (with gdalinfo) that the data file does have a proper CRS, which is the same from all machines.

Join main@rasterio.groups.io to automatically receive all group messages.