Skip to main content

XML geospatial formats

Bring annotated tracks into one geometry path.

KML, KMZ, GPX, and TCX use related XML foundations but describe different kinds of geographic data. loaders.gl preserves their useful metadata while returning common geometry and table shapes for applications.

Geographic document path

Keep the track data useful after XML.

Each format has its own document vocabulary, but the application usually needs coordinates, features, properties, and timing. The loaders normalize those common pieces without discarding source metadata.

KML

Placemarks, paths, regions, styles, and Earth-browser metadata.

GPX

Tracks, routes, waypoints, and elevation/time fields.

TCX

Training activity laps, tracks, and workout metadata.

Output

GeoJSON, geometry tables, object rows, or Arrow tables.

Detailed guide

KML, GPX, and TCX details

The reference below compares the three XML formats, loader output shapes, metadata behavior, and supported entry points.

CharacteristicValue
File FormatsKML and KMZ, GPX, TCX
Data FormatGeometry Tables, GeoJSON
File Extensions.kml, .kmz, .gpx, .tcx
MIME Typesapplication/vnd.google-earth.kml+xml, application/vnd.google-earth.kmz, application/gpx+xml, application/vnd.garmin.tcx+xml
File TypeText/XML
Loader APIsload, parse, parseTextSync
Loader Worker Thread❌ No
Loader Streaming❌ No

Loaders​

XML-Based Formats​

KML, GPX, and TCX are XML-based geospatial interchange formats. They are text files that describe placemarks, waypoints, routes, tracks, or activities using format-specific XML elements.

Geospatial Output​

The KML module converts these documents into loaders.gl geometry table shapes for application code. The default output is an Apache Arrow Table; GeoJSON and object-row tables remain available through the format-specific shape option.