Skip to main content

Loader category

Geospatial loaders

Keep coordinates, attributes, and geometry together while moving between file formats, services, and rendering-oriented data shapes.

Category data

Load many formats into one application path.

Category data lets related loaders return compatible structures, so rendering, analysis, and export code can be shared.

The geospatial path

Keep coordinates, geometry, and attributes together.

Geospatial loaders differ in how they store geometry and how much metadata they carry. The shared category gives applications familiar feature, geometry, and table shapes while each format keeps its own strengths.

Features

Geometry and properties in a feature-oriented shape

Geometry

Single WKT, WKB, or GeoJSON geometry values

Tables

Typed columns with GeoArrow metadata where supported

Services

Remote features, tiles, rasters, and scene data

The category includes local files, cloud-native vector formats, and remote services. Some loaders return one geometry, some return layers of features, and others expose a table that can move into scans or render-oriented converters. Check the format page when CRS, indexing, or layer behavior is important.

Detailed guide

Geospatial shapes and contracts

The reference below records loader outputs, shape selection, geometry representations, layer handling, and conversion boundaries.

Geospatial Category Loaders​

The default geospatial table representation is Arrow for the loaders below. Each loader reference documents its alternate shapes and format-specific fields.

LoaderDefault resultScope
GPXLoader, KMLLoader, TCXLoaderApache Arrow TableFeatures from XML documents.
GeoJSONLoaderApache Arrow TableGeoJSON features.
ShapefileLoaderApache Arrow TableFeatures joined from geometry and property files.
SHPLoaderApache Arrow TableGeometry-only shapefile records.
FlatGeobufLoaderApache Arrow TableFeatures from a FlatGeobuf file.
MVTLoaderApache Arrow TableFeatures from selected vector-tile layers.
GeoPackageLoaderApache Arrow TableFeatures from a selected table.
WKBLoader, WKTLoaderGeoJSON geometryOne geometry, without a feature/property wrapper.

Supported shapes​

For loaders with shape selection, options.core.shape sets the default return shape and options[loaderId].shape takes precedence.

ShapeLoadersNotes
geojson-tableGeoJSONLoader, FlatGeobufLoader, GeoPackageLoader, GPXLoader, KMLLoader, MVTLoader, ShapefileLoader, TCXLoaderShared feature-table target. Loader-specific overrides stay under each loader id, e.g. options.mvt.shape.
arrowGeoJSONLoader, FlatGeobufLoader, GeoPackageLoader, GMLLoader, GPXLoader, KMLLoader, TCXLoader, ShapefileLoader, SHPLoader, DBFLoader, MVTLoader, MLTLoaderNative Apache Arrow tables. Geometry metadata is available for spatial output.
binary-feature-collectionGeoJSONLoaderDeck.gl-style binary feature collection output selected with options.geojson.shape.
object-row-tableGPXLoader, KMLLoader, TCXLoaderFeature rows as plain objects.
columnar-tableFlatGeobufLoader, MVTLoaderColumn-major geospatial output.
geojsonMVTLoader, MLTLoaderArray of GeoJSON features instead of a table wrapper.
binaryFlatGeobufLoader, GPXLoader, KMLLoader, MVTLoader, MLTLoader, TCXLoaderBinary feature representations vary by loader.
binary-geometryMVTLoaderGeometry-only binary output.
geojson-geometryWKBLoader, WKTLoaderSingle geometry output.
rawGPXLoader, KMLLoader, TCXLoaderRaw parsed XML/document output where supported.
v3ShapefileLoaderLegacy shapefile feature array shape.

Data Format​

For geospatial formats that contain a single layer:

  • category: string - gis
  • schema?: Schema - Apache Arrow style schema
  • data: * - Data is formatted according to options.gis.format
  • format: string - The encoding of data layers, corresponds to options.gis.format.
  • loaderMetadata?: object - Loader specific metadata, see documentation for each loader

For geospatial loaders that contain multiple layers:

  • category: string - gis-layers
  • layers: A map of layers keyed by layer names. Each layer is formatted according to options.gis.format
  • loaderMetadata?: object - Top-level loader specific metadata, see documentation for each loader

For geospatial loaders that contain a single geometry:

  • category: string - gis-geometry
  • schema?: Schema - Apache Arrow style schema
  • data: * - Data is formatted according to options.gis.format
  • format: string - The encoding of data layers, corresponds to options.gis.format.

Conversion Shapes​

loaders.gl currently converts GIS data between several related shapes:

ShapeFamilyTypical producer
geojsonfeature collectionJSON, KML, GPX, shapefile, MVT
flat-geojsonflattened feature collectionGIS conversion utilities
binary-feature-collectionrender-oriented feature collectionGIS conversion utilities, deck.gl pipelines
arrow-binary-feature-collectionArrow-backed render-oriented wrapperGIS conversion utilities
geojson-geometrysingle geometryWKB/WKT/TWKB converters
wkb, wkt, twkbgeometry wire formatsWKT/WKB loaders and GIS geometry converters
geoarrow and geoarrow.*Arrow + GeoArrow metadataGeoArrow loaders and converters

See the converter docs for details:

Data structures​

GeoJSON​

A GeoJSON table wraps a FeatureCollection with its shape and schema metadata. Features contain a geometry and a properties object. Geometry-only loaders return a geometry without the feature wrapper.

Binary​

Render-oriented binary feature collections group geometry into points, lines, and polygons. These fields contain typed coordinate, index, feature-ID, and property buffers; they are not GeoJSON FeatureCollection objects. Other binary shapes differ by loader, so check the requested shape's reference.

Raw​

Raw output preserves format-specific structures and is not a shared geospatial contract. Use it only when your application needs fields that a normalized table cannot represent.

GeoJSON Conversion​

Geospatial category data can be converted to GeoJSON (sometimes with a loss of information). Most geospatial applications can consume geojson.

Multi-Geometries And GeometryCollection​

For render-oriented binary conversion:

  • MultiPoint is mapped into the points bin
  • MultiLineString is mapped into the lines bin
  • MultiPolygon is mapped into the polygons bin
  • GeometryCollection is flattened recursively into those same bins

The source feature identity is preserved through feature id arrays.