xarray_leaflet
xarray_leaflet copied to clipboard
Default CRS and nodata
When a DataArray is passed without any CRS, we could assume that it is WGS 84 and write it automatically. Same for nodata, we could assume it's np.nan (if the type of the data is floating-point):
da = da.rio.write_crs(4326) # WGS 84
da = da.rio.write_nodata(np.nan)
See #34