GeoTIFF Bounds, DuckDB Analytics & Font Subsetting
September 5, 2026 · DevTools
Rasters with no stated location, datasets too big for spreadsheets but too small for a warehouse, and fonts shipping thousands of unused glyphs — three quiet taxes. This guide covers the GeoTIFF Boundary Extractor, DuckDB WASM Playground, and Font Subsetter & Glyph Stripper, each running entirely on local files in the browser.
Locate rasters on Earth before building on them
A GeoTIFF is a TIFF image plus georeferencing tags, and the extractor reads both halves: dimensions, band counts, and the coordinate reference system derived from the GeoKeys, plus a computed bounding box when the file carries tiepoint and pixel-scale tags. calculateBoundingBox anchors on the tiepoint origin, scales by pixels, and validates every input — non-finite numbers, zero or negative dimensions, and short tag arrays throw instead of producing a plausible-looking wrong rectangle.
A silently wrong box poisons everything downstream: tiles for the wrong continent, phantom mosaic seams, area math off by orders of magnitude. Confirm the CRS matches the project and the box overlaps the area of interest before wiring the file into any pipeline. Files without georeferencing tags report dimensions and bands with a null box — a finding in itself.
Analytics-grade SQL on files you already have
The DuckDB WASM Playground loads the official DuckDB WebAssembly bundle from a CDN with a worker-backed connection, then lets you query local CSV and JSON directly with full analytical SQL — aggregations, joins, window functions, and the read_csv and read_json table functions — without uploading anything. splitDuckDbStatements separates multi-statement scripts so sequences of CREATE, COPY, and SELECT run in order, and normalizeDuckDbResult shapes results into displayable tables.
SELECT date_trunc('month', ordered_at) AS month,
count(*) AS orders,
sum(total) AS revenue
FROM read_csv('orders.csv')
GROUP BY 1
ORDER BY 1;
Profile a new extract here before committing to a pipeline — null ratios, cardinality surprises, and timestamp chaos surface in the first queries — then carry the same SQL to production with minimal edits.
Ship only the glyphs your pages actually use
parseSfntTables reads OpenType, TrueType, and WOFF headers into tag, checksum, offset, and length records, and readCmapFormat4 walks the character map with full segment validation — malformed offsets and inverted bounds throw with specific messages rather than mis-mapping code points. analyzeFont maps the requested characters through that map, reporting mapped and unmapped code points, an estimated savings percentage, the unicode-range descriptor, ready-to-paste @font-face CSS, and a generated subset command:
pyftsubset "input.ttf" --output-file="input-subset.ttf" --unicodes=U+0020,U+007E,U+00C0,U+00FF
Run the analysis with the exact character set the page needs — body copy plus headings plus dynamic strings — then execute the printed command locally. Investigate unmapped code points: each renders as tofu boxes to some visitor unless the character never reaches production text. Latin-only subsets of CJK or icon-heavy fonts routinely shed most of their bytes, which converts directly into faster first paint on slow connections.
Try Them
- GeoTIFF Boundary Extractor — dimensions, bands, CRS, and boxes from local rasters.
- DuckDB WASM Playground — analytical SQL over local CSV and JSON via WebAssembly.
- Font Subsetter & Glyph Stripper — glyph analysis with pyftsubset commands and subset CSS.