Skip to main content

Class: Overview

Defined in: overview.ts:17

A single resolution level of a GeoTIFF — either the full-resolution image or a reduced-resolution overview. Pairs the data IFD with its corresponding mask IFD (if any).

Constructors

Constructor

new Overview(geotiff, gkd, image, maskImage, cachedTags, dataSource): Overview

Defined in: overview.ts:35

Parameters

geotiff

GeoTIFF

gkd

GeoKeyDirectory

image

TiffImage

maskImage

TiffImage | null

cachedTags

CachedTags

dataSource

Pick<Source, "fetch">

Returns

Overview

Properties

cachedTags

readonly cachedTags: CachedTags

Defined in: overview.ts:18


dataSource

readonly dataSource: Pick<Source, "fetch">

Defined in: overview.ts:21

The data source used for fetching tile data.


geotiff

readonly geotiff: GeoTIFF

Defined in: overview.ts:24

A reference to the parent GeoTIFF object.


gkd

readonly gkd: GeoKeyDirectory

Defined in: overview.ts:27

The GeoKeyDirectory of the primary IFD.


image

readonly image: TiffImage

Defined in: overview.ts:30

The data IFD for this resolution level.


maskImage

readonly maskImage: TiffImage | null = null

Defined in: overview.ts:33

The IFD for the mask associated with this overview level, if any.

Accessors

crs

Get Signature

get crs(): number | ProjJson

Defined in: overview.ts:59

The CRS parsed from the GeoKeyDirectory.

Returns an EPSG code (number) for EPSG-coded CRSes, or a PROJJSON object for user-defined CRSes. The result is cached after the first access.

See also GeoTIFF.epsg for the EPSG code directly from the TIFF tags.

Returns

number | ProjJson


height

Get Signature

get height(): number

Defined in: overview.ts:64

Image height in pixels.

Returns

number


nodata

Get Signature

get nodata(): number | null

Defined in: overview.ts:69

The no data value, or null if not set.

Returns

number | null


tileCount

Get Signature

get tileCount(): TiffImageTileCount

Defined in: overview.ts:74

The number of tiles in the x and y directions

Returns

TiffImageTileCount


tileHeight

Get Signature

get tileHeight(): number

Defined in: overview.ts:79

Tile height in pixels.

Returns

number


tileWidth

Get Signature

get tileWidth(): number

Defined in: overview.ts:84

Tile width in pixels.

Returns

number


transform

Get Signature

get transform(): Affine

Defined in: overview.ts:91

Return the dataset's georeferencing transformation matrix.

Returns

Affine


width

Get Signature

get width(): number

Defined in: overview.ts:99

Image width in pixels.

Returns

number

Methods

fetchTile()

fetchTile(x, y, options?): Promise<Tile>

Defined in: overview.ts:112

Fetch a single tile from the full-resolution image.

Parameters

x

number

The tile column index (0-based).

y

number

The tile row index (0-based).

options?

Optional parameters for fetching the tile.

boundless?

boolean

Whether to clip tiles that are partially outside the image bounds. When true, no clipping is applied. Defaults to true.

pool?

DecoderPool

An optional DecoderPool for decoding the tile data. If not provided, a new decoder will be created for each tile.

signal?

AbortSignal

An optional AbortSignal to cancel the fetch request.

Returns

Promise<Tile>


index()

index(x, y, op?): [number, number]

Defined in: overview.ts:137

Get the (row, col) pixel index containing the geographic coordinate (x, y).

Parameters

x

number

x coordinate in the CRS.

y

number

y coordinate in the CRS.

op?

(n) => number

Rounding function applied to fractional pixel indices. Defaults to Math.floor.

Returns

[number, number]

[row, col] pixel indices.


xy()

xy(row, col, offset?): [number, number]

Defined in: overview.ts:153

Get the geographic (x, y) coordinate of the pixel at (row, col).

Parameters

row

number

Pixel row.

col

number

Pixel column.

offset?

Which part of the pixel to return. Defaults to "center".

"center" | "ul" | "ur" | "ll" | "lr"

Returns

[number, number]

[x, y] in the CRS.