Closed cbur24 closed 5 years ago
The data-arrays inside the returned xarray dataset from load_ard do not retain the crs/geobox attributes.
load_ard
reproducible example (run on the sandbox):
import datacube import sys sys.path.append("../Scripts") from dea_datahandling import load_ard query = { 'x': (153.40, 153.45), 'y': (-28.85, -28.90), 'time': ('2018-01', '2018-03'), 'measurements': ['nbart_red', 'nbart_green', 'nbart_blue'], 'output_crs': 'EPSG:3577', 'resolution': (-30, 30), 'group_by': 'solar_day' } dc = datacube.Datacube(app="test") ds = load_ard(dc=dc, **query, products=['ga_ls8c_ard_3']) #select data array from dataset da = ds.nbart_red.isel(time=1) print(da.crs)
Suspect that this is being caused by a bug in xarray. Have created an issue here, will see what they come back with: https://github.com/pydata/xarray/issues/3348
The data-arrays inside the returned xarray dataset from
load_ard
do not retain the crs/geobox attributes.reproducible example (run on the sandbox):