Skip to main content

KML module · loader API

GPXLoader

Parse GPX routes, tracks, and waypoints into loaders.gl geometry tables, with optional Arrow and binary representations for downstream processing.

What it returns

Choose the table shape that fits the next stage.

The default output is easy to use in mapping code. When a pipeline needs compact geometry or columnar interchange, GPXLoader can return binary or Arrow-backed forms instead.

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

GPXLoader reference

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

The GPXLoader parses GPX files into loaders.gl geometry tables.

Usage​

import {GPXLoader} from '@loaders.gl/geospatial/gpx';
import {load} from '@loaders.gl/core';

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

Shapes​

GPXLoader returns Apache Arrow Table objects by default. Set gpx.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
gpx.shapestring'arrow'Selects the returned table shape.

Limitations​

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