Skip to content

Format Converters

Moving geometry between GeoJSON and the four formats it most often arrives in.

Format conversion is rarely lossless, and what gets lost depends on which direction you are going. Each converter page names its own losses; the pattern is worth knowing before you start.

KML is what Google Earth and Google My Maps speak. Geometry crosses cleanly in both directions. Styling, folders, network links and time spans do not, because GeoJSON has nowhere to put them.

WKT is the text form spatial databases use, so it is the shortest path between a file and a PostGIS table. It carries geometry only: properties are not part of the format and do not survive the trip.

GPX comes off handheld GPS units and fitness platforms. Tracks and routes become lines, waypoints become points, and sensor extensions such as heart rate fall outside the schema and are dropped.

Latitude and longitude covers the most common case of all, which is a spreadsheet with two coordinate columns. Watch the order: people write latitude first, GeoJSON stores longitude first, and getting that backwards is the single most common spatial bug there is. The debugging guide covers how to spot it.

All converters