interface CogSourceOptions {
    cacheOptions?: CogCacheOptions;
    channels?: number[];
    colorSpace?: ColorSpace;
    containsFn?: CustomContainsFn;
    crs: string;
    flipY?: boolean;
    is8bit?: boolean;
    url: string;
}

Hierarchy (view full)

Properties

cacheOptions?: CogCacheOptions

Advanced caching options.

channels?: number[]

How the samples in the GeoTIFF files (also known as bands), are mapped to the color channels of an RGB(A) image.

Must be an array of either 1, 3 or 4 elements. Each element is the index of a sample in the source file. For example, to map the samples 0, 3, and 2 to the R, G, B colors, you can use [0, 3, 2].

  • 1 element means the resulting image will be a grayscale image
  • 3 elements means the resulting image will be a RGB image
  • 4 elements means the resulting image will be a RGB image with an alpha channel.

Note: if the channels is undefined, then they will be selected automatically with the following rules: if the image has 3 or more samples, the first 3 samples will be used, (i.e [0, 1, 2]). Otherwise, only the first sample will be used (i.e [0]). In any case, no transparency channel will be selected automatically, as there is no way to determine if a specific sample represents transparency.

Examples

  • I have a color image, but I only want to see the blue channel (sample = 1): [1]
  • I have a grayscale image, with only 1 sample: [0]
  • I have a grayscale image with a transparency channel at index 1: [0, 0, 0, 1]
  • I have a color image without a transparency channel: [0, 1, 2]
  • I have a color image with a transparency channel at index 3: [0, 1, 2, 3]
  • I have a color image with transparency at index 3, but I only want to see the blue channel: [1, 1, 1, 3]
  • I have a color image but in the B, G, R order: [2, 1, 0]
colorSpace?: ColorSpace

The custom color space of the generated textures. See https://threejs.org/docs/#manual/en/introduction/Color-management for more information. If unspecified, the source considers that 8-bit images are in the sRGB color space, otherwise NoColorSpace.

containsFn?: CustomContainsFn

The custom function to test if a given extent is contained in this source. Note: we assume this function accepts extents in this source's CRS.

crs: string

The Coordinate Reference System of the image.

flipY?: boolean

Should images be flipped vertically during composition ?

is8bit?: boolean

The data type of images generated. For regular color images, this should be true. For images with a high dynamic range, or images that requires additional processing, this should be false.

url: string

The URL of the COG image.