Open scene-mosaic opened 1 year ago
I resolved this by adding these two lines, which uses numpy to vertically flip the data:
rem_flipped = xr.DataArray(np.flipud(rem.values), dims=rem.dims, coords=rem.coords)
cropped_flipped = xr.DataArray(np.flipud(cropped.values), dims=cropped.dims, coords=cropped.coords)
and then using the 'flipped' versions to create the final outputs:
colors = ['#f2f7fb', '#81a8cb', '#37123d']
shade(rem_flipped.squeeze(), cmap=colors, span=[0, 20], how='linear')
a = shade(xrspatial.hillshade(cropped_flipped.squeeze(), angle_altitude=1, azimuth=250), cmap=['black', 'white'], how='linear')
b = shade(rem_flipped.squeeze(), cmap=colors, span=[0, 10], how='linear', alpha=200)
stack(a, b)
The code flips the product images at the end. Flips the y-axis, it seems.