colorizer
This module is used to generate geoengine compatible color map definitions as a json string.
ColorBreakpoint Objects
Section titled “ColorBreakpoint Objects”@dataclassclass ColorBreakpoint()This class is used to generate geoengine compatible color breakpoint definitions.
to_api_dict
Section titled “to_api_dict”def to_api_dict() -> geoengine_api_client.BreakpointReturn the color breakpoint as a dictionary.
from_response
Section titled “from_response”@staticmethoddef from_response( response: geoengine_api_client.Breakpoint) -> ColorBreakpointParse a http response to a ColorBreakpoint.
Colorizer Objects
Section titled “Colorizer Objects”@dataclassclass Colorizer()This class is used to generate geoengine compatible color map definitions as a json string.
linear_with_mpl_cmap
Section titled “linear_with_mpl_cmap”@staticmethoddef linear_with_mpl_cmap( color_map: str | Colormap, min_max: tuple[float, float], n_steps: int = 10, over_color: Rgba = (0, 0, 0, 0), under_color: Rgba = (0, 0, 0, 0), no_data_color: Rgba = (0, 0, 0, 0)) -> LinearGradientColorizerInitialize the colorizer.
logarithmic_with_mpl_cmap
Section titled “logarithmic_with_mpl_cmap”@staticmethoddef logarithmic_with_mpl_cmap( color_map: str | Colormap, min_max: tuple[float, float], n_steps: int = 10, over_color: Rgba = (0, 0, 0, 0), under_color: Rgba = (0, 0, 0, 0), no_data_color: Rgba = (0, 0, 0, 0)) -> LogarithmicGradientColorizerInitialize the colorizer.
palette
Section titled “palette”@staticmethoddef palette( color_mapping: dict[float, Rgba], default_color: Rgba = (0, 0, 0, 0), no_data_color: Rgba = (0, 0, 0, 0)) -> PaletteColorizerInitialize the colorizer.
palette_with_colormap
Section titled “palette_with_colormap”@staticmethoddef palette_with_colormap( values: list[float], color_map: str | Colormap, default_color: Rgba = (0, 0, 0, 0), no_data_color: Rgba = (0, 0, 0, 0)) -> PaletteColorizerThis method generates a palette colorizer from a given list of values. A colormap can be given as an object or by name only.
to_json
Section titled “to_json”def to_json() -> strReturn the colorizer as a JSON string.
from_response
Section titled “from_response”@staticmethoddef from_response(response: geoengine_api_client.Colorizer) -> ColorizerCreate a colorizer from a response.
rgba_from_list
Section titled “rgba_from_list”def rgba_from_list(values: list[int]) -> RgbaConvert a list of integers to an RGBA tuple.
LinearGradientColorizer Objects
Section titled “LinearGradientColorizer Objects”@dataclassclass LinearGradientColorizer(Colorizer)A linear gradient colorizer.
from_response_linear
Section titled “from_response_linear”@staticmethoddef from_response_linear( response: geoengine_api_client.LinearGradient) -> LinearGradientColorizerCreate a colorizer from a response.
to_api_dict
Section titled “to_api_dict”def to_api_dict() -> geoengine_api_client.ColorizerReturn the colorizer as a dictionary.
LogarithmicGradientColorizer Objects
Section titled “LogarithmicGradientColorizer Objects”@dataclassclass LogarithmicGradientColorizer(Colorizer)A logarithmic gradient colorizer.
from_response_logarithmic
Section titled “from_response_logarithmic”@staticmethoddef from_response_logarithmic( response: geoengine_api_client.LogarithmicGradient) -> LogarithmicGradientColorizerCreate a colorizer from a response.
to_api_dict
Section titled “to_api_dict”def to_api_dict() -> geoengine_api_client.ColorizerReturn the colorizer as a dictionary.
PaletteColorizer Objects
Section titled “PaletteColorizer Objects”@dataclassclass PaletteColorizer(Colorizer)A palette colorizer.
from_response_palette
Section titled “from_response_palette”@staticmethoddef from_response_palette( response: geoengine_api_client.PaletteColorizer) -> PaletteColorizerCreate a colorizer from a response.
to_api_dict
Section titled “to_api_dict”def to_api_dict() -> geoengine_api_client.ColorizerReturn the colorizer as a dictionary.