The base Resource that serves GeoTIFF raster data via getPixelData, designed for use within MartiniTerrainProvider

Implements

Constructors

  • Constructs new CogResource from GeoTIFF source data (url, Blob, ArrayBuffer). Also enables pre-creating GeoTIFF object.

    Parameters

    • source: GeoTIFF | GeoTiffSource

      GeoTIFF object or source (string, File, Blob, ArrayBuffer)

    • options: Options = {}

      customizable options

      • getStats

        {@inheritDoc CogResource.Constructor.Options.getStats}

    Returns Promise<CogResource>

    CogResource referencing provided GeoTIFF

Properties

_band: number = 0

Band number (starting at 0) to interpret as elevation values

baseResolution: BaseResolution

stored image.getOrigin(), image.getResolution(), and image.get[Width|Height]() for computing overview resolutions

bbox: BBox

Bounding corners of file data ([west, south, east, north]) in native CRS

clamp: [number, number]

[low, high] bounds to clamp elevation values to

[0, Infinity]
maxZoom: number

Value in TIFF pixel to be reinterpreted as 0 elevation

Based on image position & resolution

noData: number

Value in TIFF pixel to be reinterpreted as 0 elevation

image.getGDALNoData()
projection: Converter

.forward() converts to WGS84, .inverse() converts from WGS84

rectangle: Rectangle

Bounding edges of file data, in Geographic radians

stats?: Stats | Stats[]
tileSize: number = DEFAULT_TILE_SIZE

Grid edge lengths to resample GeoTIFFImage.readRasters(); Must be 2^k + 1

tilingScheme: TilingScheme

Accessors

Methods

  • The main interface for actually requesting data from the resource. Uses a Cesium.Rectangle since tile coordinates {x, y, z} are not consistant across CRS

    Parameters

    • tileRect: Rectangle

      Cesium.Rectangle for tile that is requesting Terrain geometry

    Returns Promise<TypedArrayWithDimensions>

    TypedArray containing pixel data. Specifically, GeoTIFF's TypedArrayWithDimensions result from readRasters()

  • Helpful wrapper around Cesium.Rectangle.intersection() to check against this.rectangle

    Parameters

    • tileRect: Rectangle

      Cesium.Rectangle to check for intersections

    Returns boolean

    true if resource intersects with tileRect, false if not