Skip to content

Add Functionality to convert gdf and point data to xarray #1035

@ValentinGebhart

Description

@ValentinGebhart

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):

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions