Add client-side GeoPackage map source type - #175
Open
JakeGimenes wants to merge 5 commits into
Open
Conversation
Render GeoPackage (.gpkg) vector tables entirely in the browser via ol-load-geopackage + sql.js (WebAssembly SQLite), reprojected with proj4, with no backend conversion endpoint. GeoPackage joins the existing client-vector source path so styling, click-query, and snapping work unchanged; one map layer maps to one feature table (url + layer name). - ModuleLoader.js: loadGeoPackage() with s3://->https translation, WGS84 UTM proj4 registration, lazy lib/wasm init, and parse-once cache keyed by url+projection (one file often backs several layers). - utilities.js: register GeoPackage as a client vector source + config. - webpack.config.js: emit sql-wasm.wasm; stub node-core modules for browser. - Tests for URL translation, CRS registration, table select, caching, and error paths; docs section for the source. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Aug 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a GeoPackage map source type rendered entirely in the browser — no backend conversion endpoint and no server-side GIS dependencies. A GeoPackage (
.gpkg) is an OGC SQLite database; this reads it client-side withol-load-geopackage+sql.js(WebAssembly SQLite) and reprojects withproj4, then hands the features to the existing client-vector path so styling, click-query, and snapping work unchanged. One map layer maps to one feature table (url+layername).Changes
ModuleLoader.js—loadGeoPackage()withs3://→https translation, WGS84 UTMproj4registration, lazy lib/wasm init, and a parse-once cache keyed by url+projection (one file often backs several layers).utilities.js— registersGeoPackageas a client vector source + its config (url + table name).webpack.config.js— emitssql-wasm.wasm; stubs node-core modules (fs/path/crypto) sosql.jsbuilds for the browser.package.json— addsol-load-geopackage,proj4,sql.js(frontend only — no Python deps).Testing
eslint+prettierclean on changed files.webpackbuild: 0 errors,sql-wasm.wasmemitted.Notes
pyproject.toml/ backend changes.🤖 Generated with Claude Code