FlatGeobuf

Studio

FlatGeobuf is a new geospatial data format that allows users to work more efficiently with vector data. It can be used as a replacement for GeoJSON, providing smaller file sizes and faster loads. It is a binary (FlatBuffers-encoded) format that defines geospatial geometries. It is row-oriented rather than columnar like GeoParquet and GeoArrow and offers a different set of trade-offs.
FlatGeobuf was inspired by geobuf and flatbush.

Characteristics

  • Binary
  • Row oriented
  • Supports appends, but not random writes
  • Optionally supports a spatial index

Goals are to be suitable for large volumes of static data, significantly faster than legacy formats without size limitations for contents or meta information and to be suitable for streaming/random access.

Geometries

FlatGeobuf supports any vector geometry type defined in the OGC Simple Features specification (the same feature types supported by the WKB 2D geometry type enumeration).

GeoBuf geometries include the standard building blocks of Point, LineString, Polygon,MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection, but also includes more infrequently types such as CircularString, Surface, and `TIN`` (Triangulated irregular network). These additional types are not supported by Studio.

TypeValueStudioComment
Unknown0โŒ
Point1โœ…
LineString2โœ…
Polygon3โœ…
MultiPoint4โœ…
MultiLineString5โœ…
MultiPolygon6โœ…
GeometryCollection7โœ…
CircularString8โŒ
CompoundCurve9โŒ
CurvePolygon10โŒ
MultiCurve11โŒ
MultiSurface12โŒ
Curve13โŒ
Surface14โŒ
PolyhedralSurface15โŒ
TIN16โŒ
Triangle1โŒ

Note: Storing only geometries with the same type allows readers to know which geometry type is stored without scanning the entire file.

Schema

Apart from geometry, FlatGeobuf supports columns with a range of types:

TypeDescription
ByteSigned 8-bit integer
UByteUnsigned 8-bit integer
BoolBoolean
ShortSigned 16-bit integer
UShortUnsigned 16-bit integer
IntSigned 32-bit integer
UIntUnsigned 32-bit integer
LongSigned 64-bit integer
ULongUnsigned 64-bit integer
FloatSingle precision floating point number
DoubleDouble precision floating point number
StringUTF8 string
JsonGeneral JSON type intended to be application specific
DateTimeISO 8601 date time
BinaryGeneral binary type intended to be application specific

Spatial indexing

Studio does not yet use the spatial index in flatgeobuf files.