Skip to main content

KML module · loader API

TCXLoader

Parse Garmin Training Center XML activities into loaders.gl geometry tables while keeping the activity, lap, and measurement structure available to the application.

What it returns

Keep track geometry compatible with table pipelines.

TCXLoader presents activity tracks through the same geometry-table family used by related loaders, so applications can share rendering and analysis code.

Default

GeoJSONTable for application code

Rows

Object-row table for inspection

Columns

Arrow Table with WKB geometry

Binary

Binary feature collection for rendering

Detailed guide

TCXLoader reference

The sections below document imports, output shapes, options, and runtime limitations.

The TCXLoader parses TCX files into loaders.gl geometry tables.

Usage​

import {TCXLoader} from '@loaders.gl/geospatial/tcx';
import {load} from '@loaders.gl/core';

const data = await load(url, TCXLoader, options);

Shapes​

TCXLoader returns Apache Arrow Table objects by default. Set tcx.shape to select another table representation.

ShapeOutput
geojson-tableloaders.gl GeoJSON table
object-row-tableloaders.gl row table with GeoJSON features
arrowApache Arrow Table with WKB geometry
binary-geometryloaders.gl binary feature collection

Options​

OptionTypeDefaultDescription
tcx.shapestring'arrow'Selects the returned table shape.

Limitations​

  • The loader interprets coordinates as WGS84 longitude/latitude (OGC:CRS84).