Skip to main content

Download visual

Fetch an 8-bit image with bands in EPSG:3857, available in formats such as "jpeg," "tiff," and "png"

HTTP Request

curl --location --request POST 'https://api-connect.eos.com/api/gdw/api?api_key=<your_api_key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"type": "jpeg",
"params": {
"view_id": "view_id",
"bm_type": "bm_type",
"geometry":{
"type": "Polygon",
"coordinates": [[
[lon,lat],
[lon,lat],
.........,
[lon,lat]
]]
},
"px_size": number,
"format":"tiff",
"colormap": "colormap_id",
"reference": "ref_datetime"
}
}'

Request Parameters

ParameterValueDescription
api_key<your api key>(Required) Apikey retrieved from developer portal
Request Body ParameterDescription
type(required) Operation name. Value is ‘jpeg’.
params(required) Request parameters.
params.view_id(required) View id of the scene returned by the Search API, see Search API.
Example values: “L8/LC80110312016028LGN00”, “S2/19/T/CG/2017/7/9/0”, “MODIS/12/04/2017204/2017213034223” etc
params.geometry(required) A GeoJSON representation of a geometry describing the AOI.
Supported geometry types: “Polygon”.
params.bm_type(required) Band combination to visualize.
Example: “(B5-B4)/(B5+B4),(B3-B5)/(B3+B5),(B3-B6)/(B3+B6)”, “B5-1” etc.
For available band combinations please refer to Name Aliases and Supported Datasets
params.name_alias(optional) User name of the band combination to be used in output file name.
params.resample(optional) Interpolation type to use with WMS.
Valid values: “near”, “bilinear”, “cubic”, “cubicspline”, “lanczos”, “average”, “mode”, “max”, “min”, “med”, “q1”, “q3”. Default is “cubic”.
params.colormap(optional) Colorize bandmath result with the specified colormap.
For avaliable palettes see Colorization and example colormap
params.levels(optional) An option to use with COLORMAP; rescale bandmath levels to the specified values. Default: -0.5,0.5
params.colors_limit(optional) An option to use with COLORMAP, used for colormap discretization.
params.calibrate(optional) Convert DN to ToA reflectance if 1.
Valid values: 0, 1.
Default: 0 (calibration disabled).
params.px_size(required) Output raster pixel size in meters.
params.size(optional) Output image dimensions setting from LV. Used for logging purpose only.
Valid values: “S”, “M”, “L”, “XL”. Default: null.
params.georeference(optional) Return georeferenced image if provided.
Valid values: “world”, “kmz”, “tiff”.
If “world”: return an image (.jpeg) and a world file (.jpegw) in a zip archive; if “kmz” return “kmz”; if “tiff” return geotiff; else return an image (.jpeg).
Default: null.
params.format(optional) Image format. Valid values: “jpeg”, “tiff”, “png”. Default: “jpeg”
params.pansharpening(optional) Apply pansharpening if True.
params.reference(required) Unique id to assign to the request
params.colors(optional) List of colors to use with range colorization.
Thresholds are set in params.thresholds. For more info on range colorization see Range colorization
params.thresholds(optional) List of thresholds to use with range colorization. Colors are set in params.colors.For more info on range colorization see Range colorization
info

Image format. Valid values: “jpeg”, “tiff”, “png”. Default: “jpeg”

HTTP Response

The above commands returns the following JSON with task status

{
"status": "status",
"task_id": "task_id",
"req_id": "req_id",
"task_timeout": task_timeout
}

After that, you need to send a request for checking task status using task_id

Example: Download image of the NDVI from Sentinel2 from the AOI

Step 1: Create task for index caclulating with POST request

curl --location --request POST 'https://api-connect.eos.com/api/gdw/api' \
--data '{
"type": "jpeg",
"params": {
"view_id": "S2/13/R/EL/2023/7/19/0",
"bm_type": "NDVI",
"geometry":{"type": "Polygon",
"coordinates": [
[
[-104.87931347024973, 27.166227117387663],
[-104.87190853064376,27.17371136921598],
[-104.87486446023671,27.175686643908065],
[-104.87271173924485,27.178599422270565],
[-104.87575466983847,27.180525385046096],
[-104.88103048496039,27.176643443128853],
[-104.87771956045358,27.172771682872458],
[-104.88236756436531,27.17042134807906],
[-104.87931347024973,27.166227117387663]
]
]
},
"px_size": 4,
"format":"png",
"colormap": "a9bc6eceeef2a13bb88a7f641dca3aa0",
"levels": "-1.0,1.0",
"reference": "ref_datetime",
"calibrate": 1
}
}'

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/5144aaff-f442-4b18-b20f-7c239ac15a3f' \
--header 'x-api-key: <your_api_key>'
Example banner
Custom colormap

You can create custom colormap with Colormap endpoint