wxylib in the browser
Examples of wxylib compiled to WebAssembly. Each one reads Cloud Optimized GeoTIFFs with
range requests (wxy-tiff) and warps them onto the screen's own grid (wxy-warp),
with the same code the wxy command runs: rendering is warping to a screen grid.
Sentinel-2 on a web map
Search Earth Search STAC for the view, then warp raw uint16 bands live onto the map, one scene or a whole solar day, block by block from the centre out. Band sets and a stretch you can drag.
One COG, any projection
Open any CORS-enabled COG and pan and zoom it in polar stereographic, Mollweide, geostationary and more. Every view is a fresh warp, reading the overview gdalwarp would.
GeoParquet, queried in the browser
SQL over Overture Maps GeoParquet with DuckDB (wasm): the STAC catalog picks the files the view meets, range requests fetch only their footers and row groups, and the result is a table beside its geometry on the map.
An ocean reanalysis from its byte table
A year of daily BRAN2023 temperature, read in place from 5 GB netCDF files on NCI THREDDS: a table of chunk offsets, range requests, and inflate in the browser. Step through days and depths, or click for a year at one place. Plain JavaScript: the table needs no library to read.
A multidimensional VRT, read in the browser
GHRSST MUR, 2002 to now, as one GDAL mdim.vrt of 38,360 COGs on source.coop: the VRT parsed in plain JavaScript, each day's source found from its DestSlab, read and warped in wasm. Step through days, any projection, click for a month at one cell.
What is in a VRT?
Give it any VRT, a vrt:// string, or paste one: what kind it is (classic, warped, pixel functions, mdim, vector), what every element does, how each source is named, and for a classic raster which source windows and tiles a read touches. The planner is vrt-model in wasm, byte-identical to GDAL on the VRT corpus.
Which chunks does a view need?
A view in any projection planned before anything is fetched: the screen in tiles, each with the resolution level its own scale needs, the chunks counted beside the usual one-box rule. A Zarr pyramid or a COG is then fetched and drawn by its plan. Turn the globe and watch the plan move.
An editing canvas, CAD style
Draw and edit vector shapes to the decimal: snap to vertices, segments, midpoints and intersections; lock distance, angle, x and y; parallel and perpendicular; a coordinate table beside the drawing; every edit an operation in a log. Untouched vertices are written back exactly as read.
A vector VRT, read in the browser
Open an OGR VRT and draw the layers it describes from CSV, GeoJSON, FlatGeobuf and GeoParquet over HTTP: points from columns, WKT, SQL filters, regions, warped and union layers, read as GDAL reads them and checked against it.
More of wxylib
- Documentation: what works, how-tos, explainers and how to help
- wxylib/core: the Rust crates and the
wxycommand - Design: design documents and roadmap
- wxylib/web: the source of these pages