Re: Is it possible to create a rasterio object without exporting a file?


Alan Snow
 

Hi Leah,

So, this project uses xarray which has many similar operations to numpy, but with slight differences.
In the case of the example, the `drop=True` is an option they provide that is described here:
http://xarray.pydata.org/en/stable/generated/xarray.DataArray.where.html

For numpy, it is not as simple if I remember correctly for a 2D array. An example of doing this is here:
https://github.com/CI-WATER/gsshapy/blob/00fd4af0fd65f1614d75a52fe950a04fb0867f4c/gsshapy/grid/grid_to_gssha.py#L616-L631

Hopefully this is helpful and gets you in the right direction.

Best,
Alan

Join main@rasterio.groups.io to automatically receive all group messages.