windkit.spatial.gdf_to_ds
- windkit.spatial.gdf_to_ds(gdf, height=None, struct=None)[source]
Convert geopandas dataframe to windkit spatial structure.
- Parameters:
gdf (gpd.GeoDataFrame) – Geopandas dataframe with geometry column
height (float, optional) – The value of the height coordinate if it is not included in the gpd.GeoDataFrame.
struct ({"point", "stacked_point", "cuboid"}) – Default None, which means detect the best fitting windkit spatial structure.
- Returns:
ds – dataset with a windkit spatial structure.
- Return type:
xr.Dataset
Notes
If a column
name
is present on the GeoDataFrame and your data is in point or stacked_point structure, it will be included in the xr.Dataset as well. This can be convenient when you have mast locations that have a name/label.