← back
2026 labsoftware
interactive · also at cog-viewer.surreal.tools

Every time I get a new COG (Cloud Optimized GeoTIFF) file, the first questions are always: what's the CRS? What's the value range? Is it actually cloud-optimized? What does this region look like?

Normal flow: open Jupyter, import rasterio, write boilerplate, plot something, look once, then start over for the next file. It always felt like: a quick "let me just look at this" shouldn't require so much setup.

cog viewer is for that case — pure browser, drop a URL or local .tif, draw a region, see the data immediately; once you're satisfied, "copy as Python" exports a rasterio / rioxarray snippet you can paste into Jupyter to continue.

It's actually COG-aware:

  • Uses HTTP byte-range to download only the tiles for the current viewport — never pulls the whole file
  • Auto-detects multi-band, supports RGB compose
  • Regional stats + histograms, multiple palettes (terrain / viridis / magma / cividis / RdBu_r…)
  • IFD ladder, TIFF tags, GeoKeys — all inspectable
  • A "COG-friendliness" badge tells you whether the file is actually well-optimized
  • Elevation profiles, clip-and-download sub-GeoTIFFs
  • Permalinks (bbox + palette + band selection encoded in URL)
  • Japanese plane-rectangular CRS pre-registered

Stack: pure HTML + ES modules, no build step. OpenLayers 10, geotiff.js, proj4js loaded from CDN. The "no-build" part is my favorite — you can double-click the HTML file and it just runs.

Built with Claude Code as a collaboration.