Skip to content
Snippets Groups Projects
Commit 9d78cbf2 authored by Jérémy AUCLAIR's avatar Jérémy AUCLAIR
Browse files

Fixed georeferencing bug.

parent 8912a608
No related branches found
No related tags found
No related merge requests found
......@@ -199,6 +199,7 @@ def download_ndvi_imagery(config_file: str, interp_chunk: dict = {'x': 400, 'y':
else:
file_chunksize = (1, ndvi.dims['y'], ndvi.dims['x'])
ndvi.attrs['crs'] = ndvi.rio.crs.to_string()
write_job = ndvi.to_netcdf(ndvi_cube_path, encoding = {"NDVI": {"dtype": "u1", "_FillValue": 0, "chunksizes": file_chunksize}}, compute = False)
write_job = write_job.persist()
......
......@@ -856,6 +856,7 @@ def era5Land_daily_to_yearly_pixel(list_era5land_files: List[str], output_file:
final_weather_ds.rio.write_crs(target_crs, inplace = True)
final_weather_ds.rio.write_transform(inplace = True)
final_weather_ds['spatial_ref'] = spatial_ref
final_weather_ds.attrs['crs'] = final_weather_ds.rio.crs.to_string()
final_weather_ds = final_weather_ds.set_coords('spatial_ref')
# Save empty output
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment