05 Mar, 2024

How to translate and integrate field operations (quickstart)

How to translate and integrate field operations (quickstart)

About

In this tutorial, we’ll show you how to quickly set up field operations with Leaf’s unified API. Leaf translates and merges raw machine files from multiple machine providers and turns them into standardized field operations. This includes planting, application, harvest and tillage. This is a quickstart guide intended for testing in minimal steps - if you’re preparing for production, we recommend the production tutorial instead.

Why integrate operations through Leaf instead of going direct to providers?

  • Receive clean operations data, translated to a consistent format
  • Increase speed to market by skipping the need to build backend infrastructure
  • Provide integrations from many different providers to increase your addressable market
  • Less ongoing API maintenance

To learn more about the benefits, click here.


Summary


1. Register for a Leaf account

First, you’ll need to register for a Leaf account. If you don’t yet have an account you can register below. Make sure to activate your account via the activation email.

Register with Leaf -->

2. Authenticate to access Leaf’s API

Next, you’ll need to authenticate by requesting your access token:

View documentation -->

3. Integrate providers with Magic Link

Using Leaf Magic Link to set up provider authentication requires no front-end coding, so you can simply send a URL to growers to authenticate with their providers.

Leaf Magic Link uses your application credentials to do the authentication, so you first need to inform it of your desired providers using our set up guides.

Set up providers -->

Then, simply create the Magic Link:

This setup will make you compatible with all providers that you connected by default. If you want to filter to specific providers, you can use the "allowedProviders" parameter. E.g if you only want to allow John Deere and Climate FieldView, add this: "allowedProviders": ["JohnDeere", "ClimateFieldView"]. Remember the provider set up is still required to enable them.

There is also another option with a different layout for a single provider authentication, check the authentication option here.

4. Understand Leaf Operations

It’s important to understand the following definitions before proceeding.

Machine file summary: Basic information of files derived from the point data, processed and cleaned by Leaf, in Leaf’s standardized output. Data outputs will vary by the type of task performed (planted, applied, harvested, tillage). You’ll find some sample responses here.

Operations: Field Operations data files merged based on task, time and boundary intersection (planting, application, harvest, tillage).

Operation summary: The output of merged files (Leaf Operations) geospatially attached to a field boundary, that are processed and cleaned by Leaf. Operations only form if there are boundaries present.You’ll find some sample responses here.

5. Check your Field Operations

By connecting a provider in step 3, you have already connected field boundaries. Once these boundaries are connected and your machine files have been converted into Leaf's standard format, Leaf will automatically merge machine files into operations. This merging process runs once every 4 hrs. Once all of the processing is completed (operationsProcessingFinished alert) you can fetch your operations using the following endpoints:

Note that you can also filter it by Leaf user.

If the Field Operations are not available yet, try again after the processing time.

It's also important to note that Leaf requires at least one operation before proceeding.

For each field operation, you can see the important properties, like:

With these properties, you can get extra information, like the field boundary, summary, and the Standard GeoJSON:

Field Operation summary

Field Operation Standard GeoJSON

Leaf’s API also offers a filtered GeoJSON which lets you add more clean-up criteria. You can find more information here. The Filtered GeoJSON makes our image (V2) functionality available which creates images based on the operation properties. Here is how you can get them:

In the endpoint response, you will find an image per each numerical property and a legend with the values. This is what a V2 image looks like.

Leaf, data infrastructure for agriculture

View documentation -->

Our last tips

Make sure to review and set your configurations according to your needs.

View configurations -->

By setting up alerts through Leaf, you can be notified of new data and updates instead of repeatedly querying for changes.

View alerts -->

Excellent, you’ve now set up field operations. Where to next?

--> Get help from the Leaf team --> Field Boundaries --> Manual File Upload --> Crop Monitoring --> Back to the page for developers

Ready to begin?

Get a Demo and Start Building Today!