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.
| Shape | Output |
|---|---|
geojson-table | loaders.gl GeoJSON table |
object-row-table | loaders.gl row table with GeoJSON features |
arrow | Apache Arrow Table with WKB geometry |
binary-geometry | loaders.gl binary feature collection |
Options
| Option | Type | Default | Description |
|---|---|---|---|
gpx.shape | string | 'arrow' | Selects the returned table shape. |
Limitations
- The loader interprets coordinates as WGS84 longitude/latitude (
OGC:CRS84).