import type { MapLibreOverlay as DeckOverlay } from '@deck.gl/maplibre'; import { MosaicLayer } from '@developmentseed/deck.gl-geotiff'; import type { DecoderPool, GeoTIFF } from '@developmentseed/geotiff'; import type { MapLibreMap } from 'maplibre-gl'; import ClippedCOGLayer from './clipped-cog-layer'; import { type ScalarRange, type ScalarTileData } from './cog-pipeline'; import { type ColorRampName } from './colormap'; import { type Layer, type LayerState } from './layers'; import { type MosaicSheet } from './mosaic'; import type { Quantity } from './quantity'; import type OpenIndexMapResource from './resources/openindexmap'; import type { MapLibreStyle } from './themes/maplibre'; type SheetData = { geotiff: GeoTIFF; range?: ScalarRange; } | null; export type MosaicHost = { map: MapLibreMap; style: MapLibreStyle; beforeId: () => string | undefined; layersChanged: () => void; notice: (notice: string | undefined) => void; loading: (loading: boolean) => void; }; export default class IndexMapMosaic { protected resource: OpenIndexMapResource; readonly id: string; readonly sheets: MosaicSheet[]; readonly minZoom: number; protected host: MosaicHost | undefined; protected deckOverlay: DeckOverlay | undefined; protected decoderPool: DecoderPool | undefined; protected drawnState: LayerState | undefined; protected row: Layer | undefined; protected deckLayer: MosaicLayer | undefined; private loading; protected valueRange: ScalarRange | undefined; protected quantity: Quantity | undefined; private opened; constructor(resource: OpenIndexMapResource, collection: unknown); canDraw(): Promise; createRow(style: MapLibreStyle): Layer; protected readQuantity(): Promise; attach(host: MosaicHost): this; draw(): void; applyState(state: LayerState): void; clear(): void; protected drawDeckLayer(): void; protected createDeckLayer(host: MosaicHost, state: LayerState): MosaicLayer; protected createSheetLayer(sheet: MosaicSheet, data: NonNullable, state: LayerState, ramp: ColorRampName, range: ScalarRange | undefined, signal?: AbortSignal): ClippedCOGLayer | ClippedCOGLayer; protected loadSheet(sheet: MosaicSheet, signal?: AbortSignal): Promise; protected openSheet(url: string, signal?: AbortSignal): Promise; protected loadGeoTIFF(url: string, signal?: AbortSignal): Promise; protected stretchToView(entries: { data?: SheetData; }[]): void; protected reportSheetError(sheet: MosaicSheet, error: unknown): void; protected reportTileError(sheet: MosaicSheet, error: unknown): void; protected syncNotice(): void; protected watchCamera(): void; protected syncLoading(): void; private setLoading; private stopWatching; private handleRender; private handleZoom; private handleProjectionTransition; protected placeOnceIdle(): void; private handleIdle; protected createDecoderPool(): DecoderPool; protected getDeckOverlay(map: MapLibreMap): DeckOverlay; } export {};