Free plan

Map data convert

Convert map files between formats, such as GPX to KML or GeoJSON
POST
/v1/data/geo

About this tool

Map files hold places, routes and shapes, and come in formats such as GeoJSON, KML, GPX and WKT. This tool changes one into another. It also reads a table with latitude and longitude columns. You can cut the map to a box, make long routes lighter, round numbers, and choose which details to keep. It also reports counts and sizes.
For example, you turn a GPS track from your watch into a file a map website accepts.

How to use it

  1. Choose this tool.
  2. Add your map file or your table of places with Upload or drag and drop.
  3. Choose the format you want as the result.
  4. Set any extras, such as the latitude and longitude columns of a table, then press Generate.
  5. Download the converted file.

What you get back

You get a new map file in the format you chose, plus a summary of what is in it. Download it.
GOOD TO KNOW
The kind of input is found from its content, not its name. GPX has no polygons: outlines are written as tracks (a warning says so). Rows with unreadable coordinates are left out and counted in a warning.
TEST IT LIVE

Try Map data convert in the Studio

One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Open in the Studio
Family
Data
Plan
Free
Method
POST
Endpoint
/v1/data/geo
Tool ID
data.geo
Authentication
API key
Accepts
Text and settings
Background jobs
Yes
Usage group
Data
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/data/geo" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'file=@document.pdf' \
  -F 'to=geojson' \
  -F 'lat_column=latitude' \
  -F 'lon_column=longitude'

Node.js

const { DavixH2I } = require('@davixlabs/h2i-sdk');

const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.data.geo({
    "file": 'document.pdf',
    "to": "geojson",
    "lat_column": "latitude",
    "lon_column": "longitude"
  });
console.log(result.data, result.requestId);

PHP

<?php
require 'vendor/autoload.php';

$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->data()->geo([
    'file' => 'document.pdf',
    'to' => 'geojson',
    'lat_column' => 'latitude',
    'lon_column' => 'longitude',
]);
echo $result->requestId;
FAQ

Frequently asked questions

Convert map data between GeoJSON, KML, GPX, WKT and tables with latitude and longitude columns. Reproject, cut to a box, simplify lines, round coordinates, choose the properties to keep, and get the count, bounding box, length and area.

Map data convert works from text and settings, so no file is needed. Every input is optional.

Map data convert is included in every plan, including Free. Each run uses credits from your monthly allowance.

Send a POST request to /v1/data/geo with your API key in the X-Api-Key header. Official SDKs for Node.js, Python, PHP, Go, Java, .NET and Ruby do the same for you, and the code box on this page shows ready-to-copy examples. For large work it can also run as a background job, so your request returns straight away.