Back to data catalog

Agriculture API

Summary of the other API's, relevant for agriculture.

More info

Data sources

This API aggregates data from our other APIs. It gives a summary of the most useful data for agriculture. Specifically it provides summerized data from deforestation, flood, soil and weather APIs.

Examples

Example 1

Retrieving summary of agricultural relevant data from all the APIs.

1import io.openepi.common.ApiException;
2import io.openepi.agriculture.api.Agriculture;
3import io.openepi.agriculture.model.ModelsSummmary;
4
5import java.math.BigDecimal;
6
7
8public class Main {
9    public static void main(String[] args) {
10        Agriculture api = new AgricultureApi();
11        try {
12            BigDecimal lon = new BigDecimal("30.06");
13            BigDecimal lat = BigDecimal.valueOf(-1.94);
14            ModelsSummary response = api.getSummary(lon, lat);
15            System.out.println(response);
16        } catch (ApiException e) {
17            System.err.println("Exception when calling AgricultureApi#getSummary");
18            e.printStackTrace();
19        }
20    }
21}