Machine File Conversion Sample Responses

Overview

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

Machine Files

Leaf returns operation file 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. If the operation was created by an upload on the /batch endpoint, the "batchId" key will be added to the resource with the corresponding uuid.

Machine File Sample

You can move through the four 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": "7b525b72-a8e7-4d34-80bb-9ea2dde87a09",
"provider": "providerName",
"fields": [
"696b5df6-e401-4d13-bafe-3d2689723254"
],
"fileFormat": "CN1",
"fileName": "testFile.zip",
"originalFile": "url",
"downloadOriginalFile": "url",
"rawGeojson": "url",
"downloadRawGeojson": "url",
"standardGeojson": "url",
"downloadStandardGeojson": "url",
"leafUserId": "286eeb50-8e85-4e33-9f2d-1b9dcf0e56d7",
"apiOwnerUsername": "test",
"summary": {
"type": "Feature",
"properties": {
"totalDryMass": {
"value": 69707.74072725822,
"unit": "lb"
},
"dryVolume": {
"avg": 0.10060462979191162,
"min": 0.0006342037622996388,
"max": 0.19444628348991,
"unit": "bu"
},
"totalDryVolume": {
"value": 1244.7810844153173,
"unit": "bu"
},
"wetMassPerArea": {
"avg": 11752.315810068158,
"min": 87.79542055062868,
"max": 40340.87999553387,
"unit": "lb/ac"
},
"speed": {
"avg": 4.926574796479164,
"min": 2.430000066757202,
"max": 6.389999866485596,
"unit": "mi/hr"
},
"totalWetVolume": {
"value": 1294.538978069886,
"unit": "bu"
},
"originalOperationType": "Harvesting",
"startTime": "2015-09-23T00:00:00Z",
"totalDistance": {
"value": 17978.417202127104,
"unit": "ft"
},
"wetMass": {
"avg": 5.859062698772619,
"min": 0.03795335565182652,
"max": 11.06340317250743,
"unit": "lb"
},
"elevation": {
"avg": 155.78382768932352,
"min": 147.6,
"max": 162.4,
"unit": "ft"
},
"harvestMoisture": {
"avg": 18.224961609957166,
"min": 12.75,
"max": 21.18,
"unit": "percentage"
},
"dryVolumePerArea": {
"avg": 201.7963353621763,
"min": 1.467068855167438,
"max": 687.8289538734305,
"unit": "bu/ac"
},
"wetVolume": {
"avg": 0.10462611962093962,
"min": 0.0006777384937826164,
"max": 0.19756077093763266,
"unit": "bu"
},
"wetVolumePerArea": {
"avg": 209.86278232264567,
"min": 1.5677753669755121,
"max": 720.3728570631048,
"unit": "bu/ac"
},
"dryMassPerArea": {
"avg": 11300.594780281874,
"min": 82.15585588937653,
"max": 38518.421416912104,
"unit": "lb/ac"
},
"totalWetMass": {
"value": 72494.18277191388,
"unit": "lb"
},
"totalFuelUsed": {
"value": 196.25137347639,
"unit": "gal"
},
"varieties": [
{
"harvestMoisture": {
"avg": 18.224961609957166,
"min": 12.75,
"max": 21.18,
"unit": "percentage"
},
"wetMass": {
"value": 72494.18277191388,
"unit": "lb"
},
"wetMassPerArea": {
"value": 2.904060481369501,
"unit": "lb/ac"
},
"wetVolume": {
"value": 1294.538978069886,
"unit": "bu"
},
"area": {
"value": 24963.041657357968,
"unit": "m2"
},
"dryVolume": {
"value": 1244.7810844153173,
"unit": "bu"
},
"dryMassPerArea": {
"value": 2.7924377839874155,
"unit": "lb/ac"
},
"dryMass": {
"value": 69707.74072725822,
"unit": "lb"
},
"name": "Corn"
}
],
"originalOperationData": {
"originalOperationType": "Harvesting"
},
"operationType": "harvested",
"dryMass": {
"avg": 5.6338592683470505,
"min": 0.035515410688779774,
"max": 10.88899187543496,
"unit": "lb"
},
"endTime": "2015-09-24T00:36:55.8Z",
"crop": [
"corn"
],
"totalArea": {
"value": 24963.041657357968,
"unit": "m2"
},
"machinery": [
{
"name": "Case IH X010 Series 7010",
"type": "machine",
"serialNumber": "8227260",
"brand": "Case IH"
},
{
"name": "Case IH Corn Head 15ft 6row",
"type": "implement",
"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]
]]]
}
}
}

