Skip to content
geodata.plus
Documentation

Convert GML to FlatGeobuf Online — Free GIS Converter

Convert GML from WFS services and INSPIRE portals to FlatGeobuf (.fgb) for fast cloud-native GIS delivery and high-performance web APIs.

Updated May 2026

GML from government WFS services is authoritative but slow to parse at scale — converting it to FlatGeobuf produces a spatially indexed binary file optimized for HTTP range requests, making it ideal for serving large institutional datasets from cloud storage without a GIS server.

Why convert GML to FlatGeobuf?

Government and INSPIRE datasets in GML can be large — national cadastral datasets, transport networks, or land use classifications may contain hundreds of thousands of features. Serving these as GML from a WFS endpoint places significant parsing load on both server and client. FlatGeobuf eliminates this bottleneck: its packed Hilbert R-tree spatial index and binary encoding allow clients to issue HTTP range requests for only the features within a given bounding box, without downloading or parsing the entire dataset. This makes FlatGeobuf on static cloud storage (S3, Cloudflare R2, Azure Blob) a practical replacement for a WFS server for read-only use cases, with dramatically lower infrastructure cost and higher throughput. Converting your GML exports to FlatGeobuf is the first step to this architecture.

Why use geodata.plus

  • Free tier includes 3 conversions per month with no account required
  • Automatic CRS detection from GML srsName — no manual CRS configuration
  • Preserves the source CRS in the FlatGeobuf output, or reprojects to any target EPSG
  • Entirely browser-based — no GDAL, Python, or Node.js environment required
  • Encrypted upload (TLS); files stored in Cloudflare R2, automatically deleted after 2 days (free) or 7 days (Pro)
  • Output includes a packed spatial index for optimal HTTP range-request performance

How it works

  1. Upload your .gml file to geodata.plus
  2. geodata.plus parses the GML schema and reads the srsName to identify the coordinate reference system
  3. Select FlatGeobuf as the output format; choose a target CRS if your application requires a specific projection
  4. Download your .fgb file and upload it to cloud storage or serve it directly from your API

GML format

GML (Geography Markup Language) is the OGC XML standard for institutional spatial data exchange. It is the native output format of WFS services and the mandated encoding of the EU INSPIRE directive. GML is highly expressive — it supports any CRS, all geometry types, and complex nested feature schemas defined in XSD documents. However, GML's XML verbosity means that parsing large GML files is computationally expensive, and streaming or partial-read access is not practical without a dedicated server application handling WFS protocol queries.

| Property | Value | |---|---| | Extension | .gml | | Type | Vector, single-file XML | | Coordinate system | Any CRS (declared via srsName) | | Geometry types | Point, LineString, Polygon, Multi- variants, complex curves/surfaces | | Common software | QGIS, ArcGIS, WFS services, EU INSPIRE portals, government systems |

FlatGeobuf format

FlatGeobuf is a binary vector format built on Google's FlatBuffers serialization library. Its defining feature is a packed Hilbert R-tree spatial index positioned at the start of the file, followed by feature data sorted in Hilbert curve order. This layout enables HTTP servers to respond to range requests covering only a specific bounding box region of the dataset, without loading the full file into memory. FlatGeobuf supports any CRS, all standard geometry types, and stores feature attributes in a columnar schema. It is supported by GDAL/OGR, the flatgeobuf JavaScript library, Mapbox, and QGIS.

| Property | Value | |---|---| | Extension | .fgb | | Type | Vector, single-file binary | | Coordinate system | Any CRS | | Geometry types | Point, LineString, Polygon, Multi- variants | | Common software | GDAL, Mapbox, QGIS, cloud-native GIS, web APIs |

Frequently asked questions

If I serve the FlatGeobuf file from S3, do I need any server-side code to handle spatial queries? No server-side code is required for spatial filtering. The flatgeobuf JavaScript library handles the HTTP range request logic client-side: it reads the spatial index from the beginning of the file, calculates which byte ranges contain features intersecting the requested bounding box, and issues targeted HTTP GET requests with Range headers. Your S3 bucket just needs CORS enabled and range requests allowed — both are standard S3 configurations.

GML files from INSPIRE portals can use complex geometry types like GM_MultiSurface. How does FlatGeobuf handle these? FlatGeobuf supports standard OGC simple feature geometry types. Complex GML geometries like GM_MultiSurface with interior rings, or curve-based geometries, are linearized into their FlatGeobuf equivalents (MultiPolygon for surfaces, LineString for curves) during conversion. The shape of the geometry is preserved faithfully as a linear approximation wherever the source GML used mathematical curves rather than explicit vertex sequences.

Does the CRS from the GML get preserved in the FlatGeobuf file? Yes. FlatGeobuf stores CRS information in its file header using an EPSG code reference. geodata.plus reads the CRS from the GML srsName attribute and writes it to the FlatGeobuf header. Tools like GDAL and QGIS will detect the CRS automatically when opening the file, and the flatgeobuf JavaScript library exposes the CRS via its header-reading API so your application can handle reprojection on the client side if needed.

gmlflatgeobufconvertgis