Loader or source?
Load a complete image, or query a remote raster.
The loader is the simple complete-file path. GeoTIFFLoader adds metadata discovery, range reads, windows, overview selection, and cancellation for cloud-native access.
Loader
Complete TIFF image and metadata
Source
Bounded windows and HTTP ranges
Output
Typed image data with dimensions
Metadata
Tags, transform, bounds, and CRS
Detailed guide
GeoTIFF loader details
The reference below covers complete-file loading, the returned raster shape, metadata, and the boundary between GeoTIFFLoader and GeoTIFFLoader.
GeoTIFFLoader parses a complete GeoTIFF from an ArrayBuffer and reads the first image in
the file. It is the straightforward path for local files or applications that already have
the complete file in memory. For remote windows, overviews, or band-selective reads, use
GeoTIFFLoader.
| Property | Value |
|---|---|
| Data source | GeoTIFFRasterSource |
Usage
import {load} from '@loaders.gl/core';
import {GeoTIFFLoader} from '@loaders.gl/raster/geotiff';
const image = await load('example.tif', GeoTIFFLoader);
console.log(image.width, image.height);
console.log(image.bounds, image.crs);
Returned data
The loader returns an object containing:
| Field | Description |
|---|---|
data | An RGBA or RGB Uint8ClampedArray containing decoded pixel values. |
width, height | Dimensions of the first image in pixels. |
bounds | The image bounding box from GeoTIFF georeferencing metadata. |
crs | The projected EPSG identifier when it is present in the GeoKeys. |
metadata | The raw GeoTIFF GeoKeys returned by the parser. |
Options
| Option | Type | Default | Description |
|---|---|---|---|
geotiff.enableAlpha | boolean | true | Include an alpha channel when the source image supports it. |
GeoTIFFLoader currently reads only the first image and uses readRGB(). It does not provide
windowed reads, overview selection, or reprojection. Those operations belong to the source API.
For original numeric samples, nodata, and per-band scale/offset metadata, use
GeoTIFFRasterLoader.