windkit.spatial.to_stacked_point#
- windkit.spatial.to_stacked_point(obj_in, _honor_pwio=False)[source]#
Converts a WindKit dataset or dataarray to a ‘stacked_point’ structure
- Parameters:
obj (xarray.Dataset, xarray.DataArray) – WindKit xarray.Dataset or DataArray containing spatial dimensions and CRS variable
- Returns:
WindKit xarray dataset or dataarray as a ‘stacked_point’ structure
- Return type:
xarray.Dataset, xaray.DataArray
Notes
Variables with
height_dim_policy: "forbidden"metadata are returned without a height dimension. A warning is raised if such a variable’s values genuinely vary with height; this check is skipped for chunked (dask-backed) variables to avoid forcing a compute. For objects carrying internal stacking metadata (created by_spatial_stack), the private_pwio_data_is_2dattribute recorded at stacking time takes precedence, so internal round trips restore the original structure exactly.