Choose the boundary
Keep features familiar, or make columns explicit.
The default result is an Arrow table for typed columns and direct table interoperability. GeoJSON and binary shapes remain available when application code needs them.
Default
Apache Arrow table with typed columns and WKB geometry
GeoJSON
GeoJSONTable for application code
Index
Bounding-box filtering before decode
Streaming
Source APIs for incremental reads
Loader for the FlatGeobuf format, a binary FlatBuffers-encoded format that defines geospatial geometries.
Detailed guide
Output shapes and loader options
The sections below cover usage, result shapes, GeoJSON and Arrow output, reprojection, and option details.
| Property | Value |
|---|---|
| Data source | FlatGeobufVectorSource |
Usage
import {FlatGeobufLoader} from '@loaders.gl/geospatial/flatgeobuf';
import {load} from '@loaders.gl/core';
const arrowTable = await load(url, FlatGeobufLoader);
const geojsonTable = await load(url, FlatGeobufLoader, {
flatgeobuf: {shape: 'geojson-table'}
});
Outputs
Shapes
FlatGeobufLoader returns native Apache Arrow Table objects by default. Set flatgeobuf.shape to select another representation.
| Shape | Output |
|---|---|
geojson-table | loaders.gl GeoJSON table |
arrow | Apache Arrow Table with WKB geometry |
columnar-table | loaders.gl columnar table |
binary-geometry | loaders.gl binary feature collection |
GeoJSONTable
The parser will return an array of GeoJSON features in the coordinate system of the input data. Set gis.reproject: true to transform coordinates; use gis.targetCrs to select the output CRS. If no target is provided, WGS84 is used for compatibility. Unknown source CRS metadata and unsupported requested transformations throw CRSReprojectionError.
Arrow
By default, FlatGeobufLoader returns an Apache Arrow table that preserves FlatGeobuf property columns and appends a WKB geometry column annotated with geospatial schema metadata. Set flatgeobuf.shape to 'arrow' explicitly when using another default or shared option bag.
Options
| Option | Type | Default | Description |
|---|---|---|---|
| flatgeobuf.shape | string | 'arrow' | Output shape: 'geojson-table', 'arrow', 'columnar-table', or 'binary-geometry'. |
| gis.reproject | boolean | false | Whether to transform input data into gis.targetCrs (WGS84 when omitted). |
| gis.targetCrs | CRSDefinition | 'WGS84' when reprojection is enabled | Output CRS for transformed coordinates. |
Remarks
The FlatGeobufLoader wraps the flatgeobuf NPM module which is published under the ISC license.
