GeoCzech logo GeoCzech Docs

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 leave method out)
  • Inputs: upload (files) or link (file_urls); ZIP archives are unpacked
  • Result: converted files in output_files + a report in json_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.format string required

The target format — a key from the format list, e.g. geojson, shapefile, gpkg, kml, dxf, csv_xy.

output.target_crs string

Recalculate the coordinates into this coordinate system, e.g. EPSG:32730 (UTM zone 30S) or EPSG: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.name string

Base name of the output file(s). By default the input file name is used.

output.layer_name string

Name of the layer in the output (for formats that have layer names).

output.package string default auto

auto returns a single file as it is and packs multi-file results (a Shapefile, several layers) into one ZIP (converted.zip). zip always packs, none never.

Allowed values: auto · zip · none

output.encoding string

Text encoding for formats that need it, e.g. UTF-8 or CP1252 for an old Shapefile reader. Default UTF-8.

Advanced parameters (5)
output.layer_strategy string default auto

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_strategy string default auto

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_policy string default auto

auto shortens/renames attribute names the output cannot store (Shapefile: max. 10 characters) and reports the mapping; strict fails instead.

Allowed values: auto · strict

output.on_error string default skip

skip converts what it can and marks the result partial; fail stops at the first problem.

Allowed values: skip · fail

output.creation_options object

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_crs string

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 with output.target_crs to recalculate.

source.layers array of strings

Convert only these layers of a multi-layer input (GeoPackage, File Geodatabase, GPX …).

Advanced parameters (3)
source.format string default auto

Force the input format (a format key) instead of detecting it.

source.open_options object

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.kind string default auto

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.

GeoJSON (WGS 84) → Shapefile (UTM zone 30S)
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"
Response
{
  "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.

CSV (lon/lat) → GeoPackage (UTM zone 30S)
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"
Response
{
  "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.

Filter + select fields → KML
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"
Response
{
  "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.

Clip points by a polygon
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"
Response
{
  "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.

Upload a GPX file → KML (track only)
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"
Response
{
  "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 .prj do not say where they are. Set source.source_crs, otherwise reprojection fails with missing_source_crs.
  • Big files: upload them via file_urls; for hundreds of MB add estimated_complexity=heavy and 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