-
Notifications
You must be signed in to change notification settings - Fork 150
Open
Description
Is your feature request related to a problem? Please describe.
There are regular requests about writing intensity maps / exceedance intensity maps / return period maps to xarray raster data (and then netcdf files), e.g., #854, #857, #1013. The functionality is essentially already there, see util.plot.geo_im_from_array()
Describe the solution you'd like
We could separate the rasterize functionality from util.plot.geo_im_from_array() to a new function, if the interpolation used there (scipy.interpolate.griddata) is what we think makes sense. We could also make rasterizing optional, i.e. one could simply transform the point data to a 1d xarray if one wants.
def xarray_from_gdf(gdf, rasterize=True):
or more generally
def xarray_from_points(values, lon, lat, rasterize=True):
Reactions are currently unavailable