mapshader.transforms.raster_to_categorical_points#

mapshader.transforms.raster_to_categorical_points(arr, cats: dict, dim: str = 'data')[source]#

Convert raster data to categorical points.

Parameters:
  • arr (xarray.DataArray) – The raster data.

  • cats (dict) – Categories colors.

  • dim (str, default=data) – The categorical column name.

Returns:

df – The converted data.

Return type:

pandas.DataFrame