Virtual Band Parsing and Validation

GET /api/render/(sensor)/parse_vb/(bands)
Parse and validate virtual band expression. Returns a dict with band_ids, designators and expressions.
Parameters:
Query Parameters:
 
  • scene_id – (optional, required for Sentinel-1) scene id. scene_id is required for Sentinel-1 to get list of valid bands, since it depands on polarization type, which can be determined from scene_id
  • api_key – (required) user’s API key
Response JSON Object:
 
  • designators (array) – list of band designators in expression, where a designator as a capital latin letter
  • expressions (array) – list of expressions, where each band is replaced with it’s designator
  • band_ids (array) – list of band identificators

Examples

Example Landsat 8. Valid band math expression

Example request:

http

GET /api/render/L8/parse_vb/(B1-B10)/(B4-B5),B1,B4?api_key=XXX HTTP/1.1
Host: gate.eos.com

curl

curl -i 'https://gate.eos.com/api/render/L8/parse_vb/(B1-B10)/(B4-B5),B1,B4?api_key=XXX'

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "designators": ["A", "B", "C", "D"],
    "expressions": ["(C-D)/(A-B)", "C", "A"],
    "band_ids": ["B4", "B5", "B1", "B10"]
}

Example Landsat 8. Invalid band math expression

Example request:

http

GET /api/render/L8/parse_vb/(B1-B20)/(B4-B5),B1,B4?api_key=XXX HTTP/1.1
Host: gate.eos.com

curl

curl -i 'https://gate.eos.com/api/render/L8/parse_vb/(B1-B20)/(B4-B5),B1,B4?api_key=XXX'

Example response:

HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json

{
    "status": false,
    "error": "Unsupported band or operation"
}