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​

_debug​

Get Signature​

get _debug(): boolean

Defined in: overview.ts:74

Inherits the GeoTIFF._debug flag from the parent.

Returns​

boolean


crs​

Get Signature​

get crs(): string | number | ProjJson

Defined in: overview.ts:59

Coordinate reference system information.

  • If crs is a number, it is an EPSG code.
  • If crs is an object, it is a PROJJSON object.
  • If crs is a string, it is an ESRI WKT (this is rare).

The result is cached after the first access.

Returns​

string | 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:79

The number of tiles in the x and y directions

Returns​

TiffImageTileCount


tileHeight​

Get Signature​

get tileHeight(): number

Defined in: overview.ts:84

Tile height in pixels.

Returns​

number


tileWidth​

Get Signature​

get tileWidth(): number

Defined in: overview.ts:89

Tile width in pixels.

Returns​

number


transform​

Get Signature​

get transform(): Affine

Defined in: overview.ts:96

Return the dataset's georeferencing transformation matrix.

Returns​

Affine


width​

Get Signature​

get width(): number

Defined in: overview.ts:104

Image width in pixels.

Returns​

number

Methods​

fetchTile()​

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

Defined in: overview.ts:117

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 and edge tiles are returned at the full nominal tile size. 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>


fetchTiles()​

fetchTiles(xy, options?): Promise<Tile[]>

Defined in: overview.ts:141

Fetch multiple tiles in parallel.

A future implementation may coalesce contiguous byte ranges to reduce the number of HTTP requests.

Parameters​

xy​

[number, number][]

Array of [x, y] tile coordinates.

options?​

Optional parameters (same as fetchTile).

boundless?​

boolean

pool?​

DecoderPool

signal?​

AbortSignal

Returns​

Promise<Tile[]>

Array of Tile objects in the same order as xy.

See​

fetchTile for single-tile fetching.


index()​

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

Defined in: overview.ts:165

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:181

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

Parameters​

row​

number

Pixel row.

col​

number

Pixel column.

offset?​

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

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

Returns​

[number, number]

[x, y] in the CRS.