Tree Surveys

Tree-level measurements extracted from aerial drone imagery, including individual tree surveys, row-segmented survey data, aggregated survey summaries, missing tree detection, tree groups, and zone segmentation.

Use these endpoints to retrieve tree-level measurements, row-segmented outputs, and survey-level summaries extracted from aerial imagery collected during drone surveys of orchards. The data covers seven record types:

  • Tree Survey Summary — aggregated statistics (tree count, average canopy area, NDRE) across all trees in a survey.
  • Tree Survey — individual tree-level measurements including GPS coordinates, canopy area, volume, transpiration, vegetation indices, and row/tree position within the orchard.
  • Tree Survey Row Segment — row-segmented tree measurements grouped by spatial contiguity and binned by a selected metric.
  • Missing Tree — trees detected as dead or removed from the orchard via Aerobotics' computer vision algorithms.
  • Missing Tree Row Segment — missing trees grouped into row segments by spatial contiguity.
  • Tree Group — named tree groups associated with an orchard and the tree survey IDs that belong to each group.
  • Zone — defined areas within an orchard segmented by health or performance, used to identify regions with certain characteristics.

The summary endpoint returns orchard-wide averages and counts for a survey. Use the flat tree surveys and missing trees endpoints for surveys without row data, and use the row-segment endpoints when the survey has row data. The tree groups and zones endpoints each return their own survey-level dataset.

Recommended patterns for fetching tree survey data

How to fetch orchard-wide statistics for a survey

  1. Pull the survey summary using the farming/surveys/{survey_id}/tree_survey_summaries/ endpoint. The response returns a single object containing the tree_count, missing_tree_count, and averages for canopy area and NDRE across all trees in the survey.

How to fetch flat individual tree measurements for a survey without row data

  1. First pull the survey summary as described above to understand the total tree count.
  2. Fetch individual tree records using the farming/surveys/{survey_id}/tree_surveys/ endpoint. The response is paginated — iterate through all pages to retrieve the complete dataset.
  3. Each tree record includes GPS coordinates (lat, lng), vegetation indices (ndre, ndvi), canopy metrics (area, volume), transpiration, and the tree's position within the orchard (row_index, tree_index).
  4. If the endpoint returns a 404 with a row-data message, fetch farming/surveys/{survey_id}/tree_survey_row_segments/ instead.

How to fetch row-segmented tree measurements for a survey with row data

  1. Fetch row segments using the farming/surveys/{survey_id}/tree_survey_row_segments/ endpoint.
  2. Optionally set the insight query parameter to health, vigor, canopy_area, volume, transpiration, or tree_count. The default is health.
  3. Each response groups tree segments into bins for the selected metric. Each segment includes the row ID, tree count, average NDRE, average NDVI, average canopy area, and an optional polygon feature.
  4. If the endpoint returns a 404 with a no-row-data message, fetch farming/surveys/{survey_id}/tree_surveys/ instead.

How to fetch flat missing trees for a survey without row data

  1. Fetch missing trees using the farming/surveys/{survey_id}/missing_trees/ endpoint. Each record includes the GPS coordinates of a tree detected as dead or removed.
  2. The response is paginated — iterate through all pages to retrieve the complete dataset.
  3. If the endpoint returns a 404 with a row-data message, fetch farming/surveys/{survey_id}/missing_tree_row_segments/ instead.

How to fetch row-segmented missing trees for a survey with row data

  1. Fetch missing tree row segments using the farming/surveys/{survey_id}/missing_tree_row_segments/ endpoint.
  2. Each segment includes the row ID, missing tree count, and an optional polygon feature.
  3. If the endpoint returns a 404 with a no-row-data message, fetch farming/surveys/{survey_id}/missing_trees/ instead.

How to fetch tree groups for a survey

  1. Fetch tree groups using the farming/surveys/{survey_id}/tree_groups/ endpoint. The response returns an array of tree groups associated with the survey.
  2. Use tree_survey_ids to map each group back to individual tree survey records.

How to fetch zones for a survey

  1. Fetch zones using the farming/surveys/{survey_id}/zones/ endpoint. Each zone represents a region of the orchard segmented by health or performance.
  2. Optionally set zones to 3 or 5. The default is 3.
  3. Optionally set insight to health, vigor, canopy_area, volume, or transpiration. The default is health.

Tree Survey Summary Object

A tree survey summary provides aggregated statistics and metrics for all trees within a survey.

Summary metric fields may be null when the metric is unavailable for the survey.

KeyTypeDescription
survey_idintegerThe unique identifier of the survey, provided by Aerobotics
tree_countintegerThe total number of trees in the orchard
missing_tree_countintegerThe number of trees that have died or have been removed from the orchard, calculated using Aerobotics' computer vision algorithms
average_area_m2numberThe average canopy area of all trees in the orchard, in square metres
stddev_area_m2numberThe standard deviation of all tree canopy areas in the orchard, in square metres
average_ndrenumberThe average Normalized Difference Red Edge (NDRE) index of all trees in the orchard
stddev_ndrenumberThe standard deviation of NDRE values in the orchard

