GeoCzech API
Converter
Convert GIS, CAD and GPS data between 100+ formats — and on the way change the coordinate system, keep only some features or fields, or cut out an area.
What it does
Give the Converter a file and say what you want back. It recognises the input format by itself, picks the right conversion route, deals with the usual incompatibilities between formats (field name limits, mixed geometry types, fixed coordinate systems …) and tells you about everything it adjusted.
Typical uses
- Exchange data between programs — Shapefile → GeoJSON for a web map, KML from Google Earth → Shapefile for QGIS or ArcGIS, GeoPackage → DXF for AutoCAD.
- Recalculate coordinates — from GPS (WGS 84) to a UTM zone or a national grid, or back.
- Turn a table with coordinates (CSV, Excel) into map data.
- Take only what you need — features matching a condition, selected attributes, or everything inside an area.
- Automate it — convert every file that lands in a folder, every night.
Prefer no code?
The same converter runs in your browser at MyGeodata Cloud.
At a glance
- Endpoint:
POST /v2/tool/converter - Method:
convert(the default — you can leavemethodout) - Inputs: upload (
files) or link (file_urls); ZIP archives are unpacked - Result: converted files in
output_files+ a report injson_data - Price: by processing time, from 1 credit — see Credits
Convert a file
Send the input and a params JSON with at least the output format:
{"output": {"format": "gpkg"}}
Everything else is optional. The settings are grouped into three parts —
source (how to read the input), operations (what to do with the data, in
order) and output (what to produce).
params → output
-
output.formatstring required -
The target format — a key from the format list, e.g.
geojson,shapefile,gpkg,kml,dxf,csv_xy. -
output.target_crsstring -
Recalculate the coordinates into this coordinate system, e.g.
EPSG:32730(UTM zone 30S) orEPSG:4326(WGS 84). Leave it out to keep the original system. Formats with a fixed system (GeoJSON, KML, GPX = WGS 84) are reprojected automatically. -
output.namestring -
Base name of the output file(s). By default the input file name is used.
-
output.layer_namestring -
Name of the layer in the output (for formats that have layer names).
-
output.packagestring defaultauto -
autoreturns a single file as it is and packs multi-file results (a Shapefile, several layers) into one ZIP (converted.zip).zipalways packs,nonenever.Allowed values:
auto·zip·none -
output.encodingstring -
Text encoding for formats that need it, e.g.
UTF-8orCP1252for an old Shapefile reader. Default UTF-8.
Advanced parameters (5)
-
output.layer_strategystring defaultauto -
What to do when the input has more layers than the output format can hold — one file per layer, merge into one layer, or fail.
Allowed values:
auto·split_files·merge·fail -
output.geometry_strategystring defaultauto -
What to do with mixed geometry types (points + lines + polygons) when the output allows only one per layer (e.g. Shapefile).
Allowed values:
auto·split·promote_multi·fail -
output.field_name_policystring defaultauto -
autoshortens/renames attribute names the output cannot store (Shapefile: max. 10 characters) and reports the mapping;strictfails instead.Allowed values:
auto·strict -
output.on_errorstring defaultskip -
skipconverts what it can and marks the resultpartial;failstops at the first problem.Allowed values:
skip·fail -
output.creation_optionsobject -
Expert settings of the output format —
{"dsco": {...}, "lco": {...}}(dataset/layer creation options).
Reading the input
Usually you do not need any of these — the Converter detects the format and the coordinate system itself. Use them when the input is ambiguous.
params → source
-
source.source_crsstring -
The coordinate system of the input, when the file does not say it (no
.prj, a CSV, a DXF drawing) or says it wrong. E.g.EPSG:32730. This only labels the data — combine withoutput.target_crsto recalculate. -
source.layersarray of strings -
Convert only these layers of a multi-layer input (GeoPackage, File Geodatabase, GPX …).
Advanced parameters (3)
-
source.formatstring defaultauto -
Force the input format (a format key) instead of detecting it.
-
source.open_optionsobject -
Open options of the input format. Most useful for tables:
{"X_POSSIBLE_NAMES": "lon", "Y_POSSIBLE_NAMES": "lat"}tells which CSV columns hold the coordinates. -
source.kindstring defaultauto -
For files that contain both vector and raster data (e.g. a GeoPDF), which part to convert.
Allowed values:
auto·vector·raster
Operations
operations is a list of steps applied in order between reading and writing.
Each step is an object with an op key.
op |
Keys | What it does |
|---|---|---|
filter |
where (required), layers |
Keep only features matching a condition, e.g. "elevation > 500" or "category = 'museum'" (SQL WHERE syntax). |
select_fields |
fields (required), layers |
Keep only these attributes, optionally renamed: [{"name": "NAME_EN", "rename": "name"}]. |
clip |
bbox or geometry |
Keep only what lies inside a rectangle [minX, minY, maxX, maxY] or a WKT polygon. Coordinates are in the CRS of the input. |
reproject |
target_crs (required) |
Recalculate coordinates. Same as output.target_crs, but you choose when it happens. |
Operations work with vector data; for rasters only clip with a bbox and
reproject are available.
General options
general holds a few cross-format switches, all optional:
| Option | Values | Effect |
|---|---|---|
KEEP_GEOMETRY_TYPE |
points, lines, polygons |
Keep only one kind of geometry. |
FORCE_GEOMETRY_TYPE |
POINT, LINESTRING, POLYGON, MULTI…, PROMOTE_TO_MULTI |
Force the output geometry type. |
GEOMETRY_DIMENSION |
XY, XYZ |
Drop or keep heights (Z). |
NODATA_VALUE |
number or none |
Raster: set or remove the "no data" value. |
SIDE_FILES |
ALL, NONE |
Raster: keep every side file of the output (.aux.xml, world file, .prj) or none. By default only those the output needs. |
Example: {"general": {"KEEP_GEOMETRY_TYPE": "points"}, "output": {"format": "csv_xy"}}.
Example: change the coordinate system
Convert the St Helena places (GPS coordinates, WGS 84) into a Shapefile in UTM zone 30S (EPSG:32730) — a projected system with coordinates in metres, the kind GIS and CAD software prefers for measuring and drawing.
A Shapefile consists of several files, so the result comes as one ZIP.
curl -X POST "https://api.geoczech.dev/v2/tool/converter" \
-H "X-API-Key: YOUR_API_KEY" \
-F "file_urls=https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson" \
--form-string 'params={
"output": {
"format": "shapefile",
"target_crs": "EPSG:32730"
}
}' \
-F "wait=true"
import json
import requests
API_KEY = "YOUR_API_KEY"
response = requests.post(
"https://api.geoczech.dev/v2/tool/converter",
headers={"X-API-Key": API_KEY},
files={
"file_urls": (None, "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson"),
"params": (None, json.dumps({
"output": {
"format": "shapefile",
"target_crs": "EPSG:32730",
},
})),
"wait": (None, "true"),
},
timeout=120,
)
response.raise_for_status()
print(response.json())
const API_KEY = "YOUR_API_KEY";
const form = new FormData();
form.append("file_urls", "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson");
form.append("params", JSON.stringify({
"output": {"format": "shapefile", "target_crs": "EPSG:32730"}
}));
form.append("wait", "true");
const response = await fetch("https://api.geoczech.dev/v2/tool/converter", {
method: "POST",
headers: { "X-API-Key": API_KEY },
body: form,
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.json());
<?php
$apiKey = "YOUR_API_KEY";
$curl = curl_init("https://api.geoczech.dev/v2/tool/converter");
curl_setopt_array($curl, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["X-API-Key: $apiKey"],
CURLOPT_POSTFIELDS => [
"file_urls" => "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson",
"params" => json_encode([
"output" => [
"format" => "shapefile",
"target_crs" => "EPSG:32730",
],
]),
"wait" => "true",
],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
]);
$response = curl_exec($curl);
print_r(json_decode($response, true));
using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(120) };
client.DefaultRequestHeaders.Add("X-API-Key", "YOUR_API_KEY");
using var form = new MultipartFormDataContent();
form.Add(new StringContent("https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson"), "file_urls");
form.Add(new StringContent("""
{
"output": {
"format": "shapefile",
"target_crs": "EPSG:32730"
}
}
"""), "params");
form.Add(new StringContent("true"), "wait");
var response = await client.PostAsync("https://api.geoczech.dev/v2/tool/converter", form);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
{
"status": "SUCCESS",
"output_files": ["https://…/result.json?…", "https://…/converted.zip?…"],
"json_data": {
"status": "ok",
"outputs": [{
"format": "shapefile",
"crs": "EPSG:32730",
"layers": [{"name": "st-helena-places", "featureCount": 58}],
"archive": "converted.zip",
"files": [
{"name": "st-helena-places.shp", "role": "data"},
{"name": "st-helena-places.dbf", "role": "sidecar"},
{"name": "st-helena-places.shx", "role": "sidecar"},
{"name": "st-helena-places.prj", "role": "sidecar"},
{"name": "st-helena-places.cpg", "role": "sidecar"}
]
}],
"decisions": [{
"code": "packaged_zip",
"message": "Output consists of 5 files — packed into converted.zip."
}]
}
}
Example: table with coordinates → map data
A CSV (or Excel) table becomes points. Tell the Converter which columns hold the coordinates and in which system they are; here we also recalculate them to UTM zone 30S and save a GeoPackage — a modern single-file format readable by QGIS, ArcGIS and others.
curl -X POST "https://api.geoczech.dev/v2/tool/converter" \
-H "X-API-Key: YOUR_API_KEY" \
-F "file_urls=https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.csv" \
--form-string 'params={
"source": {
"source_crs": "EPSG:4326",
"open_options": {
"X_POSSIBLE_NAMES": "lon",
"Y_POSSIBLE_NAMES": "lat"
}
},
"output": {"format": "gpkg", "target_crs": "EPSG:32730"}
}' \
-F "wait=true"
import json
import requests
API_KEY = "YOUR_API_KEY"
response = requests.post(
"https://api.geoczech.dev/v2/tool/converter",
headers={"X-API-Key": API_KEY},
files={
"file_urls": (None, "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.csv"),
"params": (None, json.dumps({
"source": {
"source_crs": "EPSG:4326",
"open_options": {
"X_POSSIBLE_NAMES": "lon",
"Y_POSSIBLE_NAMES": "lat",
},
},
"output": {
"format": "gpkg",
"target_crs": "EPSG:32730",
},
})),
"wait": (None, "true"),
},
timeout=120,
)
response.raise_for_status()
print(response.json())
const API_KEY = "YOUR_API_KEY";
const form = new FormData();
form.append("file_urls", "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.csv");
form.append("params", JSON.stringify({
"source": {
"source_crs": "EPSG:4326",
"open_options": {
"X_POSSIBLE_NAMES": "lon",
"Y_POSSIBLE_NAMES": "lat"
}
},
"output": {"format": "gpkg", "target_crs": "EPSG:32730"}
}));
form.append("wait", "true");
const response = await fetch("https://api.geoczech.dev/v2/tool/converter", {
method: "POST",
headers: { "X-API-Key": API_KEY },
body: form,
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.json());
<?php
$apiKey = "YOUR_API_KEY";
$curl = curl_init("https://api.geoczech.dev/v2/tool/converter");
curl_setopt_array($curl, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["X-API-Key: $apiKey"],
CURLOPT_POSTFIELDS => [
"file_urls" => "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.csv",
"params" => json_encode([
"source" => [
"source_crs" => "EPSG:4326",
"open_options" => [
"X_POSSIBLE_NAMES" => "lon",
"Y_POSSIBLE_NAMES" => "lat",
],
],
"output" => [
"format" => "gpkg",
"target_crs" => "EPSG:32730",
],
]),
"wait" => "true",
],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
]);
$response = curl_exec($curl);
print_r(json_decode($response, true));
using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(120) };
client.DefaultRequestHeaders.Add("X-API-Key", "YOUR_API_KEY");
using var form = new MultipartFormDataContent();
form.Add(new StringContent("https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.csv"), "file_urls");
form.Add(new StringContent("""
{
"source": {
"source_crs": "EPSG:4326",
"open_options": {
"X_POSSIBLE_NAMES": "lon",
"Y_POSSIBLE_NAMES": "lat"
}
},
"output": {"format": "gpkg", "target_crs": "EPSG:32730"}
}
"""), "params");
form.Add(new StringContent("true"), "wait");
var response = await client.PostAsync("https://api.geoczech.dev/v2/tool/converter", form);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
{
"status": "SUCCESS",
"output_files": ["https://…/result.json?…", "https://…/st-helena-places.gpkg?…"],
"json_data": {
"status": "ok",
"outputs": [{
"format": "gpkg",
"crs": "EPSG:32730",
"layers": [{"name": "st-helena-places", "featureCount": 58}]
}],
"decisions": [{
"code": "crs_assigned",
"message": "Source CRS EPSG:4326 assigned to layer(s) without CRS: st-helena-places."
}]
}
}
Example: keep only some features and fields
Keep only the places higher than 500 m above sea level, keep only the name and
elevation attributes, and save the result as KML for Google Earth. Nineteen of the
58 places pass the filter.
curl -X POST "https://api.geoczech.dev/v2/tool/converter" \
-H "X-API-Key: YOUR_API_KEY" \
-F "file_urls=https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip" \
--form-string 'params={
"operations": [
{"op": "filter", "where": "elevation > 500"},
{
"op": "select_fields",
"fields": [{"name": "name"}, {"name": "elevation"}]
}
],
"output": {"format": "kml"}
}' \
-F "wait=true"
import json
import requests
API_KEY = "YOUR_API_KEY"
response = requests.post(
"https://api.geoczech.dev/v2/tool/converter",
headers={"X-API-Key": API_KEY},
files={
"file_urls": (None, "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip"),
"params": (None, json.dumps({
"operations": [
{"op": "filter", "where": "elevation > 500"},
{
"op": "select_fields",
"fields": [
{"name": "name"},
{"name": "elevation"},
],
},
],
"output": {"format": "kml"},
})),
"wait": (None, "true"),
},
timeout=120,
)
response.raise_for_status()
print(response.json())
const API_KEY = "YOUR_API_KEY";
const form = new FormData();
form.append("file_urls", "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip");
form.append("params", JSON.stringify({
"operations": [
{"op": "filter", "where": "elevation > 500"},
{
"op": "select_fields",
"fields": [{"name": "name"}, {"name": "elevation"}]
}
],
"output": {"format": "kml"}
}));
form.append("wait", "true");
const response = await fetch("https://api.geoczech.dev/v2/tool/converter", {
method: "POST",
headers: { "X-API-Key": API_KEY },
body: form,
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.json());
<?php
$apiKey = "YOUR_API_KEY";
$curl = curl_init("https://api.geoczech.dev/v2/tool/converter");
curl_setopt_array($curl, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["X-API-Key: $apiKey"],
CURLOPT_POSTFIELDS => [
"file_urls" => "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip",
"params" => json_encode([
"operations" => [
["op" => "filter", "where" => "elevation > 500"],
[
"op" => "select_fields",
"fields" => [
["name" => "name"],
["name" => "elevation"],
],
],
],
"output" => ["format" => "kml"],
]),
"wait" => "true",
],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
]);
$response = curl_exec($curl);
print_r(json_decode($response, true));
using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(120) };
client.DefaultRequestHeaders.Add("X-API-Key", "YOUR_API_KEY");
using var form = new MultipartFormDataContent();
form.Add(new StringContent("https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip"), "file_urls");
form.Add(new StringContent("""
{
"operations": [
{"op": "filter", "where": "elevation > 500"},
{
"op": "select_fields",
"fields": [{"name": "name"}, {"name": "elevation"}]
}
],
"output": {"format": "kml"}
}
"""), "params");
form.Add(new StringContent("true"), "wait");
var response = await client.PostAsync("https://api.geoczech.dev/v2/tool/converter", form);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
{
"status": "SUCCESS",
"message": "Succeeded with warnings",
"output_files": ["https://…/result.json?…", "https://…/st-helena-places-utm.kml?…"],
"json_data": {
"status": "ok",
"outputs": [{
"format": "kml",
"crs": "EPSG:4326",
"layers": [{"name": "st_helena_places_utm", "featureCount": 19}]
}],
"decisions": [{
"code": "crs_forced_by_format",
"message": "Format 'kml' mandates EPSG:4326; output is reprojected automatically."
}]
}
}
Example: cut out an area
Keep only the places in Jamestown, the island's capital. The area is a WKT polygon in
the same system as the input (WGS 84 here). For a simple rectangle use
"bbox": [-5.725, -15.94, -5.705, -15.92] instead of geometry.
curl -X POST "https://api.geoczech.dev/v2/tool/converter" \
-H "X-API-Key: YOUR_API_KEY" \
-F "file_urls=https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson" \
--form-string 'params={
"operations": [
{
"op": "clip",
"geometry": "POLYGON((-5.7215 -15.9235, -5.715 -15.9225, -5.7085 -15.933, -5.7125 -15.9365, -5.7215 -15.927, -5.7215 -15.9235))"
}
],
"output": {
"format": "geojson",
"name": "places-in-jamestown"
}
}' \
-F "wait=true"
import json
import requests
API_KEY = "YOUR_API_KEY"
response = requests.post(
"https://api.geoczech.dev/v2/tool/converter",
headers={"X-API-Key": API_KEY},
files={
"file_urls": (None, "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson"),
"params": (None, json.dumps({
"operations": [
{
"op": "clip",
"geometry": "POLYGON((-5.7215 -15.9235, -5.715 -15.9225, -5.7085 -15.933, -5.7125 -15.9365, -5.7215 -15.927, -5.7215 -15.9235))",
},
],
"output": {
"format": "geojson",
"name": "places-in-jamestown",
},
})),
"wait": (None, "true"),
},
timeout=120,
)
response.raise_for_status()
print(response.json())
const API_KEY = "YOUR_API_KEY";
const form = new FormData();
form.append("file_urls", "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson");
form.append("params", JSON.stringify({
"operations": [
{
"op": "clip",
"geometry": "POLYGON((-5.7215 -15.9235, -5.715 -15.9225, -5.7085 -15.933, -5.7125 -15.9365, -5.7215 -15.927, -5.7215 -15.9235))"
}
],
"output": {"format": "geojson", "name": "places-in-jamestown"}
}));
form.append("wait", "true");
const response = await fetch("https://api.geoczech.dev/v2/tool/converter", {
method: "POST",
headers: { "X-API-Key": API_KEY },
body: form,
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.json());
<?php
$apiKey = "YOUR_API_KEY";
$curl = curl_init("https://api.geoczech.dev/v2/tool/converter");
curl_setopt_array($curl, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["X-API-Key: $apiKey"],
CURLOPT_POSTFIELDS => [
"file_urls" => "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson",
"params" => json_encode([
"operations" => [
[
"op" => "clip",
"geometry" => "POLYGON((-5.7215 -15.9235, -5.715 -15.9225, -5.7085 -15.933, -5.7125 -15.9365, -5.7215 -15.927, -5.7215 -15.9235))",
],
],
"output" => [
"format" => "geojson",
"name" => "places-in-jamestown",
],
]),
"wait" => "true",
],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
]);
$response = curl_exec($curl);
print_r(json_decode($response, true));
using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(120) };
client.DefaultRequestHeaders.Add("X-API-Key", "YOUR_API_KEY");
using var form = new MultipartFormDataContent();
form.Add(new StringContent("https://cdn.geoczech.dev/docs-samples/v1/st-helena-places.geojson"), "file_urls");
form.Add(new StringContent("""
{
"operations": [
{
"op": "clip",
"geometry": "POLYGON((-5.7215 -15.9235, -5.715 -15.9225, -5.7085 -15.933, -5.7125 -15.9365, -5.7215 -15.927, -5.7215 -15.9235))"
}
],
"output": {
"format": "geojson",
"name": "places-in-jamestown"
}
}
"""), "params");
form.Add(new StringContent("true"), "wait");
var response = await client.PostAsync("https://api.geoczech.dev/v2/tool/converter", form);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
{
"status": "SUCCESS",
"output_files": ["https://…/result.json?…", "https://…/places-in-jamestown.geojson?…"],
"json_data": {
"status": "ok",
"outputs": [{
"format": "geojson",
"layers": [{"name": "places-in-jamestown", "featureCount": 6}]
}]
}
}
Example: upload a GPS track
Upload a file from your computer — here the St Helena hike
GPX file, as it comes from a GPS device. A GPX file has several layers (waypoints, tracks,
track points …); source.layers picks just the track, and the result is a single
KML file for Google Earth.
Without source.layers you would get every layer as its own KML file (KML holds one
layer per file), packed into one ZIP — the report explains it in decisions.
curl -X POST "https://api.geoczech.dev/v2/tool/converter" \
-H "X-API-Key: YOUR_API_KEY" \
-F "files=@st-helena-hike.gpx" \
--form-string 'params={
"source": {"layers": ["tracks"]},
"output": {"format": "kml"}
}' \
-F "wait=true"
import json
import requests
API_KEY = "YOUR_API_KEY"
response = requests.post(
"https://api.geoczech.dev/v2/tool/converter",
headers={"X-API-Key": API_KEY},
files={
"files": ("st-helena-hike.gpx", open("st-helena-hike.gpx", "rb")),
"params": (None, json.dumps({
"source": {"layers": ["tracks"]},
"output": {"format": "kml"},
})),
"wait": (None, "true"),
},
timeout=120,
)
response.raise_for_status()
print(response.json())
import { openAsBlob } from "node:fs";
const API_KEY = "YOUR_API_KEY";
const form = new FormData();
form.append("files", await openAsBlob("st-helena-hike.gpx"), "st-helena-hike.gpx");
form.append("params", JSON.stringify({
"source": {"layers": ["tracks"]},
"output": {"format": "kml"}
}));
form.append("wait", "true");
const response = await fetch("https://api.geoczech.dev/v2/tool/converter", {
method: "POST",
headers: { "X-API-Key": API_KEY },
body: form,
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.json());
<?php
$apiKey = "YOUR_API_KEY";
$curl = curl_init("https://api.geoczech.dev/v2/tool/converter");
curl_setopt_array($curl, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["X-API-Key: $apiKey"],
CURLOPT_POSTFIELDS => [
"files" => new CURLFile("st-helena-hike.gpx"),
"params" => json_encode([
"source" => ["layers" => ["tracks"]],
"output" => ["format" => "kml"],
]),
"wait" => "true",
],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
]);
$response = curl_exec($curl);
print_r(json_decode($response, true));
using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(120) };
client.DefaultRequestHeaders.Add("X-API-Key", "YOUR_API_KEY");
using var form = new MultipartFormDataContent();
form.Add(new StreamContent(File.OpenRead("st-helena-hike.gpx")), "files", "st-helena-hike.gpx");
form.Add(new StringContent("""
{
"source": {"layers": ["tracks"]},
"output": {"format": "kml"}
}
"""), "params");
form.Add(new StringContent("true"), "wait");
var response = await client.PostAsync("https://api.geoczech.dev/v2/tool/converter", form);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
{
"status": "SUCCESS",
"message": "Succeeded with warnings",
"output_files": ["https://…/result.json?…", "https://…/st-helena-hike.kml?…"],
"warnings": [{
"code": "gdal_warnings",
"message": "The converter reported 1 warning(s) while writing 'st-helena-hike'; the step completed anyway."
}],
"json_data": {
"status": "ok",
"outputs": [{
"format": "kml",
"layers": [{"name": "st_helena_hike", "featureCount": 1}]
}]
}
}
Formats
The Converter reads 100+ formats (it detects them automatically) and writes the
formats below. Use the key in output.format.
| Key | Format | Notes |
|---|---|---|
shapefile |
Esri Shapefile | Multi-file → returned as ZIP. Field names max. 10 characters. |
gpkg |
GeoPackage | Modern single-file format, many layers, any CRS. |
geojson |
GeoJSON | Web maps. Always WGS 84. |
kml / kmz |
KML / KMZ | Google Earth. Always WGS 84. |
gpx |
GPX | GPS devices and sports apps. Always WGS 84. |
dxf |
AutoCAD DXF | CAD drawings. |
dgn_v7 |
MicroStation DGN v7 | CAD drawings. |
gml |
GML | Exchange format (XML). |
csv_xy |
CSV with X/Y columns | Spreadsheets; lines/polygons need a geometry option. |
wkt |
CSV with WKT geometry | Spreadsheets, databases. |
xlsx |
Excel workbook | Spreadsheets. |
ods_xy |
OpenDocument spreadsheet | Spreadsheets. |
flatgeobuf |
FlatGeobuf | Fast streaming format. |
geoparquet |
GeoParquet | Big data / analytics. |
mbtiles_mvt / mvt |
Vector tiles | Web map tiles. |
geotiff |
GeoTIFF | Rasters. |
png / jpeg |
PNG / JPEG | Rasters (images with a world file). |
Vector ↔ vector and raster ↔ raster conversions are supported; vector → raster is not (yet).
The result
The response contains the converted files in output_files and a report in
json_data (also downloadable as result.json). The most useful parts of the
report:
| Field | Meaning |
|---|---|
status |
ok; partial = some datasets could not be converted (see errors); error. |
outputs[] |
Each produced dataset: format, crs, layers with featureCount, files. |
decisions[] |
What the Converter decided automatically and why — e.g. reprojected because the format requires WGS 84, renamed fields, split geometry types. |
warnings[] |
Things worth checking, with stable codes. |
errors[] |
Problems per dataset (for partial results). |
source.datasets[] |
What was found in the input: layers, fields, CRS, feature counts. |
If the conversion fails, the task ends with FAILED and an error_code such as
missing_source_crs or unsupported_conversion — see Errors.
Good to know
- Shapefiles: send all parts (
.shp,.shx,.dbf,.prj) in one ZIP. - No coordinate system? CSV, DXF and Shapefiles without
.prjdo not say where they are. Setsource.source_crs, otherwise reprojection fails withmissing_source_crs. - Big files: upload them via
file_urls; for hundreds of MB addestimated_complexity=heavyand use asynchronous calls. - Many files in one request (or one ZIP) are converted together — each dataset
becomes its own output, packed into one ZIP (
converted.zip). - CAD formats (DXF, DGN) store geometry and layers, but not attribute tables —
attributes are dropped and the report says so in
warnings.
Last updated 2026-11-17