import { TileLayer } from '@deck.gl/geo-layers';
import { PMTilesTileSource } from '@loaders.gl/pmtiles';
import type { TextureProps } from '@luma.gl/core';
type Texture2DProps = Partial<TextureProps> & Record<string, any>;
import { DatasetType } from '@kepler.gl/constants';
import { LayerBaseConfig, LayerColorConfig, LayerHeightConfig, VisualChannel, VisConfigColorRange, VisConfigSelection, VisConfigBoolean, VisConfigInput, VisConfigRange, VisConfigNumber } from '@kepler.gl/types';
import { Datasets, KeplerTable as KeplerDataset } from '@kepler.gl/table';
import { GetTileDataDefaultProps, GetTileDataProps, GetTileDataOutput, DataSourceParams, KeplerRasterDataset, Tile2DHeader, PresetOption, CompleteSTACObject } from './types';
import { FindDefaultLayerPropsReturnValue } from '../layer-utils';
import { default as KeplerLayer, LayerBaseConfigPartial } from '../base-layer';
export declare const getNumRasterTilesBeingLoaded: () => number;
export declare const LOAD_ELEVATION_AFTER_ZOOM = 8.9;
export type RasterTileLayerVisConfigCommonSettings = {
    opacity: VisConfigNumber;
    enableTerrain: VisConfigBoolean;
    enableTerrainTopView: VisConfigBoolean;
};
export type RasterTileLayerVisConfigSettings = RasterTileLayerVisConfigCommonSettings & {
    preset: VisConfigSelection;
    useSTACSearching: VisConfigBoolean;
    stacSearchProvider: VisConfigSelection;
    startDate: VisConfigInput;
    endDate: VisConfigInput;
    dynamicColor: VisConfigBoolean;
    colormapId: VisConfigSelection;
    colorRange: VisConfigColorRange;
    linearRescalingFactor: VisConfigRange;
    nonLinearRescaling: VisConfigBoolean;
    gammaContrastFactor: VisConfigNumber;
    sigmoidalContrastFactor: VisConfigNumber;
    sigmoidalBiasFactor: VisConfigNumber;
    saturationValue: VisConfigNumber;
    filterEnabled: VisConfigBoolean;
    filterRange: VisConfigRange;
    _stacQuery: VisConfigInput;
    singleBandName: VisConfigSelection;
};
type RasterTileLayerMeta = {
    zRange: number[] | null;
};
export default class RasterTileLayer extends KeplerLayer {
    visConfigSettings: RasterTileLayerVisConfigSettings;
    meta: RasterTileLayerMeta;
    /** Min bands image data value, based on the current viewport */
    minViewportPixelValue: number;
    /** Max bands image data value, based on the current viewport */
    maxViewportPixelValue: number;
    /** Memoized method that calculates data source params */
    /** Callback to trigger a map redraw (stored from layerCallbacks) */
    onRedrawNeeded: (() => void) | undefined;
    /** Track the last rendered preset to detect changes */
    _lastRenderedPreset: string | undefined;
    /** Timeout ID for deferred redraws */
    _redrawTimeout: ReturnType<typeof setTimeout> | undefined;
    getDataSourceParams: (stac: CompleteSTACObject, preset: string, presetOptions: PresetOption) => DataSourceParams | null;
    constructor(props: any);
    static findDefaultLayerProps(dataset: KeplerDataset): FindDefaultLayerPropsReturnValue;
    get type(): string;
    get name(): string;
    get layerIcon(): KeplerLayer['layerIcon'];
    get supportedDatasetTypes(): DatasetType[];
    get visualChannels(): Record<string, VisualChannel>;
    get requireData(): boolean;
    getDefaultLayerConfig(props: LayerBaseConfigPartial): LayerBaseConfig & Partial<LayerColorConfig & LayerHeightConfig>;
    getHoverData(): null;
    shouldRenderLayer(): boolean;
    formatLayerData(datasets: Datasets, oldLayerData?: any): {
        dataset?: undefined;
        tileSource?: undefined;
    } | {
        dataset: KeplerDataset<import("@kepler.gl/types").Field>;
        tileSource: PMTilesTileSource | null;
    };
    updateLayerMeta(dataset: KeplerRasterDataset): void;
    /**
     * Run when adding a new dataset
     */
    setInitialLayerConfig(dataset: KeplerDataset): RasterTileLayer;
    /**
     * Update zRange of viewport. This is necessary so that tiles in extruded mode are shown properly
     * at high elevations: https://github.com/foursquare/studio-monorepo/pull/1892/files
     * Derived from https://github.com/visgl/deck.gl/blob/8d824a4b836fee3bfebe6fc962e0f03d8c1dbd0d/modules/geo-layers/src/terrain-layer/terrain-layer.js#L173-L196
     *
     * @param tiles Array of tiles in current viewport
     */
    onViewportLoad(tiles: (Tile2DHeader | null)[]): void;
    /**
     * Update viewport-related minPxelValue and maxPixelValue
     * @param tiles - deck.gl tiles
     */
    updateMinMaxPixelValue(tiles: (Tile2DHeader | null)[]): void;
    /**
     * Calculate min and max values of input raster band image properties
     * and update `minBandsValue` and `maxBandsValue`
     * @param images - raster band image properties
     * @return [min, max] pixel values for the tile
     */
    getMinMaxPixelValues(images: Texture2DProps[] | null): [number, number];
    renderLayer(opts: any): TileLayer<any>[];
    private renderStacLayer;
    private renderPMTilesLayer;
    getTileData(props: GetTileDataProps): Promise<GetTileDataOutput>;
    getTileDataPMTiles(props: GetTileDataDefaultProps & {
        shouldLoadTerrain: boolean;
        metadata: {
            rasterTileServerUrls: string[];
            rasterServerMaxRetries?: number;
            rasterServerRetryDelay?: number;
            rasterServerServerErrorsToRetry?: number[];
            rasterServerMaxPerServerRequests?: number;
        };
        globalBounds: DataSourceParams['globalBounds'];
    }, tileSource: any): Promise<any>;
}
export {};
