backend::model::entity::plant_layer

Function heatmap

source
pub async fn heatmap(
    map_id: i32,
    plant_layer_id: Uuid,
    shade_layer_id: Uuid,
    hydrology_layer_id: Uuid,
    soil_layer_id: Uuid,
    plant_id: i32,
    date: NaiveDate,
    conn: &mut AsyncPgConnection,
) -> QueryResult<Vec<Vec<(HeatmapColor, 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.