pub async fn heatmap(
    map_id: i32,
    query_params: HeatMapQueryParams,
    app_data: &Data<AppDataInner>
) -> Result<Vec<u8>, ServiceError>
Expand description

Generates a heatmap signaling ideal locations for planting the plant. The return values are raw bytes of an PNG image.

Errors

  • If the connection to the database could not be established.
  • If no map with id map_id exists.
  • If no layer with id layer_id exists, if the layer is not a plant layer or if the layer is not part of the map.
  • If no plant with id plant_id exists.
  • If the image could not be parsed to bytes.