Vegetation indices
The Statistics API allows you to access statistical information derived from optical satellite imagery data for a specified area of interest (AOI) within defined time ranges. This data encompasses a comprehensive set of 17 vegetation indices, including NDVI, NDSI, NDWI, RECI, NDMI, SAVI, ARVI, EVI, GCI, SIPI, NBR, MSI, ISTACK, FIDET, NDRE, CCCI, MSAVI
, as well as the option to create custom indices using a general formula (e.g., (NIR-RED)/(NIR+RED)
) based on supported bands from the data source. Additionally, you can access true color and false color imagery for a holistic view of your area of interest.
Please note that for optimal service stability, it is recommended to include up to 3 indices in your request as bm_type and up to 365 days (1 year) as date range.
Examples​
Get Multi-Temporal Statistics with alias name​
Step 1: Create task for indices caclulating with POST
request​
curl --location --request POST 'https://api-connect.eos.com/api/gdw/api?api_key=<you_api_key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"type":"mt_stats",
"params": {
"bm_type":["NDVI", "MSI", "EVI"],
"date_start":"2020-01-01",
"date_end":"2020-09-20",
"geometry":
{
"coordinates": [
[
[-86.86718,41.317464],
[-86.86718,41.331596],
[-86.862631,41.331596],
[-86.862631,41.317464],
[-86.86718,41.317464]
]
],
"type":"Polygon"
},
"reference":"ref_20200924-00-20",
"sensors":["sentinel2"]
}
} '
Example of response:
{
"status": "created",
"task_id": "00dd1775-4fe4-420f-9ab8-19e967233154",
"req_id": "4554a79d-7b7c-4515-a94f-7ceeab2417c2",
"task_timeout": 172800
}
Step 2: Receive the result of calculation with GET
request and use task_id
from previous step​
curl --location --request GET 'https://api-connect.eos.com/api/gdw/api/00dd1775-4fe4-420f-9ab8-19e967233154'
--header 'x-api-key: <your_api_key>'
Example of response:
{
"errors": [
],
"result": [
{
"scene_id": "S2B_tile_20200609_16TEL_0",
"view_id": "S2/16/T/EL/2020/6/9/0",
"date": "2020-06-09",
"cloud": 0.0,
"notes": [],
"indexes": {
"NDVI": {
"q1": 0.06225877162069082,
"q3": 0.15613897889852524,
"max": 0.2816303074359894,
"min": -0.11201691627502441,
"p10": 0.026399594917893413,
"p90": 0.18484574854373936,
"std": 0.06289542393441379,
"median": 0.10764970630407333,
"average": 0.1059820607514931,
"variance": 0.003955834351889631
},
"MSI": {
"min": 0.708953857421875,
"max": 1.1564327478408813,
"average": 0.871500668306894,
"std": 0.07412427511032148,
"variance": 0.0054944081606306235,
"q1": 0.8077611029148102,
"q3": 0.9279850721359253,
"median": 0.8764504492282867,
"p10": 0.7769006192684174,
"p90": 0.9608058929443359
},
"EVI": {
"min": -98.12822723388672,
"max": 47.290531158447266,
"average": 0.3720668537617378,
"std": 3.8028567119188925,
"variance": 14.46171917138657,
"q1": 0.1694919317960739,
"q3": 0.3644031807780266,
"median": 0.2724674642086029,
"p10": 0.0719693697988987,
"p90": 0.5220617949962618
}
}
}
]
}
Example - get Multi-Temporal Statistics with formula​
If you want to get the same data, as in Crop Monitoring, please note that it is recommended to use General Formula or Satellite Formula
Step 1: Create task for indices caclulating with POST
request​
curl --location --request POST 'https://api-connect.eos.com/api/gdw/api?api_key=<you_api_key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"type":"mt_stats",
"params": {
"bm_type":["(B08-B04)/(B08+B04)"],
"date_start":"2020-01-01",
"date_end":"2020-09-20",
"geometry":
{
"coordinates": [
[
[-86.86718,41.317464],
[-86.86718,41.331596],
[-86.862631,41.331596],
[-86.862631,41.317464],
[-86.86718,41.317464]
]
],
"type":"Polygon"
},
"reference":"ref_20200924-00-20",
"sensors":["sentinel2"]
}
} '
Example of response:
{
"status": "created",
"task_id": "00dd1775-4fe4-420f-9ab8-19e967233154",
"req_id": "4554a79d-7b7c-4515-a94f-7ceeab2417c2",
"task_timeout": 172800
}
Step 2: Receive the result of calculation with GET
request and use task_id
from previous step​
curl --location --request GET 'https://api-connect.eos.com/api/gdw/api/00dd1775-4fe4-420f-9ab8-19e967233154?api_key=<your_api_key>'
Example of response:
{
"errors": [
],
"result": [
{
"scene_id": "S2B_tile_20200609_16TEL_0",
"view_id": "S2/16/T/EL/2020/6/9/0",
"date": "2020-06-09",
"cloud": 0.0,
"notes": [],
"indexes": {
"NDVI": {
"q1": 0.06225877162069082,
"q3": 0.15613897889852524,
"max": 0.2816303074359894,
"min": -0.11201691627502441,
"p10": 0.026399594917893413,
"p90": 0.18484574854373936,
"std": 0.06289542393441379,
"median": 0.10764970630407333,
"average": 0.1059820607514931,
"variance": 0.003955834351889631
},
"MSI": {
"min": 0.708953857421875,
"max": 1.1564327478408813,
"average": 0.871500668306894,
"std": 0.07412427511032148,
"variance": 0.0054944081606306235,
"q1": 0.8077611029148102,
"q3": 0.9279850721359253,
"median": 0.8764504492282867,
"p10": 0.7769006192684174,
"p90": 0.9608058929443359
},
"EVI": {
"min": -98.12822723388672,
"max": 47.290531158447266,
"average": 0.3720668537617378,
"std": 3.8028567119188925,
"variance": 14.46171917138657,
"q1": 0.1694919317960739,
"q3": 0.3644031807780266,
"median": 0.2724674642086029,
"p10": 0.0719693697988987,
"p90": 0.5220617949962618
}
}
}
]
}