I am new to xarray/rioxarray (more familiar with rasterio) so apologies if my question is naïve. I am trying to merge two overlapping datasets (two images with many bands). They seem to open fine (I can visualize them) but when I try to merge them I get this error:
"AttributeError: 'DataArray' object has no attribute 'data_vars'"
here is my code:
path = 'path'
file1 = 'file.dat'
cube1 = xr.open_dataarray(path+file1,engine='rasterio')
file2 = 'file.dat'
cube2 = xr.open_dataarray(path+file2,engine='rasterio')
ds = [
cube1,
cube2,
]
merged = merge_datasets(ds)
Do I need to specify data_vars when I import them? would that be a dictionary of bands?
source https://stackoverflow.com/questions/73886773/do-i-need-to-specify-data-vars-when-i-import-multi-band-images-with-xarray-ras
Comments
Post a Comment