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.

Operations File

Leaf returns operation file summaries in a standardized format. Summaries use the point data to derive basic information about the operation and include links to the original files and images of an operation. Naturally, different types of operations contain different properties. For instance, an applied operation will contain appliedRate, whereas a harvested operation will contain wetMass and other Yield properties. The resource below shows a typical return. A list of all properties is available here.

A list of the properties as well as a sample summary response for an operation file is included below.

An operation returned by Leaf can be an individual file or contain multiple individual files (uploaded, merged or uploaded). If the operation contains more than one individual file, another key is added to the resource, the "sources" key, that is a list of individual file ids.

Sample response

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

This is an example of a summary for a "harvested" operation

{
"id": "uuid",
"provider": "provider name",
"leafUserId": "uuid",
"apiOwnerUsername": "email",
"sourceFiles": [],
"status": "processed",
"origin": "provider or Leaf",
"createdTime": "2020-10-13T20:19:01",
"processedTime": "2020-10-13T21:25:53",
"lastUpdated": "2020-10-13T21:25:53",
"fieldId": ["uuid"],
"files": {
"original": "abc.com",
"rawGeojson": "abc.com",
"standardGeojson": "abc.com",
"zippedPNGs": "abc.com"
},
"summary": {
"type": "Feature",
"properties": {
"operationType": "harvested",
"crop": "soybeans",
"totalArea": {
"value": 1032183,
"unit": "m2"
},
"startTime": "2015-12-23T20:29:01",
"endTime": "2015-12-29T20:31:46",
"elevation": {
"min": 220.0,
"max": 236.0,
"avg": 234.0,
"unit": "m"
},
"speed": {
"min": 0.0,
"max": 3.1,
"avg": 4.1,
"unit": "m/s"
},
"totalDistance": {
"value": 12270.32,
"unit": "m"
},
"machinery": [
{
"machineName": "machine1",
"machineId": "uuid",
"implementName": "",
"implementId": "uuid"
},
{
"machineName": "machine2",
"machineId": "uuid",
"implementName": "",
"implementId": "uuid"
}
],
"varieties": [{
"name": "var xx",
"description": "",
"wetMass": {
"value": 238907,
"unit": "kg"
},
"wetVolume": {
"value": 123456,
"unit": "liters"
},
"wetMassPerArea": {
"value": 2.57908,
"unit": "kg/m2"
},
"wetVolumePerArea": {
"value": 3.23456,
"unit": "liters/m2"
},
"dryMassPerArea": {
"value": 2.5,
"unit": "kg/m2"
},
"dryVolumePerArea": {
"value": 2.7,
"unit": "l/m2"
},
"harvestMoisture": {
"min": 15.0,
"max": 22.1,
"avg": 18.2,
"unit": "%"
},
"dryMass": {
"value": 238907,
"unit": "kg"
},
"dryVolume": {
"value": 123456,
"unit": "liters"
},
"area": {
"value": 502312,
"unit": "m2"
}
},
{
"name": "var yy",
"description": "",
"wetMass": {
"value": 257908,
"unit": "kg"
},
"wetVolume": {
"value": 123456,
"unit": "liters"
},
"wetMassPerArea": {
"value": 2.57908,
"unit": "kg/m2"
},
"wetVolumePerArea": {
"value": 3.23456,
"unit": "liters/m2"
},
"harvestMoisture": {
"min": 15.0,
"max": 22.1,
"avg": 18.2,
"unit": "%"
},
"dryMass": {
"value": 257908,
"unit": "kg"
},
"dryVolume": {
"value": 123456,
"unit": "liters"
},
"dryMassPerArea": {
"value": 2.5,
"unit": "kg/m2"
},
"dryVolumePerArea": {
"value": 2.7,
"unit": "l/m2"
},
"area": {
"value": 529871,
"unit": "m2"
}
}]
},
"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]
]]]
}
}
}

Properties

Select the tab you want to see "planted", "applied" or "harvested"

keypresencetype
crop*string
seedRate*dict
operationType*string "planted"
totalArea*int
elevation*dict
variety**string
seedRateTarget**dict
seedDepth**dict
machinery**dict
speed**dict
totalPlanted**int (number of seeds)

* = Always in response
** = Usually in response but not required to pass tests

[Here][sample_summary] you can see a sample summary as response for an operation file

Standard Geojson

When the data is present in the original file, Leaf standardizes names and units to create the standardGeojson.

Below we list all the properties in the standardGeojson.

Sample Response

Each operation file returns with a "standardgeojson" URL that allows you to download a full point dataset from the operation in a standardized geojson format. Below is an example of the format of each point in these files.

{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [-74.83762110788625, 28.686604864693564]
},
"properties": {
"distance": "float",
"heading": "float",
"speed": "float",
"elevation": "float",
"equipmentWidth": "float",
"recordingStatus": "string",
"machinery": ["string"],
"sectionId" : "int",
"timestamp": "string",
"operationType": "planted",
"crop": "string",
"variety": "string",
"area": "float",
"seedRate": "int",
"seedRateTarget": "int",
"seedDepth": "float",
}
}

Properties

keypresencetypeexample unitsdescription
coords*Point (x,y)-Point (x,y)
timestamp*string-ISO 8601 date, complete and with Z. example: 2011-10-05T14:48:00.000Z
crop*string-Crop type (normalized)
area*floatft² or m²Area represented by point
heading*floatdegreesHeading of machine at point
distance*floatft or mDistance travelled since previous point
elevation*floatft or mDistance to sea level
operationType*string-string "planted"
equipmentWidth*intft or mWidth of implement
recordingStatus*Boolean-Recording status of machine at point
seedRate*intseeds/m² or seeds/acThe rate of seeds planted at point
variety**string-The variety of seed being planted
speed**floatft/s or m/sSpeed of machine at point
sectionId**int-ID of implement sensor section
machinery**list of strings-name of machine & implement
seedRateTarget**intseeds/m² or seeds/acThe target rate of seeds to be planted at the point
seedDepth**floatcmThe depth at which seeds were planted at point

* = Always in response
** = Usually in response but not required to pass tests