Запуск CURL с использованием PYTHON 2.7 - PullRequest
0 голосов
/ 06 мая 2019

Я пытаюсь запустить код CURL, используя PYTHON 2.7.

Моя цель - установить многоугольник, время и загрузить его на свой компьютер. Я загружаю многоугольник из Sentinel 2

Кто-нибудь может мне помочь?

Спасибо

Код:

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
...