Download Analytic

Download raster bands of a scene cropped by a bounding box or an area of interest (AOI). Result is saved on AWS S3 bucket, the URL is returned.

Result type:

  • jp2 if (len(bands)==1 and sensor == S2)
  • TIF if (len(bands)==1 and tile_md is None and product_md is None) or (merge==True and all_bands_are_of_the_same_resolution and tile_md is None and product_md is None)
  • else zip
POST /api?api_key=<API_KEY>
JSON Parameters:
 
  • type – (required) Operation name. Value is ‘lbe’.
  • 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.bands – (required) List of bands to download.
  • params.bbox – (required to crop by AOI: either bbox, geometry or cropper_ref must be set) Bounding box in EPSG:4326; order: westing, southing, easting, northing (i.e. minx, miny, maxx, maxy). If null process full scene.
  • params.geometry – (required to crop by AOI: either bbox, geometry or cropper_ref must be set) A GeoJSON representation of a geometry describing the AOI. Supported geometry types: “Polygon”, “MultiPolygon”. If neither geometry nor bbox were provided, then process a full scene
  • params.cropper_ref – (required to crop by AOI: either bbox, geometry or cropper_ref must be set) A resourse id of a GeoJSON representation of a geometry saved into data base using Cropper API
  • params.merge – (optional) Merge bands of the same resolution if true, else return separate bands. Default is true. Note: Takes no effect for NAIP.
  • params.metadata – (optional) List of metadata files to download.
  • params.reference – (required) Unique id to assign to the request
Query Parameters:
 
  • api_key – (required) user’s API key

Examples

Three bands of a Landsat 8 Scene

http

POST /api?api_key=XXX HTTP/1.1
Host: gdw.eos.com
Content-Type: application/json

{
    "type": "lbe",
    "params": {
            "view_id": "L8/LC08_L1TP_025039_20180103_20180118_01_T1",
            "bands": ["B1", "B2", "B3"],
            "bbox": [-95.3005599975586, 30.467614102257855, -95.12168884277345, 30.71379915543313],
            "merge": false,
        "metadata": [
            {"label": "Scene metadata", "url": "https://landsat-pds.s3.amazonaws.com/c1/L8/025/039/LC08_L1TP_025039_20180103_20180118_01_T1/LC08_L1TP_025039_20180103_20180118_01_T1_MTL.txt"}
        ],
        "reference": "ref_1543315137"
    }
}

curl

curl -i -X POST 'https://gdw.eos.com/api?api_key=XXX' -H 'Content-Type: application/json' --data-raw '{"params": {"bands": ["B1", "B2", "B3"], "bbox": [-95.3005599975586, 30.467614102257855, -95.12168884277345, 30.71379915543313], "merge": false, "metadata": [{"url": "https://landsat-pds.s3.amazonaws.com/c1/L8/025/039/LC08_L1TP_025039_20180103_20180118_01_T1/LC08_L1TP_025039_20180103_20180118_01_T1_MTL.txt", "label": "Scene metadata"}], "reference": "ref_1543315137", "view_id": "L8/LC08_L1TP_025039_20180103_20180118_01_T1"}, "type": "lbe"}'

Example CBERS-4. Crop by geometry

http

POST /api?api_key=XXX HTTP/1.1
Host: gdw.eos.com
Content-Type: application/json

