Skip to main content

Interface: RasterTilesetLevel

Defined in: packages/deck.gl-raster/src/raster-tileset/tileset-interface.ts:9

A single zoom level in a generic raster tileset.

This interface abstracts over both TileMatrixSet levels and Zarr multiscale levels, enabling a single traversal algorithm to work with both.

Properties​

crsBoundsToTileRange​

crsBoundsToTileRange: (projectedMinX, projectedMinY, projectedMaxX, projectedMaxY) => object

Defined in: packages/deck.gl-raster/src/raster-tileset/tileset-interface.ts:61

Get the range of tile indices that overlap a given CRS bounding box.

The returned range is inclusive on both ends: a consumer should iterate for (let col = minCol; col <= maxCol; col++).

Tiles that only touch the bounding box along an edge, within a small floating-point tolerance, are not included. Otherwise, in an aligned pyramid, every parent tile would also claim its neighbors' children, and the traversal would visit and select those children once per parent.

Used by the traversal algorithm to find child tiles from a parent tile's projected bounds.

Parameters​

projectedMinX​

number

projectedMinY​

number

projectedMaxX​

number

projectedMaxY​

number

Returns​

object

maxCol​

maxCol: number

maxRow​

maxRow: number

minCol​

minCol: number

minRow​

minRow: number


matrixHeight​

matrixHeight: number

Defined in: packages/deck.gl-raster/src/raster-tileset/tileset-interface.ts:14

Number of tiles down this level (rows).


matrixWidth​

matrixWidth: number

Defined in: packages/deck.gl-raster/src/raster-tileset/tileset-interface.ts:11

Number of tiles across this level (columns).


metersPerPixel​

metersPerPixel: number

Defined in: packages/deck.gl-raster/src/raster-tileset/tileset-interface.ts:28

Meters per pixel — used for LOD selection.

For TileMatrix: scaleDenominator * SCREEN_PIXEL_SIZE (0.00028 m). For Zarr: sqrt(|scaleX * scaleY|) * mpu (meters per CRS unit).


projectedTileCorners​

projectedTileCorners: (col, row) => Corners

Defined in: packages/deck.gl-raster/src/raster-tileset/tileset-interface.ts:45

Get the projected bounding box of a tile in the source CRS.

The tileset is not guaranteed to be axis aligned, so this returns a rotated rectangle as four corners, which preserves rotation/skew information that would be lost in an axis-aligned bbox.

For TMS this delegates to xy_bounds(); for Zarr it uses affine math directly. Using a function (rather than a stored affine) lets TMS handle variable tile widths (coalesced rows) and bottomLeft origins cleanly.

Tiles in the last column and row may extend past the data. A level that knows its array size clips them to it, so the corners cover only the part of the tile that has data.

Parameters​

col​

number

row​

number

Returns​

Corners


tileHeight​

tileHeight: number

Defined in: packages/deck.gl-raster/src/raster-tileset/tileset-interface.ts:20

Height of each tile in pixels.


tileTransform​

tileTransform: (col, row) => object

Defined in: packages/deck.gl-raster/src/raster-tileset/tileset-interface.ts:80

Get per-tile forward/inverse coordinate transforms for the tile at (col, row).

  • forwardTransform(px, py) maps a pixel coordinate within the tile (origin at the top-left of the tile, (0,0) at the top-left pixel) to a coordinate in the source CRS.
  • inverseTransform(cx, cy) is its inverse.

For axis-aligned tilesets these are affine; the interface allows non-affine transforms (e.g. GCPs) in the future.

Parameters​

col​

number

row​

number

Returns​

object

forwardTransform​

forwardTransform: ProjectionFunction

inverseTransform​

inverseTransform: ProjectionFunction


tileWidth​

tileWidth: number

Defined in: packages/deck.gl-raster/src/raster-tileset/tileset-interface.ts:17

Width of each tile in pixels.