GeoLabSpatial SQL Workbench
Architecture guide

DuckDB-WASM GIS

DuckDB-WASM is GeoLab's execution engine, not a remote backend. A Web Worker owns the database connection, the Spatial extension executes geometry SQL, and query results are converted into browser map buffers.

Engine
DuckDB-WASM AsyncDuckDB
Isolation
Web Worker
Extension
DuckDB Spatial
Rendering
Arrow/WKB to deck.gl binary data

Execution chain

  • Select a compatible DuckDB-WASM bundle and start its worker.
  • Instantiate AsyncDuckDB, open a connection, then INSTALL and LOAD spatial.
  • Register selected files in the WASM file system and create local DuckDB tables.
  • Run SQL through the asynchronous connection.
  • Convert point columns or WKB geometry into deck.gl binary attributes for rendering and picking.

The initialization self-check

GeoLab verifies that the Spatial extension can construct and serialize a geometry before declaring the local engine ready.

Spatial self-check used by GeoLabsql
SELECT ST_AsText(ST_Point(1, 2)) AS spatial_self_check;

NoteThe expected value is POINT (1 2). A failure closes the connection and surfaces an engine-start error instead of silently disabling spatial functions.

What runs locally and what still uses the network

OperationLocation
File registration and SQL executionBrowser / DuckDB-WASM
GeoLab application backend uploadNone
CARTO basemap tilesExternal network request
Spatial extension initializationMay require a network download

System boundary

  • The current application loads only the Spatial extension; it does not promise every DuckDB extension works in the browser.
  • There is no server-side concurrency, user account, cross-device state, or durable database file.
  • Large results remain subject to browser memory and GeoLab's spatial render limit.

Sources and scope

These links document the product behavior summarized above. GeoLab-specific claims are limited to the current public v0.1.0 implementation.

  1. DuckDB-WASM overviewOfficial browser client architecture and platform scope.
  2. DuckDB Spatial documentationOfficial overview of the Spatial extension used by GeoLab.
  3. GeoLab engine implementationBundle selection, worker setup, extension load, import, and query paths.