windkit.landcover.LandCoverTable.add_colors_to_table
- LandCoverTable.add_colors_to_table(levels=None, colors=None, html=False, ignore_collisions=True)[source]
Return the landover table with an additional / updated color column.
- Parameters:
levels (list of float, optional. Default: None) – List of values marking different color bins, both min and max level should be included. If levels is None, a default list of 15 levels from 0 to 1, plus a level of 100 is included.
colors (list of colors (rgb-tuple or html-str), optional. Default: None) – If tuple, should have 3 values, if string should have leading ‘#’. List should be one less than the number of levels. If None, a default list of 15 colors that represent the levels as roughness lengths is provided.
html (bool, optional. Default: False) – If True, the colors will be in html format.
ignore_collisions (bool, optional. Default: True) – if True, will raise an error if several roughness map to the same color.