DevTools Logo

GeoTIFF Boundary Extractor

GeoTIFF Boundary Extractor

Read raster size, bands, CRS and the bounding box from a GeoTIFF without uploading it.

Runs in your browser
Try an example

GeoTIFF file

no file

The file is read in this tab. Only the first image (not the overviews) is inspected. Pixel values are not decoded.

Raster metadata

Choose a GeoTIFF to inspect it

Nothing leaves your browser.

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