Reading a NetCDF file in two ways:
src = rasterio.open(f'NetCDF:{url}:Rad', 'r')and doingsrc.transformgives:Affine(2004.017315487541, 0.0, -5434894.700982174, 0.0, -2004.017315487541, 5434894.700982174)
Whereas reading the same file as
ncfile = xarray.open_dataset(str(url), engine='netcdf4', decode_coords="all")and doingncfile['Rad'].rio.transform()gives:Affine(5.599999810285109e-05, 0.0, -0.15187199485493216, 0.0, -5.599999810285109e-05, 0.15187199485493216)
Why is it so?
rio.open_rasterio(f'NetCDF:{url}:Rad', 'r').rio.transform()gives the same as 1 – Coddy Oct 12 '21 at 23:51