umr-lops / xsar

Synthetic Aperture Radar (SAR) Level-1 GRD python mapper for efficient xarray/dask based processing
https://cyclobs.ifremer.fr/static/sarwing_datarmor/xsar/
MIT License
28 stars 8 forks source link

`ds.rio.reproject('epsg:4326',...)` broken for IW GRDH product #124

Closed agrouaze closed 1 year ago

agrouaze commented 1 year ago

Before the following snippet would gives:

#xsar_obj.dataset['sigma0_rgba'] = rgb_sigma0
rgb_sigma0.name = 'sigma0_rgba'
xsar_obj.datatree['measurement'] = xsar_obj.datatree['measurement'].assign(xr.merge([xsar_obj.dataset,rgb_sigma0]))
xsar_obj.recompute_attrs()
xsar_obj.dataset['sigma0_rgba'].rio.reproject('epsg:4326',shape=(1000,1000),nodata=0).rio.to_raster('/tmp/sigma0_color.tiff')

image

But with latest release #118 the reprojection is broken: image