Example response

{
  "survey_id": 12345,
  "tree_count": 2480,
  "missing_tree_count": 37,
  "average_area_m2": 12.4,
  "stddev_area_m2": 3.1,
  "average_ndre": 0.29,
  "stddev_ndre": 0.04
}

Tree Survey Object

A tree survey captures measurements for a single tree at a point in time within a survey.

The tree_surveys response is paginated and supports limit and offset query parameters. Metric and coordinate fields may be null when the source data is unavailable.

KeyTypeDescription
idintegerThe unique identifier for the tree survey, provided by Aerobotics
latnumberThe latitude coordinate of the tree (decimal format)
lngnumberThe longitude coordinate of the tree (decimal format)
ndrenumberThe Normalized Difference Red Edge (NDRE) index value for the tree
ndvinumberThe Normalized Difference Vegetation Index (NDVI) value for the tree
volumenumberThe volume of the tree canopy in cubic metres
areanumberThe area of the tree canopy in square metres
transpirationnumberThe transpiration index value for the tree
row_indexintegerThe row number (1-based) where this tree is located within the orchard's row structure. The index starts from the South East corner of the orchard
tree_indexintegerThe position number (1-based) of this tree within its row, indicating its sequential order along the row. The index starts from the South East corner of the orchard
survey_idintegerThe unique identifier of the survey, provided by Aerobotics

Example response

{
  "count": 2480,
  "next": "https://api.aerobotics.com/farming/surveys/12345/tree_surveys/?limit=2&offset=2",
  "previous": null,
  "results": [
    {
      "id": 1001,
      "lat": -33.9249,
      "lng": 18.4241,
      "ndre": 0.31,
      "ndvi": 0.78,
      "volume": 18.6,
      "area": 12.9,
      "transpiration": 0.52,
      "row_index": 14,
      "tree_index": 27,
      "survey_id": 12345
    },
    {
      "id": 1002,
      "lat": -33.9251,
      "lng": 18.4243,
      "ndre": 0.28,
      "ndvi": 0.75,
      "volume": 17.2,
      "area": 11.8,
      "transpiration": 0.49,
      "row_index": 14,
      "tree_index": 28,
      "survey_id": 12345
    }
  ]
}

If the survey has row data, this endpoint returns a 404. Use farming/surveys/{survey_id}/tree_survey_row_segments/ for row-segmented tree data or farming/surveys/{survey_id}/tree_survey_summaries/ for summary statistics.

Tree Survey Row Segments Object

A tree survey row segments response groups tree measurements into row segments for a survey. Segments are binned by the selected metric, and trees in the same row and bin are split by spatial contiguity.

The tree_survey_row_segments endpoint supports the insight query parameter. Allowed values are health, vigor, canopy_area, volume, transpiration, and tree_count. The default is health.

KeyTypeDescription
survey_idintegerThe unique identifier of the survey
metricstringThe metric used to bin tree segments
row_segment_bins[RowSegmentBin]An array of row segment bins for the selected metric

Row Segment Bin Object

KeyTypeDescription
average_valuenumberThe average metric value for the bin. May be null
row_segments[TreeRowSegment]The row segments included in the bin

Tree Row Segment Object

KeyTypeDescription
row_idintegerThe unique identifier of the row
tree_countnumberThe number of trees in the segment
average_ndrenumberThe average NDRE value for the segment. May be null
average_ndvinumberThe average NDVI value for the segment. May be null
average_canopy_area_m2numberThe average canopy area for the segment. May be null
polygon_featureobjectAn optional GeoJSON Feature for the segment polygon

Example response

{
  "survey_id": 12345,
  "metric": "health",
  "row_segment_bins": [
    {
      "average_value": 0.31,
      "row_segments": [
        {
          "row_id": 14,
          "tree_count": 24,
          "average_ndre": 0.31,
          "average_ndvi": 0.78,
          "average_canopy_area_m2": 12.9,
          "polygon_feature": {
            "type": "Feature",
            "geometry": {
              "type": "Polygon",
              "coordinates": []
            }
          }
        }
      ]
    }
  ]
}

If the survey does not have row data, this endpoint returns a 404. Use farming/surveys/{survey_id}/tree_surveys/ for flat tree data or farming/surveys/{survey_id}/tree_survey_summaries/ for summary statistics.

Missing Tree Object

A missing tree is a tree that has died or been removed from the orchard, detected by Aerobotics' computer vision algorithms during survey processing.

The missing_trees response is paginated and supports limit and offset query parameters. Coordinate fields may be null when the source data is unavailable.

