You are trying the new MyGeodata Cloud. Send feedback Back to the previous version

Vector · GIS vector

FGB — FlatGeobuf (FGB)

Open binary vector format built on FlatBuffers with an optional packed Hilbert R-tree spatial index.

Type
Vector · GIS vector
Extension
.fgb
Converter
Read & write
Coordinate system
Any (EPSG, ESRI, custom)
Layers
Single

What is a FGB file?

FlatGeobuf is an open, performance-oriented binary format for simple features, developed as an open-source project initiated by Björn Harrtell. It targets fast reading of large vector datasets, both locally and over HTTP, and supports streaming and spatially filtered access through range requests without a server-side service.

A file begins with a magic number and a header that holds the layer schema, geometry type, feature count and an optional coordinate reference system. An optional packed Hilbert R-tree spatial index follows, then the features, each serialized with FlatBuffers. Field names and string values are stored as UTF-8 without formal length limits. Point, line, polygon, multi-part and collection geometries are supported, optionally with Z and M values. Each file holds a single layer. The format is designed to be written once and read many times, so editing or appending features generally means rewriting the file.

FGB files are usually exchanged by GIS analysts and web developers who need to move large vector layers quickly, often through cloud storage or web maps. Each file holds only one layer, so multi-layer datasets must be split into several files. Because the format is written once and read many times, edits normally mean rewriting the whole file. Check that the CRS is stored in the header.

Typical uses

  • Publishing large vector datasets for direct loading in web maps.
  • Streaming only the features inside a bounding box via HTTP range requests.
  • Exchanging a single simple-feature layer between GDAL-based tools and databases.
  • Storing a read-mostly layer with a built-in spatial index for fast filtering.
Files: Spatially indexed (packed R-tree) flatbuffers; one layer per file.

Sample FGB files — free download

Small, real datasets of the island of Saint Helena (OpenStreetMap, Copernicus DEM, Sentinel-2). Download them, open them in your software, or convert them in one click.

Preview of the sample data: Saint Helena places st-helena-places.fgb

Places (points)

58 places of Saint Helena (20 settlements, 17 peaks, 21 points of interest) with name, category, elevation from Copernicus DEM and OSM id. FlatGeobuf with a packed spatial index.

  • places · Point · 58
  • EPSG:4326
  • 12.4 kB
Attributes (7)
idIntegernameStringcategoryStringkindStringelevationIntegersummaryStringosm_idString
10Jamestowntownsettlement36Capital and only port of Saint Helena293673697
22Diana's Peakpeakpeak809Highest point of Saint Helena4254622180
47Longwood Housemuseumpoi544Napoleon's residence in exile, 1815-182135798100
46Jacob's Ladderlandmarkpoi74Staircase of 699 steps from Jamestown up to Ladder Hill146163201
53Saint Helena Airportairportpoi326Island airport, scheduled flights since 2017166589674

© OpenStreetMap contributors, ODbL 1.0 · Copernicus DEM © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA

Preview of the sample data: Saint Helena roads and paths st-helena-roads.fgb

Roads and paths (lines)

110 named roads, streets, tracks and paths (OSM segments merged by name) with class, surface, speed limit and length. FlatGeobuf with a packed spatial index.

  • roads · LineString · 110
  • EPSG:4326
  • 95.1 kB
Attributes (8)
idIntegernameStringclassStringrefStringonewayStringmaxspeedIntegersurfaceStringlength_mReal
1Airport Access RoadtertiaryNonenoNonepaved13088.3
2Airport Access RoadtertiaryNoneyesNonepaved177.1
3Casons RoadtertiaryNonenoNoneNone6132.5
4China LanetertiaryNoneyesNoneNone34.1
5Commonwealth AvenuetertiaryNoneno48asphalt3035.7

© OpenStreetMap contributors, ODbL 1.0

Preview of the sample data: Saint Helena land cover st-helena-landcover.fgb

Land cover (polygons)

190 land-cover polygons (forest, scrub, farmland, residential, water, …) from OpenStreetMap with area in hectares. FlatGeobuf with a packed spatial index.

  • landcover · Polygon · 190
  • EPSG:4326
  • 115.4 kB
Attributes (6)
idIntegerlandcoverStringosm_classStringnameStringarea_haRealosm_idString
1beachbeachNone0.6241102771696
2beachbeachSandy Bay Beach0.557550627544
3farmlandfarmlandNone4.50235798087
4farmlandfarmlandNone4.10835798079
5farmlandfarmlandNone3.73535798064

© OpenStreetMap contributors, ODbL 1.0

Preview of the sample data: Jamestown buildings st-helena-buildings.fgb

Jamestown buildings (polygons)

179 building footprints in Jamestown with type, footprint area and ground elevation. FlatGeobuf with a packed spatial index.

  • buildings · Polygon · 179
  • EPSG:4326
  • 41.3 kB
Attributes (6)
idIntegernameStringtypeStringarea_m2Realground_mIntegerosm_idString
1The CastleNone1943.717254448018
2NoneNone265.014254448020
3Nonehouse157.426254448021
4Nonehouse90.624254448022
5NoneNone242.511254448028

© OpenStreetMap contributors, ODbL 1.0 · Copernicus DEM © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA

Frequently asked questions

FGB is a binary format with a typed schema in its header and an optional spatial index, so large files can be read quickly and filtered by area. GeoJSON is plain text without an index, which must be parsed in full and is therefore slower for big datasets.

Ready to convert your data?

Drop the files and the Converter does the rest — no install, no account needed for your first conversions.