You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like reprojecting is happening before masking no data. Not sure this is urgent but wanted to put it on the radar. Given the way nodata is implemented could we just run mask_nodata() before projection?
import geowombat as gw
import matplotlib.pyplot as plt
from geowombat.data import l8_224078_20200518
fig, ax = plt.subplots(dpi=200)
# set desired CRS with config.update
with gw.config.update(ref_crs='epsg:32618'):
# define resampling method
with gw.open(l8_224078_20200518,
resampling='cubic',
nodata=0) as src:
print(src.crs)
src.gw.mask_nodata().plot.imshow(robust=True, ax=ax)
plt.tight_layout(pad=1)
The text was updated successfully, but these errors were encountered:
Thanks, I'll look into this. I think this is happening in WarpedVRT because we pass nodata and the destination CRS and transform to that rasterio method. And this occurs with method='cubic' because 0s (nodata in this image) are converted to 1s.
@jgrss
It looks like reprojecting is happening before masking no data. Not sure this is urgent but wanted to put it on the radar. Given the way
nodata
is implemented could we just runmask_nodata()
before projection?The text was updated successfully, but these errors were encountered: