windkit.add_landcover_table

windkit.add_landcover_table(gdf, lctable)[source]

Add a landcover table to a GeoDataFrame.

This function adds a landcover table to a GeoDataFrame containing polygon geometries. It ensures that all IDs in the GeoDataFrame are present in the landcover table.

Parameters:
  • gdf (GeoDataFrame) – The GeoDataFrame to which the landcover table will be added. Must contain polygon geometries.

  • lctable (dict) – A dictionary representing the landcover table. The keys should be IDs corresponding to the IDs in the GeoDataFrame.

Returns:

The original GeoDataFrame with the landcover table joined on the ‘id’ column.

Return type:

GeoDataFrame

Raises:

ValueError – If the GeoDataFrame contains non-polygon geometries or if any IDs in the GeoDataFrame are not present in the landcover table.