Skip to content

Configuration ​

An app configures the worker through its URL, as JSON in a config parameter, and an app that imports the engine passes the same options to createEngine(). S3 keys are not accepted in the worker URL, which is sent to the server that serves the file; Private data describes how a page sends them.

Worker options ​

OptionDefaultUse
catalogThe source.coop mirror of GLEN's catalogSTAC catalog URL in which zonal_stats looks for a raster's hex copy. The server has no STAC tools, as on geo-query. The mirror lists GLEN's license-clear datasets, and a browser reads it much faster than NRP. NRP's canonical catalog is NRP_CATALOG_URL in src/stac.js.
extraInstructionsfalsetrue keeps the guidance meant for small models, as EXTRA_INSTRUCTIONS.
guidanceRef7467f15The geo-query commit the guidance is taken from.
instructionsnoneServer instructions for the MCP handshake. geo-query sends none.
maxTilesets8Hex tilesets kept in memory. Beyond this, the least recently used is dropped, and its tile URL stops working.
zonalStatsfalsetrue offers zonal_stats (Zonal statistics).
zonalMaxPixels25,000,000Pixels one zonal_stats call may read, summed over its zones' windows.

Engine options ​

The worker also takes the engine's options, whose defaults are in src/defaults.js.

OptionDefaultUse
timeout600Seconds a query may run before it is cancelled. This is twice geo-query's limit, because reads in the browser are serial. null or 0 turns the limit off. Time spent waiting behind other queries does not count.
workers1DuckDB instances. Each runs one query at a time and reads one or two byte ranges at a time, so a page that sends several queries at once gains from more. A query goes to the least busy instance.
secretsNRP Ceph, and source.coop on AWSAnonymous S3 secrets: { name, scope, endpoint, region, url_style, use_ssl }.
allowedEndpointsNRP Ceph and the lab's S3 hostsS3 hosts a query's s3_endpoint may name, beyond the secrets' endpoints and AWS S3 hosts.
httpsToS3NRP and source.coop[https prefix, s3 prefix] pairs. A string literal in the SQL that starts with a published https prefix is rewritten to s3:// before the app's rewrites, as geo-query does, so a path copied from any STAC client can be globbed. [] turns it off.
rewritenone{ from, to } text swapped in the SQL before it runs, such as an NRP prefix for its source.coop mirror. A URL that matches fetchWhole before or after the rewrites is fetched whole, so a rewrite never turns a whole-file fetch into range reads.
fetchWholenoneURL prefixes whose .parquet files are fetched whole with fetch(), in parallel, and read from memory. GitHub Pages gzips responses and applies byte ranges to the compressed stream, which breaks DuckDB's range reads, so an app's own parquet on Pages needs this.
settingsgeo-query's preserve_insertion_order and disabled_optimizersDuckDB settings, merged over the defaults, so an app that adds one keeps the rest. A value of null leaves a default unset.
allowedDirectoriess3://, NRP and source.coop over httpsThe only places SQL may read.
maxUploadBytes50 MBThe largest file a page may add with addFile() (Visitor files). Each instance holds its own copy.
locktrueExternal access and extension loading off, configuration locked, SELECT only. The worker always sets it.
duckdb1.33.1-dev57.0The DuckDB-wasm version on jsDelivr, which is DuckDB 1.5.4. 1.33.1-dev114.0 is a build of DuckDB 2.0 that spills large aggregates and sorts; Capabilities and limitations compares the two.

Rewrites are applied, and whole-fetch files substituted, before the SELECT check, so the check covers the SQL that runs.

glen-charts also sets s3_allow_recursive_globbing = false. It is not a default here, because the checks glob with **, but an app can set it in settings.

Released under the Apache-2.0 License.