Field Operations sample responses

Overview

This page shows and describes sample responses from Leaf API, along with a list of what properties you can expect for each type of data.

Field Operations

A Field Operation processed by Leaf's API returns a list of content that contains most of the basic info related to the authenticated user, and also the Field Boundaries and File Operations attached to each other by the background processing.

Here's an example of a Field Operation

{
"id": "uuid",
"apiOwnerUsername": "leaf@withleaf.io",
"leafUserId": "uuid",
"startTime": "yyyy-MM-ddTHH:mm:ss.SZ",
"endTime": "yyyy-MM-ddTHH:mm:ss.SZ",
"updatedTime": "yyyy-MM-ddTHH:mm:ss.SZ",
"type": "string",
"files": [
"uuid"
],
"fields": [
{
"id": "uuid",
"coverage": "float"
}
],
"providers": [
"string"
]
}

Field operations have many features that can be accessed via /featureName added to the base url, ranging from the standardized data to the operation units. Here's a sample response of each of these features.

Field Operations Standard GeoJSON

Here's an example of a standard geojson from a Field Operation

{
"standardGeojson": "URL"
}

Field Operations Filtered GeoJSON

tip

To use this option, the operationsFilteredGeojson configuration must be enabled.

Here's an example of a filtered geojson from a Field Operation that can be access from the /operations/{id}/filteredGeojsonendpoint.

{
"filteredGeojson": "URL"
}

The filtered GeoJSON is the file that went through the data cleaning process, removing the points with the following criteria:

  • speed less than 0.5 m/s (for all operation types)

The generated files will be used as a basis for generating new operations images.

Outliers

This is a option for cleaning the filteredGeoJSON based on standard deviation to remove outliers on harvest data.

Outliers

All points with the harvested volume value far 3 standard deviation from the mean will be excluded. This is the default value and can be changed in the operationsOutliersLimit configuration.

To disable the removal of outliers just use the operationsRemoveOutliers configuration.

Field Operations Summary

Here's an example of a summary from a Field Operation. It's important to mention that the output displayed in the Field Operation Summary is heavily impacted by the operationType property.

You can move through the four tabs below to see a sample of how Leaf returns each of the operation types.

{
"type": "Feature",
"properties": {
"totalDistance": {
"value": 33277.419952513315,
"unit": "ft"
},
"speed": {
"avg": 4.297550131597641,
"min": 0.0,
"max": 7.842694282531738,
"unit": "mi/hr"
},
"startTime": "2015-10-06T23:51:23.040+00:00",
"endTime": "2015-10-07T17:09:26.040+00:00",
"totalArea": {
"value": 58926.234671233884,
"unit": "m2"
},
"elevation": {
"avg": 165.5691147167663,
"min": 58.6,
"max": 195.3,
"unit": "ft"
},
"crop": [
"corn"
],
"operationType": "harvested",
"wetMass": {
"avg": 11.810479659859125,
"min": 0.031766114277891125,
"max": 58.95,
"unit": "lb"
},
"totalWetMass": {
"value": 165960.86018034007,
"unit": "lb"
},
"wetMassPerArea": {
"avg": 11397.635987349213,
"min": 189.17227229135673,
"max": 646492.91259439,
"unit": "lb/ac"
},
"wetVolume": {
"avg": 0.21090142249748436,
"min": 5.672520406766272E-4,
"max": 1.0526785714285716,
"unit": "bu"
},
"totalWetVolume": {
"value": 2963.5867889346546,
"unit": "bu"
},
"wetVolumePerArea": {
"avg": 203.5292140598074,
"min": 3.3780762909170847,
"max": 11544.516296328393,
"unit": "bu/ac"
},
"harvestMoisture": {
"avg": 15.38852974665528,
"min": 6.05,
"max": 18.16,
"unit": "percentage"
},
"varieties": [
{
"harvestMoisture": {
"avg": 15.38852974665528,
"min": 6.05,
"max": 18.16,
"unit": "percentage"
},
"wetMass": {
"value": 165960.86018034007,
"unit": "lb"
},
"wetMassPerArea": {
"value": 2.816417188477808,
"unit": "lb/ac"
},
"wetVolume": {
"value": 2963.5867889346546,
"unit": "bu"
},
"area": {
"value": 58926.234671233884,
"unit": "m2"
},
"name": "Corn"
}
],
"machinery": [
{
"name": "Case IH Corn Head 20.000010800000002ft 8row",
"type": "implement",
"brand": "Case IH"
},
{
"name": "Case IH 8120",
"type": "machine",
"serialNumber": "8000001",
"brand": "Case IH"
},
{
"name": "Case IH Corn Head 20ft 12row",
"type": "implement",
"brand": "Case IH"
},
{
"name": "Case IH X120 Series 8120",
"type": "machine",
"serialNumber": "8220490",
"brand": "Case IH"
}
]
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [[[
[-89.80434894561768,40.47791686563837],
[-89.80756759643555,40.4757623387113],
[-89.80746030807495,40.47302011353734],
[-89.80475664138794,40.47070219301965],
[-89.80080842971802,40.47068586935202],
[-89.79797601699828,40.472709973879255],
[-89.7978687286377,40.47569704893722],
[-89.80117321014404,40.47808008455794],
[-89.80434894561768,40.47791686563837]
]]]
}
}

Field Operations Images

Here is an example of Images from Field Operations.

[
{
"property": "string",
"ramp" : {
"0%" : [ 200, 0, 0 ],
"35%" : [ 255, 40, 0 ],
"45%" : [ 255, 150, 0 ],
"55%" : [ 255, 240, 0 ],
"65%" : [ 0, 230, 0 ],
"75%" : [ 0, 190, 0 ],
"100%" : [ 0, 130, 0 ],
"nv" : [ 0, 0, 0, 0 ]
},
"url": "URL"
}
]

Field Operations Images V2

This endpoint version produces images based on the filteredGeoJSON, therefore it will be active whenever the data filter option is active.

The new images have considerable improvements over the previous one. They are generated with a standard fixed color ramp and the data is automatically distributed into 7 classes using quantile classification.

Note that the return is different from the previous version, with the option of extent and legend available.

[
{
"property": "string",
"legend": {
"ranges": [
{
"colorCode": "#C80000",
"max": 20,
"min": 0
},
{
"colorCode": "#FF2800",
"max": 50,
"min": 20
},
{
"colorCode": "#FF9600",
"max": 100,
"min": 50
},
{
"colorCode": "#FFF000",
"max": 250,
"min": 100
},
{
"colorCode": "#00E600",
"max": 340,
"min": 250
},
{
"colorCode": "#00BE00",
"max": 480,
"min": 340
},
{
"colorCode": "#008200",
"max": 570,
"min": 480
}
]
},
"extent": {
"xmin": 0.0,
"xmax": 0.0,
"ymin": 0.0,
"ymax": 0.0
},
"url": "URL"
}
]

If the filteredGeoJSON fails to process, images will continue to be generated from the standardGeoJSON.

tip

Important: once active, the images will be available for access only via the /imagesV2 endpoint.

Field Operations Units

Here is an example of Units from the numerical properties of the Field Operations.

{
"elevation": "ft",
"area": "m2",
"harvestMoisture": "percentage",
"equipmentWidth": "ft",
"distance": "ft",
"heading": "arcdeg",
"wetVolume": "bu",
"wetVolumePerArea": "bu/ac",
"wetMass": "lb",
"wetMassPerArea": "lb/ac",
"speed": "mi/hr"
}