rioxarray
rioxarray copied to clipboard
geospatial xarray extension powered by rasterio
Related to: https://github.com/pangeo-data/cog-best-practices/issues/2 https://github.com/pangeo-data/cog-best-practices/blob/main/4-threads-vs-async.ipynb Sounds like it would be worth digging into and seeing what could be improved.
https://pyproj4.github.io/pyproj/stable/build_crs_cf.html
#### Code Sample Example file: [ftp://ftp.climato.be/fettweis/MARv3.11/Greenland/ERA_1958-2019-10km/daily_10km/MARv3.11-20km-daily-ERA-10km-2016.nc](ftp://ftp.climato.be/fettweis/MARv3.11/Greenland/ERA_1958-2019-10km/daily_10km/MARv3.11-20km-daily-ERA-10km-2016.nc) ```python import rioxarray as rxr ds = rxr.open_rasterio('MARv3.11.2-6km-daily-ERA5-2016.nc') --------------------------------------------------------------------------- ValueError Traceback (most recent call last) in ----> 1 mar = rxr.open_rasterio('MARv3.11.2-6km-ERA5/MARv3.11.2-6km-daily-ERA5-2016.nc', mask_and_scale=False, parse_coordinates=False) ~/miniconda3/envs/geospatial/lib/python3.7/site-packages/rioxarray/_io.py...
#### Code Sample, a copy-pastable example if possible ```python import rioxarray import xarray xds = xarray.open_dataarray("test/test_data/input/MODIS_ARRAY.nc") # xds.shape is (200, 200) bounds = xds.rio.bounds() xdsc = xds.rio.pad_box( minx=bounds[0], miny=bounds[1], maxx=bounds[2],...
Currently there are band-specific attributes stored in the `attrs`. However, this can be potentially lossy when performing xarray operations. So, I am thinking about storing them in the coordinates as...
Hey @snowman2, I have also been playing around with the xarray for geospatial fuctionality as well which you can access at [xgeo](https://geosynopsis.github.io/xgeo). As rightfully pointed out by @djhoese in xarray...
Using the following netcdf file for input: [https://drive.google.com/file/d/1GNWuRPm1mWVXgQsqtgl1wiZFv0evTw2x/view?usp=sharing](url) If I read in the netcdf file an plot it, I get this image ``` import xarray as xr original_file = test_nc.nc'...
For creating simple tests I would like to have/ get a simple method to construct DataArray in Rioarray. For example with: `DataArray(data=np.ones([1, 5, 5], np.uint8), dims=("band", "y", "x"), transform=affine)` or...
Currently there is https://corteva.github.io/rioxarray/stable/getting_started/getting_started.html#reading-files I would propose to amend the above for a quick example of reading from cloud storage e.g. `xds = xarray.open_dataset("s3://bucket/my.tif", engine="rasterio")` It would be good to...
#### Code Sample, a copy-pastable example if possible ```python import rioxarray as rxr from rasterio.enums import Resampling original_tif_fpath = './original.tif' target_tif_fpath = './target.tif' original_ds = rxr.open_rasterio(original_tif_fpath) target_ds = rxr.open_rasterio(target_tif_fpath) print(f'Original:...