Sign in

KML to geodata

Convert KML, KMZ to structured geodata (GeoJSON). 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['kmlfile'] = response.text

# Create request
json_request = {'operation': 'kml2geodata', 'inputs': {}}
json_request['inputs']['kmlfile'] = files['kmlfile']
json_request['inputs']['ngdriveid'] = ...
json_request['inputs']['fields'] = ...

# 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()