0

I'm trying to run the CURL code using PYTHON 2.7.

My goal is to set a polygon, times and download it to me on your computer. I download the polygon from Sentinel 2

can anyone help me ?

Thanks

Code:

curl -X POST \
  https://services.sentinel-hub.com/api/v1/process \
  -H 'cache-control: no-cache' \
  -H 'content-type: multipart/form-data' \
  -F 'request={
    "input": {
        "bounds": {
            "properties": {
                "crs": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
            },
            "bbox": [
                13.822174072265625,
                45.85080395917834,
                14.55963134765625,
                46.29191774991382
            ]
        },
        "data": [
            {
                "type": "S2L2A",
                "dataFilter": {
                    "timeRange": {
                        "from": "2018-10-01T00:00:00Z",
                        "to": "2018-12-31T00:00:00Z"
                    }
                }
            }
        ]
    },
    "output": {
        "width": 512,
        "height": 512
    }
}
' \
  -F 'evalscript=//VERSION=3

function setup() {
  return {
    input: ["B02", "B03", "B04"],
    output: { bands: 3 }
  }
}

function evaluatePixel(sample) {
  return [2.5 * sample.B04, 2.5 * sample.B03, 2.5 * sample.B02]
}'> output.png
Yotam
  • 31
  • 3
  • What have _you_ tried to do this? The simplest solution could be to run this exact command using `os.system` or `subprocess`. – ForceBru May 06 '19 at 12:41
  • But it's not Python's code. I'm trying to convert it to Python. – Yotam May 06 '19 at 12:48

0 Answers0