Skip to main content

Converter guide · data shapes

Name the shape before you choose the converter.

loaders.gl uses explicit shape names to make data boundaries visible. This guide maps table, geometry, and feature-collection representations so an application can choose an output based on the next operation.

A practical map

Same data, different working shapes.

Arrow and GeoArrow keep data columnar, GeoJSON keeps feature relationships explicit, and binary feature collections keep geometry ready for rendering. Converters connect those shapes without hiding the trade-off.

Tables

Typed columns, row objects, or column-oriented wrappers

Geometry

GeoJSON objects, WKB, WKT, TWKB, or GeoArrow encodings

Render output

Points, lines, and polygons with typed offsets and positions

Selection rule

Choose the shape that matches the next consumer

Detailed guide

Shape names and mappings

The tables below define the public shape names and explain how multi-geometries and GeometryCollections map into render families.

The converters connect a few distinct format families. Keeping those families straight makes the API much easier to reason about.

Table Shapes​

ShapeFamilyNotes
arrowApache ArrowRaw Arrow Table
object-row-tableloaders.gl table wrapperrow objects
array-row-tableloaders.gl table wrapperrow arrays
columnar-tableloaders.gl table wrappercolumn-oriented wrapper
geojson-tableloaders.gl table wrapperrows with GeoJSON-style geometry/properties
geoarrowGeoArrow tableArrow table with GeoArrow geometry metadata

Geometry Formats​

ShapeFamilyNotes
geojson-geometryGeoJSONsingle geometry object
wkbwire formatbinary
wktwire formattext
twkbwire formatcompact binary
geoarrow.wkbGeoArrow encodingWKB stored in Arrow column
geoarrow.wktGeoArrow encodingWKT stored in Arrow column

Native GeoArrow Encodings​

ShapeMeaning
geoarrow.pointnative point column
geoarrow.linestringnative linestring column
geoarrow.polygonnative polygon column
geoarrow.multipointnative multipoint column
geoarrow.multilinestringnative multilinestring column
geoarrow.multipolygonnative multipolygon column
geoarrow.geometrydense union over geometry families
geoarrow.geometrycollectionGeometryCollection encoding

Feature Collection Shapes​

ShapeFamilyNotes
geojsonobject modelstandard feature collections
flat-geojsonflattened geometry modelstill feature-oriented
binary-feature-collectionrender modelpoints/lines/polygons bins
arrow-binary-feature-collectionArrow-backed render modelArrow wrapper over binary bins

How Multi-Geometries Map​

GeometryRender family
Point, MultiPointpoints
LineString, MultiLineStringlines
Polygon, MultiPolygonpolygons

This mapping is why binary feature collections are family-based rather than geometry-class-based.

How GeometryCollection Maps​

GeometryCollection does not get its own render bin.

Instead it is flattened into the existing families:

  • point members -> points
  • line members -> lines
  • polygon members -> polygons

The source feature or row identity is preserved in the id arrays.