Chevron DownCommand-Line Reference
Chevron DownAPI Reference



GeoPackage loader

File Extension.gpkg,
File TypeBinary
File FormatGeoPackage
Data FormatGeometry
Supported APIsload, parse
Decoder TypeAsynchronous
Worker Thread SupportNo


import {GeoPackageLoader} from '';
import {load} from '';

const data = await load(url, GeoPackageLoader);


geopackage.sqlJsCDNString''CDN from which to load the SQL.js bundle. This is loaded asynchronously when the GeoPackageLoader is called on a file.


The GeoPackageLoader's output is a mapping from table name to an array of GeoJSON features. It currently loads all features from all vector tables.

Future Work

  • Select a single vector layer/table to load. Right now all vector tables are loaded. This would fit well in the two-stage loader process, where the first stage reads metadata from the file (i.e. the list of available layers) and the second stage loads one or more
  • Binary and GeoJSON output. Right now the output is GeoJSON-only, and is contained within an object mapping table names to geometry data. This is the same problem as we discussed previously for MVT, where with GeoPackage especially it's decently likely to only desire a portion of the layers contained in the file.