{
   "type":"lbe",
   "params":{
       "view_id":"CBERS4/CBERS_4_MUX_20170111_153_119_L2",
       "geometry":{"type":"Polygon","coordinates":[[[-43.311882019042976,-16.618640255061596],[-43.31371560388687,-16.61868337881499],[-43.31554477393259,-16.618812646244322],[-43.31736512499391,-16.619027746106596],[-43.31917227408308,-16.61932816049484],[-43.32096186994682,-16.61971316608302],[-43.322729603526525,-16.620181835864777],[-43.324471218317655,-16.620733041381783],[-43.32618252060364,-16.621365455436486],[-43.32785938953986,-16.62207755528268],[-43.32949778706347,-16.622867626286283],[-43.33109376760546,-16.623733766047625],[-43.332643487581706,-16.624673888975384],[-43.334143214640214,-16.625685731301186],[-43.33558933664252,-16.626766856522938],[-43.33697837035757,-16.62791466126389],[-43.33830696984728,-16.62912638153332],[-43.33957193452364,-16.630399099374028],[-43.340770216857976,-16.631729749880495],[-43.34189892972387,-16.633115128571202],[-43.342955353355805,-16.634551899097197],[-43.343936941907096,-16.636036601268597],[-43.344841329590984,-16.637565659379757],[-43.34566633639007,-16.639135390813117],[-43.346409973320405,-16.640742014901157],[-43.34707044723716,-16.642381662025194],[-43.34764616517042,-16.64405038292913],[-43.34813573818036,-16.64574415822588],[-43.348537984722405,-16.6474589080736],[-43.34885193351402,-16.649190501998454],[-43.34907682589614,-16.6509347688404],[-43.349212117683244,-16.652687506797974],[-43.349257480497414,-16.654444493547988],[-43.34921280258301,-16.65620149641574],[-43.34907818909973,-16.657954282571335],[-43.348853961893035,-16.659698629227393],[-43.34854065874246,-16.661430333813804],[-43.3481390320892,-16.663145224104795],[-43.347650047245914,-16.664839168273993],[-43.347074880092826,-16.666508084853213],[-43.34641491426545,-16.668147952570912],[-43.34567173784051,-16.669754820046556],[-43.34484713952791,-16.671324815317508],[-43.343943104377686,-16.672854155175347],[-43.342961809012095,-16.674339154289154],[-43.341905616394385,-16.675776234093547],[-43.340777070146444,-16.67716193142014],[-43.33957888842912,-16.67849290685134],[-43.33831395739991,-16.679765952776414],[-43.33698532426339,-16.680978001130228],[-43.33559618993159,-16.68212613079594],[-43.33414990131162,-16.68320757465363],[-43.33264994323912,-16.684219726257897],[-43.331099930077386,-16.685160146128148],[-43.329503597001896,-16.68602656763627],[-43.327864790991875,-16.68681690247757],[-43.32618746155029,-16.687529245711477],[-43.3244756511749,-16.688161880359957],[-43.322733485603514,-16.688713281552346],[-43.320965163857004,-16.68918212020664],[-43.319174948104276,-16.689567266238182],[-43.317367153373816,-16.689867791288055],[-43.315546137136785,-16.6900829709645],[-43.31371628878695,-16.69021228659188],[-43.311882019042976,-16.69025542646303],[-43.310047749299,-16.69021228659188],[-43.30821790094916,-16.6900829709645],[-43.30639688471213,-16.689867791288055],[-43.304589089981675,-16.689567266238182],[-43.30279887422895,-16.68918212020664],[-43.30103055248244,-16.688713281552346],[-43.299288386911044,-16.688161880359957],[-43.297576576535654,-16.687529245711477],[-43.29589924709408,-16.68681690247757],[-43.29426044108406,-16.68602656763627],[-43.29266410800857,-16.685160146128148],[-43.291114094846826,-16.684219726257897],[-43.28961413677433,-16.68320757465363],[-43.28816784815435,-16.68212613079594],[-43.286778713822564,-16.680978001130228],[-43.28545008068604,-16.679765952776414],[-43.28418514965682,-16.67849290685134],[-43.28298696793951,-16.67716193142014],[-43.28185842169156,-16.675776234093547],[-43.280802229073856,-16.674339154289154],[-43.27982093370827,-16.672854155175347],[-43.27891689855804,-16.671324815317508],[-43.27809230024545,-16.669754820046556],[-43.2773491238205,-16.668147952570912],[-43.27668915799312,-16.666508084853213],[-43.27611399084003,-16.664839168273993],[-43.27562500599675,-16.663145224104795],[-43.275223379343494,-16.661430333813804],[-43.27491007619292,-16.659698629227393],[-43.27468584898622,-16.657954282571335],[-43.27455123550293,-16.65620149641574],[-43.27450655758854,-16.654444493547988],[-43.27455192040271,-16.652687506797974],[-43.274687212189804,-16.6509347688404],[-43.27491210457193,-16.649190501998454],[-43.27522605336355,-16.6474589080736],[-43.2756282999056,-16.64574415822588],[-43.276117872915535,-16.64405038292913],[-43.276693590848794,-16.642381662025194],[-43.277354064765554,-16.640742014901157],[-43.27809770169588,-16.639135390813117],[-43.278922708494974,-16.637565659379757],[-43.27982709617885,-16.636036601268597],[-43.28080868473014,-16.634551899097197],[-43.281865108362084,-16.633115128571202],[-43.282993821227976,-16.631729749880495],[-43.28419210356232,-16.630399099374028],[-43.28545706823867,-16.62912638153332],[-43.286785667728374,-16.62791466126389],[-43.288174701443424,-16.626766856522938],[-43.28962082344574,-16.625685731301186],[-43.29112055050425,-16.624673888975384],[-43.29267027048049,-16.623733766047625],[-43.294266251022485,-16.622867626286283],[-43.29590464854609,-16.62207755528268],[-43.297581517482314,-16.621365455436486],[-43.299292819768304,-16.620733041381783],[-43.30103443455942,-16.620181835864777],[-43.30280216813913,-16.61971316608302],[-43.30459176400287,-16.61932816049484],[-43.30639891309204,-16.619027746106596],[-43.30821926415336,-16.618812646244322],[-43.31004843419909,-16.61868337881499],[-43.311882019042976,-16.618640255061596]]]},
       "bands":["BAND5", "BAND6","BAND7","BAND8"],
       "merge":false,
       "reference": "ref_1543315137"
   }
}

