windkit.read_landcover_map

windkit.read_landcover_map(filename, crs=None, return_lctable=False, **kwargs)[source]

Read landcover map from file.

The file can be either a raster file or a vector file.

If the file is a raster file, the following formats are supported:

“grd” and “tif” (geoTIFF).

If the file is a vector file, the following formats are supported:

“gpkg”, “gml”, “map”, “tmp”, “zip”, “ZipExtFile”

Parameters:
  • filename (str or pathlib.Path) – Path to file

  • crs (int, dict, str or pyproj.crs.CRS, optional) – Value to initialize pyproj.crs.CRS (Default: read from file)

  • return_lctable (bool) – Whether to return the landcover table. Default is False.

  • polygons (bool) – Whether to convert the opened file to polygons, default True. If False, opens the file as old fashioned change lines. You can try this if your file is not being opened correctly, but you are responsible for checking it’s correctness, because there is less error checking for these types of files.

  • check_errors (bool) – Whether to check for errors in the map, default True.

  • **kwargs (dict) – Additonal keyword arguments passed to reader.

Returns:

landcover_map object

Return type:

xarray.DataArray, gpd.GeoDataFrame