Function backend::model::entity::plant_layer::heatmap

source ·
pub async fn heatmap(
    map_id: i32,
    layer_id: Uuid,
    plant_id: i32,
    conn: &mut AsyncPgConnection,
) -> QueryResult<Vec<Vec<f32>>>
Expand description

Generates a heatmap signaling ideal locations for planting the plant.

§Errors

  • 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.