DevTools Logo

GeoTIFF Boundary Extractor

GeoTIFF Boundary Extractor

Inspect raster metadata and calculate a georeferenced bounding box locally

Choose a GeoTIFF file

Uses geotiff.js on demand to read the first image directory. The bounding box is calculated from the ModelTiepoint and ModelPixelScale tags and can be opened in OpenStreetMap.

Examples

North-up bbox from tiepoint and scale

Input
calculateBoundingBox([0, 0, 0, 100, 200, 0], [2, 3, 0], 50, 20)
Output
[100, 140, 200, 200]

The origin extends by scale times dimensions with y shrinking downward.

Inspection with missing georeferencing

Input
await inspectGeoTiff(bufferWithoutTags)
Output
{ width: 64, height: 32, bands: 1, crs: null, bbox: null }

Dimensions still report while bbox and CRS stay null without tags.

About this tool

GeoTIFF Boundary Extractor reads georeferenced TIFFs with inspectGeoTiff(input, reader): the buffer decodes through a lazily imported geotiff module kept out of the initial bundle, and the first image reports width, height, bands, CRS, and bbox.

Bounding boxes compute through calculateBoundingBox(tiepoint, pixelScale, width, height): originX and originY come from tiepoint[3] and tiepoint[4], corners extend by scaleX * width and scaleY * height, and every axis normalizes to min/max so negative scales still yield valid bounds.

Behavior is explicit and safe: missing ModelTiepoint or ModelPixelScale returns a null bbox, CRS resolves from ProjectedCSTypeGeoKey then GeographicTypeGeoKey then GeographicType, empty buffers throw before decoding, and decoder failures rewrap as Could not read GeoTIFF file with the original detail.

How to use this tool

  1. Load a GeoTIFF buffer

    Provide a non-empty ArrayBuffer holding the .tif file bytes.

  2. Inspect the first image

    Read width, height, and band count from the decoded IFD.

  3. Read the bounding box

    Check bbox corners, or null when tiepoint and scale tags are absent.

  4. Confirm the CRS

    Use the projected or geographic geokey value for reprojection.

Use cases

Previewing raster footprints

Confirm a GeoTIFF's corner coordinates before loading it into a map viewer.

Auditing CRS metadata

Check which EPSG code the projected or geographic geokeys declare.

Handling untagged TIFFs

Distinguish plain imagery with null bbox from georeferenced rasters.

Common mistakes

Mistake:Expecting a bbox from a TIFF without geotags.

Fix:Bbox requires both ModelTiepoint and ModelPixelScale — untagged files report bbox null by design.

Mistake:Reading negative scales as an invalid box.

Fix:Scales normalize to min/max corners, so negative values still produce a valid bounding box.

Mistake:Passing an empty buffer and expecting decoder errors.

Fix:Empty input throws Choose a non-empty GeoTIFF file before the decoder ever runs.

Frequently asked questions

What does this tool do?

It runs inspectGeoTiff on a GeoTIFF buffer with a lazily loaded decoder, reporting width, height, bands, CRS, and a bbox computed by calculateBoundingBox from tiepoint and pixel scale.

How are the bounding box and CRS derived?

OriginX and originY come from tiepoint[3] and tiepoint[4], corners extend by scale times dimensions with min/max normalization for negative scales, and CRS prefers ProjectedCSTypeGeoKey over GeographicTypeGeoKey and GeographicType.

Is my raster uploaded or stored?

No. Decoding, bbox math, and geokey reads run entirely in your browser.

Why a null bbox, or a read error?

Missing ModelTiepoint or ModelPixelScale yields bbox null by design, empty buffers throw before decoding, and decoder failures rewrap as Could not read GeoTIFF file with the original detail.

References & standards

.env Secret Safety Linter

Validate .env syntax and spot likely leaked credentials or placeholder secrets.

.htaccess Generator

Build an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth

2D Fluid Dynamics & Particle Physics Sandbox

A physics playground with two engines sharing one canvas. The fluid mode runs a real Eulerian Navier-Stokes solver — semi-Lagrangian advection, explicit diffusion, Jacobi pressure projection and vorticity confinement — that you paint with dye and velocity using mouse or touch. The particle mode is a damped Verlet N-body engine with gravity wells, Coulomb attractors and repulsors, spring links, wall restitution and elastic circle collisions. Particle counts adapt to the device (100k target on WebGL2 desktop, 2k-5k on CPU fallback), and every configuration exports as runnable code: a Matter.js world, a PixiJS ticker setup, or a standalone vanilla Canvas engine.

AI Function Calling Schema Generator

Generate function calling JSON schemas from TypeScript interfaces

Algorithm Arena & Data Structure Visualizer

Interactive arena for algorithms and data structures: eight sorting algorithms racing on one seeded input, six pathfinding algorithms walking generated mazes, and BST, AVL, Red-Black, B-tree, heap and trie operations replayed step by step with rotations highlighted. Every run shows the Big-O table and the phase-highlighted reference implementation in four languages, and compared values can be played as pitch (sonification) through the shared audio engine. Everything runs client-side; inputs never leave the browser.

Ansible Playbook Generator

Build an Ansible playbook — hosts, vars, and tasks with modules — as YAML