I am reading in a single band raster using xarray
. Is there a way to not have band
be a dimension and just have the x and y coordinates as dimensions?
Asked
Active
Viewed 83 times
0

user308827
- 21,227
- 87
- 254
- 417
1 Answers
1
You mean directly when reading the file?
Because you can always do this after reading the file:
ds = ds.sel(band = 1)
It should return a dataset with only x and y as coords.

Ruben Calvo
- 38
- 4
-
Or, just use `ds.squeeze()` – Val Mar 18 '22 at 09:05