Field analytics
Field analytics delivers insights through statistical computations, including averages, standard deviations, classification areas, and more, applied to optical imagery data within specified band math expressions and time ranges for a given field.
Get index trend for field​
It is possible to retrieve information about the average vegetation index for a specified field within a date range including average, cloud coverage, date, maximum, minimum, variance and view id.
This endpoint contains two steps - one, POST request to create a task and a second one to GET a task result
Parameter | Description | is required |
---|---|---|
date_start | Initial date of the time lapse to retrieve the images. The service computes statistics for each image starting from the time indicated in the criteria | required |
date_end | Ending date of the time lapse to retrieve the images | required |
index | Set in this parameter one of the values or an alias or one expression or an array of band math expressions to be retrieved or computed. For the list of supported band math expressions please go through Reference information section for details | required |
data_source | Specify in this parameter the name or alias of the sensor from which the information will be retrieved, please go through Reference information section for details | required |
https://api-connect.eos.com/field-analytics/trend/<field_id>
Step 1:​
curl --location --request POST 'https://api-connect.eos.com/field-analytics/trend/9793351' \
--header 'Content-Type: text/plain' \
--header 'x-api-key: <your_api_key>' \
--data '{
"params": {
"date_start": "2023-01-17",
"date_end": "2023-09-28",
"index": "NDVI",
"data_source": "S2"
}
}'
Response:
{
"status": "created",
"request_id": "0ef43eb1-b57b-48f2-8b96-c31f366491dc"
}
Step 2:​
Use the request_id
returned in the answer of the previous end point and replace it by the end of this endpoint to get the results of the search
curl --location --request GET 'https://api-connect.eos.com/field-analytics/trend/9793351/0ef43eb1-b57b-48f2-8b96-c31f366491dc'
Response:
{
"status": "success",
"result": [
{
"scene_id": "S2B_tile_20230420_13REL_0",
"view_id": "S2/13/R/EL/2023/4/20/0",
"date": "2023-04-20",
"cloud": 0,
"notes": [],
"min": 0.05410449206829071,
"max": 0.8362395763397217,
"average": 0.6783056627925,
"std": 0.1726076326986568,
"variance": 0.02979339486583442,
"q1": 0.659638524055481,
"q3": 0.786281943321228,
"median": 0.7581182718276978,
"p10": 0.3831334114074707,
"p90": 0.802788496017456
},
...
{
"scene_id": "S2A_tile_20230823_13REL_0",
"view_id": "S2/13/R/EL/2023/8/23/0",
"date": "2023-08-23",
"cloud": 0,
"notes": [],
"min": 0.08074767142534256,
"max": 0.8301206827163696,
"average": 0.6912595611038774,
"std": 0.16984696478013123,
"variance": 0.02884799144502314,
"q1": 0.6993097066879272,
"q3": 0.7900504469871521,
"median": 0.7741795778274536,
"p10": 0.3775542080402374,
"p90": 0.797500491142273
}
]
}
Get classification area​
It is possible to retrieve information about the average vegetation index for a specified field within a date range including average, cloud coverage, date, maximum, minimum, variance and view id.
This endpoint contains two step - one, POST request to create a task and a second one to GET a task result
Get the index trend specified in the body of the request for a date range also specified on the body for a specific field indicated in the last part of the endpoint
POST https://api-connect.eos.com/classification-area/<field_id>
Parameter | Description | is required |
---|---|---|
index | Vegetation index or band math expression to be used as a basis to compute the areas. Exactly one expression has to be specified. (NDVI, RECI, NDRE, MSAVI) | required |
view_id | Scene id in ("S2/35/U/QR/2020/4/5/1", "S2/35/U/QR/2020/4/2/0", "MODIS/30/12/2021100/2021109132942", etc). | required |
data_source | Use for this parameter one value from the list of sensor abbreviation ("S2L1C", "S2L2A", "L8"). Default value is "S2L2A". | required |
colors | This fields describes the colors of the classes. Format:["red", "green", "blue"]. The number of colors must match the number of thresholds classes. | not required |
thresholds | This fields describes the edges of the classes. Format:[[float_min, float_max],…,[float_min, float_max]]. The first element of the range must be less than or equal to the second. All but the last (righthand-most) bin is half-open. In other words, if bins is: [1, 2, 3, 4], then the first bin is [1, 2) (including 1, but excluding 2) and the second [2, 3). The last bin, however, is [3, 4], which includes 4. | required |
callback_url | URL to which the calculation result will be sent. | not required |
Step 1:
curl --location --request POST 'https://api-connect.eos.com/classification-area/9793351' \
--header 'Content-Type: text/plain' \
--header 'x-api-key: <your_api_key>' \
--data '{
"params": {
"index": "NDVI",
"view_id": "S2/13/R/EL/2023/5/20/0",
"data_source": "S2L2A",
"thresholds": [
[
0.05,
0.95
]
],
"colors": [
"A6CDE3"
]
}
}'