KeyTypeDescription
idintegerThe unique identifier for the missing tree, provided by Aerobotics
latnumberThe latitude coordinate of the missing tree (decimal format)
lngnumberThe longitude coordinate of the missing tree (decimal format)
survey_idintegerThe unique identifier of the survey, provided by Aerobotics

Example response

{
  "count": 2,
  "next": null,
  "previous": null,
  "results": [
    {
      "id": 55,
      "lat": -33.9264,
      "lng": 18.4257,
      "survey_id": 12345
    },
    {
      "id": 56,
      "lat": -33.9266,
      "lng": 18.4259,
      "survey_id": 12345
    }
  ]
}

If the survey has row data, this endpoint returns a 404. Use farming/surveys/{survey_id}/missing_tree_row_segments/ for row-segmented missing tree data or farming/surveys/{survey_id}/tree_survey_summaries/ for summary statistics.

Missing Tree Row Segments Object

A missing tree row segments response groups missing trees into row segments by spatial contiguity for a survey.

KeyTypeDescription
survey_idintegerThe unique identifier of the survey
row_segments[MissingTreeRowSegment]The missing tree row segments

Missing Tree Row Segment Object

KeyTypeDescription
row_idintegerThe unique identifier of the row
missing_tree_countnumberThe number of missing trees in the row segment
polygon_featureobjectAn optional GeoJSON Feature for the segment polygon

Example response

{
  "survey_id": 12345,
  "row_segments": [
    {
      "row_id": 14,
      "missing_tree_count": 2,
      "polygon_feature": {
        "type": "Feature",
        "geometry": {
          "type": "Polygon",
          "coordinates": []
        }
      }
    }
  ]
}

If the survey does not have row data, this endpoint returns a 404. Use farming/surveys/{survey_id}/missing_trees/ for flat missing tree data or farming/surveys/{survey_id}/tree_survey_summaries/ for summary statistics.

Tree Group Object

A tree group is a named group of trees associated with an orchard. The tree_groups endpoint returns an array of tree groups for a survey.

KeyTypeDescription
idintegerThe unique identifier for the tree group, provided by Aerobotics
namestringThe name of the tree group
orchard_idintegerThe unique identifier of the orchard
plant_datestringThe date the orchard was planted. May be null
cultivar_idintegerThe unique identifier of the cultivar. May be null
rootstock_idintegerThe unique identifier of the orchard root stock. May be null
tree_survey_idsinteger[]The tree survey IDs that belong to the group

Example response

[
  {
    "id": 77,
    "name": "Block A",
    "orchard_id": 123,
    "plant_date": "2020-08-15",
    "cultivar_id": 45,
    "rootstock_id": 12,
    "tree_survey_ids": [1001, 1002]
  }
]

Zone Object

A zone represents a defined area within an orchard for a survey. Each zone contains aggregate metrics for the segmented area plus one or more polygon regions. The zones response can be generated for the health, vigor, canopy_area, volume, or transpiration insight.

The zones endpoint supports two query parameters:

ParameterTypeDefaultAllowed valuesDescription
zonesinteger33, 5The number of zones to generate
insightstringhealthhealth, vigor, canopy_area, volume, transpirationThe insight layer used for the zones
KeyTypeDescription
insight_averagenumberThe average insight value for the zone
insight_unitstringThe unit of the insight value. Returned as m2 or m3 when applicable
total_size_m2numberThe total size of the zone in square metres
total_treesintegerThe total number of trees in the zone
total_missing_treesintegerThe total number of missing trees in the zone
zone_regions[ZoneRegion]An array of polygon regions that make up the zone

Zone Region Object

KeyTypeDescription
size_m2numberThe size of the zone region in square metres
treesintegerThe number of trees in the zone region
missing_treesintegerThe number of missing trees in the zone region
polygon_featureobjectA GeoJSON Feature with a polygon geometry

Polygon Feature Object

KeyTypeDescription
typestringThe GeoJSON feature type. Returned as Feature
geometryobjectThe polygon geometry for the zone region

Polygon Geometry Object

KeyTypeDescription
typestringThe GeoJSON geometry type. Returned as Polygon
coordinatesarrayThe polygon coordinates in GeoJSON format

Example response

{
  "survey_id": 12345,
  "insight": "transpiration",
  "zones": [
    {
      "insight_average": 0.52,
      "total_size_m2": 1540.8,
      "total_trees": 218,
      "total_missing_trees": 4,
      "zone_regions": [
        {
          "size_m2": 1540.8,
          "trees": 218,
          "missing_trees": 4,
          "polygon_feature": {
            "type": "Feature",
            "geometry": {
              "type": "Polygon",
              "coordinates": [
                [
                  [18.4241, -33.9249],
                  [18.4248, -33.9249],
                  [18.4248, -33.9255],
                  [18.4241, -33.9255],
                  [18.4241, -33.9249]
                ]
              ]
            }
          }
        }
      ]
    }
  ]
}