windkit.spatial.ds_to_gdf
- windkit.spatial.ds_to_gdf(ds, include_height=False)[source]
Convert windkit spatial structure to geopandas dataframe.
- Parameters:
ds (xr.Dataset or xr.DataArray) – Spatial object.
include_height (boolean, optional) – Default False, do not include the height dimension in the geopandas dataframe
- Returns:
gdf – GeoDataFrame with columns
x
,y
and optionallyz
if include_height is True- Return type:
gpd.GeoDataFrame
Notes
If a coordinate
name
is present on the dataset, it will be included in the geodataframe as well. This can be convenient when you have mast locations that have a name/label. Note that if your dataset is in cuboid or stacked_point format, it will be flattened to a point structure.