curl

curl -i -X POST 'https://gdw.eos.com/api?api_key=XXX' -H 'Content-Type: application/json' --data-raw '{"params": {"bands": ["BAND5", "BAND6", "BAND7", "BAND8"], "geometry": {"coordinates": [[[-43.311882019042976, -16.618640255061596], [-43.31371560388687, -16.61868337881499], [-43.31554477393259, -16.618812646244322], [-43.31736512499391, -16.619027746106596], [-43.31917227408308, -16.61932816049484], [-43.32096186994682, -16.61971316608302], [-43.322729603526525, -16.620181835864777], [-43.324471218317655, -16.620733041381783], [-43.32618252060364, -16.621365455436486], [-43.32785938953986, -16.62207755528268], [-43.32949778706347, -16.622867626286283], [-43.33109376760546, -16.623733766047625], [-43.332643487581706, -16.624673888975384], [-43.334143214640214, -16.625685731301186], [-43.33558933664252, -16.626766856522938], [-43.33697837035757, -16.62791466126389], [-43.33830696984728, -16.62912638153332], [-43.33957193452364, -16.630399099374028], [-43.340770216857976, -16.631729749880495], [-43.34189892972387, -16.633115128571202], [-43.342955353355805, -16.634551899097197], [-43.343936941907096, -16.636036601268597], [-43.344841329590984, -16.637565659379757], [-43.34566633639007, -16.639135390813117], [-43.346409973320405, -16.640742014901157], [-43.34707044723716, -16.642381662025194], [-43.34764616517042, -16.64405038292913], [-43.34813573818036, -16.64574415822588], [-43.348537984722405, -16.6474589080736], [-43.34885193351402, -16.649190501998454], [-43.34907682589614, -16.6509347688404], [-43.349212117683244, -16.652687506797974], [-43.349257480497414, -16.654444493547988], [-43.34921280258301, -16.65620149641574], [-43.34907818909973, -16.657954282571335], [-43.348853961893035, -16.659698629227393], [-43.34854065874246, -16.661430333813804], [-43.3481390320892, -16.663145224104795], [-43.347650047245914, -16.664839168273993], [-43.347074880092826, -16.666508084853213], [-43.34641491426545, -16.668147952570912], [-43.34567173784051, -16.669754820046556], [-43.34484713952791, -16.671324815317508], [-43.343943104377686, -16.672854155175347], [-43.342961809012095, -16.674339154289154], [-43.341905616394385, -16.675776234093547], [-43.340777070146444, -16.67716193142014], [-43.33957888842912, -16.67849290685134], [-43.33831395739991, -16.679765952776414], [-43.33698532426339, -16.680978001130228], [-43.33559618993159, -16.68212613079594], [-43.33414990131162, -16.68320757465363], [-43.33264994323912, -16.684219726257897], [-43.331099930077386, -16.685160146128148], [-43.329503597001896, -16.68602656763627], [-43.327864790991875, -16.68681690247757], [-43.32618746155029, -16.687529245711477], [-43.3244756511749, -16.688161880359957], [-43.322733485603514, -16.688713281552346], [-43.320965163857004, -16.68918212020664], [-43.319174948104276, -16.689567266238182], [-43.317367153373816, -16.689867791288055], [-43.315546137136785, -16.6900829709645], [-43.31371628878695, -16.69021228659188], [-43.311882019042976, -16.69025542646303], [-43.310047749299, -16.69021228659188], [-43.30821790094916, -16.6900829709645], [-43.30639688471213, -16.689867791288055], [-43.304589089981675, -16.689567266238182], [-43.30279887422895, -16.68918212020664], [-43.30103055248244, -16.688713281552346], [-43.299288386911044, -16.688161880359957], [-43.297576576535654, -16.687529245711477], [-43.29589924709408, -16.68681690247757], [-43.29426044108406, -16.68602656763627], [-43.29266410800857, -16.685160146128148], [-43.291114094846826, -16.684219726257897], [-43.28961413677433, -16.68320757465363], [-43.28816784815435, -16.68212613079594], [-43.286778713822564, -16.680978001130228], [-43.28545008068604, -16.679765952776414], [-43.28418514965682, -16.67849290685134], [-43.28298696793951, -16.67716193142014], [-43.28185842169156, -16.675776234093547], [-43.280802229073856, -16.674339154289154], [-43.27982093370827, -16.672854155175347], [-43.27891689855804, -16.671324815317508], [-43.27809230024545, -16.669754820046556], [-43.2773491238205, -16.668147952570912], [-43.27668915799312, -16.666508084853213], [-43.27611399084003, -16.664839168273993], [-43.27562500599675, -16.663145224104795], [-43.275223379343494, -16.661430333813804], [-43.27491007619292, -16.659698629227393], [-43.27468584898622, -16.657954282571335], [-43.27455123550293, -16.65620149641574], [-43.27450655758854, -16.654444493547988], [-43.27455192040271, -16.652687506797974], [-43.274687212189804, -16.6509347688404], [-43.27491210457193, -16.649190501998454], [-43.27522605336355, -16.6474589080736], [-43.2756282999056, -16.64574415822588], [-43.276117872915535, -16.64405038292913], [-43.276693590848794, -16.642381662025194], [-43.277354064765554, -16.640742014901157], [-43.27809770169588, -16.639135390813117], [-43.278922708494974, -16.637565659379757], [-43.27982709617885, -16.636036601268597], [-43.28080868473014, -16.634551899097197], [-43.281865108362084, -16.633115128571202], [-43.282993821227976, -16.631729749880495], [-43.28419210356232, -16.630399099374028], [-43.28545706823867, -16.62912638153332], [-43.286785667728374, -16.62791466126389], [-43.288174701443424, -16.626766856522938], [-43.28962082344574, -16.625685731301186], [-43.29112055050425, -16.624673888975384], [-43.29267027048049, -16.623733766047625], [-43.294266251022485, -16.622867626286283], [-43.29590464854609, -16.62207755528268], [-43.297581517482314, -16.621365455436486], [-43.299292819768304, -16.620733041381783], [-43.30103443455942, -16.620181835864777], [-43.30280216813913, -16.61971316608302], [-43.30459176400287, -16.61932816049484], [-43.30639891309204, -16.619027746106596], [-43.30821926415336, -16.618812646244322], [-43.31004843419909, -16.61868337881499], [-43.311882019042976, -16.618640255061596]]], "type": "Polygon"}, "merge": false, "reference": "ref_1543315137", "view_id": "CBERS4/CBERS_4_MUX_20170111_153_119_L2"}, "type": "lbe"}'

