windkit.read_roughness_map
- windkit.read_roughness_map(filename, crs=None, convert_to_landcover=False, **kwargs)[source]
Read roughness 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)convert_to_landcover (bool) – Whether to convert the roughness map to a landcover map. 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:
roughness_map object
- Return type:
xarray.DataArray, gpd.GeoDataFrame