xarray.Dataset.hyoga.profile#
- Dataset.hyoga.profile(datasource, interval=None)#
Interpolate onto coordinates along a profile.
- Parameters:
datasource (sequence,
array,GeoDataFrame,str,Pathor file-like) – Sequence of (x, y) coordinate tuples, (N, 2) coordinate array, GeoDataFrame or path to a shapefile containing a single line, along which the dataset will be interpolated.interval (
float, optional) – If provided, resample (linearly interpolate) profile coordinates to a fixed spatial resolution given byinterval. IfNone, the data are interpolated to the exactdatasourcecoordinate, which may produce an irreguar grid.
- Returns:
dataset (
Dataset) – The interpolated dataset, where horizontal dimensionsxandyare replaced by a new dimensiondwith a grid spacing of eitherintervalor the distance between points indatasource.