Example Sentinel-2. Crop by saved geometry

  1. Save the geometry using Cropper API.

http

POST /api/render/cropper/?api_key=XXX HTTP/1.1
Host: gate.eos.com
Content-Type: application/json

{
    "type": "Feature",
    "properties": {},
    "geometry": {
            "type": "Polygon",
            "coordinates": [
                    [
                            [-101.949692, 39.422403],
                            [-102.036896, 39.351821],
                            [-101.978531, 39.260436],
                            [-101.848068, 39.247676],
                            [-101.770477, 39.310394],
                            [-101.757431, 39.388979],
                            [-101.852188, 39.434602],
                            [-101.949692, 39.422403]
                    ]
            ]
    }
}

curl

curl -i -X POST 'https://gate.eos.com/api/render/cropper/?api_key=XXX' -H 'Content-Type: application/json' --data-raw '{"geometry": {"coordinates": [[[-101.949692, 39.422403], [-102.036896, 39.351821], [-101.978531, 39.260436], [-101.848068, 39.247676], [-101.770477, 39.310394], [-101.757431, 39.388979], [-101.852188, 39.434602], [-101.949692, 39.422403]]], "type": "Polygon"}, "properties": {}, "type": "Feature"}'

If a resource has been created successfully, the server responds with 200 OK:

HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json; charset=UTF-8

{"cropper_ref": "c230d39994ab5f7a664c52d28eff1130"}
  1. Request download setting the AOI with a cropper_ref:

http

POST /api?api_key=XXX HTTP/1.1
Host: gdw.eos.com
Content-Type: application/json

{
   "type":"lbe",
   "params":{
       "view_id":"S2/14/S/KJ/2018/11/22/0",
       "cropper_ref": "c230d39994ab5f7a664c52d28eff1130",
       "bands":["B04", "B03","B02"],
       "merge":true,
       "reference": "ref_1543315137"
   }
}

curl

curl -i -X POST 'https://gdw.eos.com/api?api_key=XXX' -H 'Content-Type: application/json' --data-raw '{"params": {"bands": ["B04", "B03", "B02"], "cropper_ref": "c230d39994ab5f7a664c52d28eff1130", "merge": true, "reference": "ref_1543315137", "view_id": "S2/14/S/KJ/2018/11/22/0"}, "type": "lbe"}'