Sign in

Prepare satellite data and upload it to Web GIS

The tool allows you to get a Landsat 8 or Sentinel 2 scene in natural colors by its ID, crop it by the input vector mask, and upload it to Web GIS. More info

Form Python-code
You can run this tool via Python.
Go Premium to get a permission token.
import requests

headers = {'Authorization': 'Token xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx'}

# Upload files
url = 'https://toolbox.nextgis.com/api/upload/'
files = {}

file = open('...', 'rb')
response = requests.post(url, data=file, headers=headers, verify=False)
files['vector_dataset'] = response.text

# Create request
json_request = {'operation': 'les_remote_sensing', 'inputs': {}}
json_request['inputs']['scene_id'] = ...
json_request['inputs']['vector_dataset'] = files['vector_dataset']
json_request['inputs']['output_resolution'] = ...
json_request['inputs']['ngw_host'] = ...
json_request['inputs']['ngw_login'] = ...
json_request['inputs']['ngw_password'] = ...
json_request['inputs']['ngw_parent_resource'] = ...
json_request['inputs']['les_naming'] = BoolType

# Execute
url = 'https://toolbox.nextgis.com/api/json/execute/'
response = requests.post(url, json=json_request, headers=headers, verify=False)
task_id = response.json()['task_id']

# Check state
url = 'https://toolbox.nextgis.com/api/json/status/{task_id}/'.format(task_id=task_id)
response = requests.get(url, headers=headers, verify=False)
print response.json()