Properties by Operation Type

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

keypresencetype
crop*string
seedRate*dict
operationType*string "planted"
originalOperationType**string
totalArea*float
elevation*dict
varieties**dict
seedRateTarget**dict
seedDepth**dict
machinery**list of machineInfo objects
speed**dict
totalPlanted**int (number of seeds)
operationDescription**string
downForce**dict
singulation**dict
totalFuelUsed**dict

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

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.

Summary Response Sample

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",
"originalOperationType": "name of the operation as returned by the provider",
"crop": "string",
"variety": "string",
"area": "float",
"seedRate": "int",
"seedRateTarget": "int",
"seedDepth": "float",
"downForce": "float",
"singulation": "float",
"skips": "float",
"doubles": "float",
"fuelUsed": "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 traveled since previous point
elevation*floatft or mDistance to sea level
operationType*string-string "planted"
originalOperationType**string-string
equipmentWidth*floatft 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 machineInfo objects-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
productIndex**int-Index of the applied product
downForce**floatlbfThe weight detected by the down force sensor on each row that has one
singulation**float%The performance of each meter on the planter
xOffset**floatmVertical offset from the instrumentation sensor and the monitor GPS system
yOffset**floatmHorizontal offset from the instrumentation sensor and the monitor GPS system
fuelUsed**floatL or galThe fuel consumed

* = Always in response
** = Usually in response but not required to pass tests
$ = Not available when the crop is sugarcane

Despite the example units, Leaf's API will push through every unit, if the processed file contains the required (marked with *) properties.

Valid points

The points in the standardGeoJSON are considered valid if all the following rules are true:

propertyrule
wetMass> 0.0
wetMassPerArea> 0.0
wetVolume> 0.0
wetVolumePerArea> 0.0
harvestMoisture> 0.0 and <100.0
appliedRate> 0.0
seedRate> 0.0
tillageDepthActual> 0.0
recordingStatus= "On"

The API will automatically clean the invalid points when the cleanupStandardGeojson configuration is enabled.

Images

Also, Leaf displays all the numerical properties across all operation types via a png file. Here's a sample response from a Leaf harvested file.

[
{
"property": "area",
"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": "https://png-files-bucket-dev.s3.us-east-1.amazonaws.com/uuid.png"
},
{
"property": "wetMass",
"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": "https://png-files-bucket-dev.s3.us-east-1.amazonaws.com/uuid.png"
},
{
"property": "wetVolume",
"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": "https://png-files-bucket-dev.s3.us-east-1.amazonaws.com/uuid.png"
},
{
"property": "distance",
"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": "https://png-files-bucket-dev.s3.us-east-1.amazonaws.com/uuid.png"
},
{
"property": "wetVolumePerArea",
"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": "https://png-files-bucket-dev.s3.us-east-1.amazonaws.com/uuid.png"
},
{
"property": "equipmentWidth",
"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": "https://png-files-bucket-dev.s3.us-east-1.amazonaws.com/uuid.png"
},
{
"property": "wetMassPerArea",
"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": "https://png-files-bucket-dev.s3.us-east-1.amazonaws.com/uuid.png"
},
{
"property": "sectionId",
"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": "https://png-files-bucket-dev.s3.us-east-1.amazonaws.com/uuid.png"
},
{
"property": "elevation",
"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": "https://png-files-bucket-dev.s3.us-east-1.amazonaws.com/uuid.png"
},
{
"property": "harvestMoisture",
"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": "https://png-files-bucket-dev.s3.us-east-1.amazonaws.com/uuid.png"
},
{
"property": "heading",
"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": "https://png-files-bucket-dev.s3.us-east-1.amazonaws.com/uuid.png"
},
{
"property": "dryMass",
"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": "https://png-files-bucket-dev.s3.us-east-1.amazonaws.com/uuid.png"
},
{
"property": "dryMassPerArea",
"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": "https://png-files-bucket-dev.s3.us-east-1.amazonaws.com/uuid.png"
},
{
"property": "dryVolume",
"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": "https://png-files-bucket-dev.s3.us-east-1.amazonaws.com/uuid.png"
},
{
"property": "dryVolumePerArea",
"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": "https://png-files-bucket-dev.s3.us-east-1.amazonaws.com/uuid.png"
}
]

Machine Files Units

Here is an example of Units from the numerical properties of the Machine Files.

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