Repository navigation
Releases
v0.8.0
geo-query-wasm runs geo-query's MCP server in the browser. Apps can pin this release as https://cdn.jsdelivr.net/gh/SchmidtDSE/geo-query-wasm@v0.8.0/src/…. Nothing that worked on 0.7.0 changes.
Visitor files
A page can give the worker a file of the visitor's own, such as a GeoJSON dropped on the map, and the SQL can read it and join it to the catalog's data (#25, closes #16). The file never leaves the browser; on geo-query the same upload goes to a bucket.
src/files.jsaddsaddFile(worker, file),removeFile(worker, name)andlistFiles(worker). They are messages outside MCP, assendSecrets()is, because the model never holds the bytes. The page tells the model the file's path.addFileresolves to{ name, path, bytes, read, columns, geometry }.readis the SQL call that reads the file, such asST_Read('/upload/site.geojson').columnsis DuckDB's DESCRIBE of the file, andgeometrynames its first GEOMETRY column.- Types.
.geojson,.json,.gpkg,.fgband.kmlare read withST_Read..parquetis read withread_parquet, and.csvwithread_csv.
- Refused files. A file DuckDB cannot read is refused at
addFile.maxUploadBytescaps the size, 50 MB by default. - Timing.
- A file may be sent as soon as the Worker exists; the worker holds it until DuckDB has started.
- Files live only as long as that Worker.
- Calls reject on a worker error or after a timeout (120 s by default), so a worker from an older release shows up as a timeout.
- The SQL stays locked.
/upload/is allowed from start-up, and the SQL still runs only SELECT statements.ST_Readcannot reach other hosts through GDAL; we checked this on DuckDB 1.5.4 and 2.0. - Guidance. The
querydescription gains one line saying where visitor files are. - Engine. A page that imports the engine gets
registerFile,removeFileandlistFiles.
The guide is at https://schmidtdse.github.io/geo-query-wasm/docs/guide/visitor-files.html.
v0.7.0
geo-query-wasm runs geo-query's MCP server in the browser. This release brings it back in line with geo-query's main at 7467f15. Apps can pin it as https://cdn.jsdelivr.net/gh/SchmidtDSE/geo-query-wasm@v0.7.0/src/….
Breaking: no STAC tools
- The server no longer offers
browse_stac_catalog,get_stac_details,get_collectionor thecatalog://resources, as geo-query removed them in geo-query#528 (#23). Its tools arequery,register_hex_tilesandget_hex_tile_status, pluszonal_statswhen an app turns it on. - A client finds dataset paths with its own catalog tool. glen already answers its catalog tools in the browser and never registered the server's. A page without a catalog tool can use
src/stac.js, which writes the same markdown and JSON as before, as the demo page does. - The worker's
discoveryoption is ignored.
Paths and guidance
- A string literal in
queryorregister_hex_tilesSQL that starts with a published NRP or source.coophttps://prefix is rewritten tos3://before it runs, as in geo-query#543. Paths copied from any STAC client can then be globbed. The engine optionhttpsToS3sets the prefixes, and[]turns the rewrite off. Apps that importsrc/engine.jsget this rewrite too. - The
queryand hex-tile descriptions come from geo-query7467f15. Their discovery steps no longer name this server's tools. s3.carlboettiger.infois an alloweds3_endpoint, as on geo-query.
Data
- The demo page and the checks read only the catalog's own data on the source.coop mirror. The instructions about the tpl-cities California county files are gone, and so are the files themselves.
Documentation
- The documentation is published at https://schmidtdse.github.io/geo-query-wasm/docs/ (#20, #21).
v0.6.0
geo-query-wasm runs geo-query's MCP server in the browser. This is the first tag since v0.3.1, and it includes the work from versions 0.4.0 and 0.5.0, which were not tagged. Apps can pin it as https://cdn.jsdelivr.net/gh/SchmidtDSE/geo-query-wasm@v0.6.0/src/….
Catalogs
- The worker walks a STAC catalog to any depth through Catalog and Collection nodes, as geo-query does since geo-query#487 (#18).
browse_stac_cataloglists groups as headings with their datasets indented beneath them. A group's details list every dataset under it, and a short id such aswardsfindsgovernment/wardswhen only one id ends that way. Listings,get_stac_detailsandget_collectionmatch geo-query on the GLEN source.coop mirror, which now lists 140 datasets in 21 groups, and on the St. Louis catalog. - The worker reads Portolan catalogs, whose hrefs are relative and whose root has no self link (#15).
- A dataset whose id is already taken is skipped, but the datasets beneath it are still listed (#18).
Geometry
- GeoParquet geometry is read as GEOMETRY, as it is on geo-query, so spatial SQL such as
ST_Containsworks withoutST_GeomFromWKB(#13). duckdb-wasm cannot export geometry that carries a coordinate system, so the engine casts it to plain GEOMETRY: the engine'sarrowresults give it as WKB, and JSON results as WKT.
Zonal statistics
- An optional
zonal_statstool summarizes a Cloud-Optimized GeoTIFF that has no H3 hex copy over polygon zones (#17). An app turns it on withzonalStats: true. It reads the COG with geotiff.js, ZSTD included, and counts pixels by centre, as rasterio does, or weights them by area. For GHS-POP 2020 over the 14 St. Louis wards it gives 320,133 people in 4.6 s, the same as rasterio. It declines a COG whose collection in the catalog has a hex copy and names that copy.
Hex tiles
register_hex_tilesandget_hex_tile_statusrun in the worker with geo-query's arguments and responses (#6). The worker serves tiles andmetadata.jsonatgeoquerywasm://tiles/hex/…, andsrc/hex-protocol.jsregisters that scheme with MapLibre.
Private data
- An app reads a private bucket with keys it sends to the worker with
sendSecrets()(#8). The model never sees the keys and cannot pass its own.
Capabilities and limits
docs/capabilities.mdlists which queries run well in the browser and which belong on geo-query, with benchmarks against geo-query (#9, #10).- A query is cancelled after 600 seconds, and the instance keeps working (#9).
- DuckDB 2.0 (
1.33.1-dev114.0) is available with theduckdboption and spills large aggregates and sorts. DuckDB 1.5.4 stays the default until duckdb#28218 is fixed (#9, #11).
Compatibility
- The browse listing changes shape: it shows groups with their datasets beneath them, and its header reads "N datasets in M groups". Code that parses the old "N collections" header needs updating.
queryresults informat: "json"give geometry as WKT text, where they gave an escaped WKB blob before.