import { StacSearchResponse, StacItem } from '../core/types'; /** * Cached item index entry. */ interface CachedItem { id: string; title?: string; bbox: [number, number, number, number]; eptUrl: string; pointCount?: number; } /** * Progress callback for rebuild operation. */ export type RebuildProgressCallback = (progress: number, total: number) => void; /** * Client for searching NOAA Coastal LiDAR EPT data from AWS Open Data. * * Uses a pre-built index for instant searches. The index can be rebuilt * to fetch the latest data from the NOAA STAC catalog. * * @example * ```typescript * const searcher = new StacSearcher(); * const results = await searcher.searchByExtent( * [-80.0, 32.0, -79.0, 33.0], * 25 * ); * ``` */ export declare class StacSearcher { private _catalogUrl; private _eptBaseUrl; private _cacheDuration; private _items; /** * Creates a new StacSearcher instance. * * @param catalogUrl - URL to the NOAA STAC catalog.json * @param eptBaseUrl - Base URL for EPT data * @param cacheDuration - Cache duration in milliseconds */ constructor(catalogUrl?: string, eptBaseUrl?: string, cacheDuration?: number); /** * Gets the STAC catalog URL. */ get baseUrl(): string; /** * Gets the EPT base URL. */ get eptBaseUrl(): string; /** * Validates and clamps a bounding box to valid geographic coordinates. */ private _validateBbox; /** * Loads items from the pre-built index or localStorage cache. */ private _loadItems; /** * Fetches fresh data from the NOAA STAC catalog. * This is a slow operation that fetches all items (1000+). * * @param onProgress - Optional progress callback * @returns Promise resolving to fresh items */ rebuildIndex(onProgress?: RebuildProgressCallback): Promise; /** * Gets cached items from localStorage. */ private _getFromCache; /** * Saves items to localStorage cache. */ private _saveToCache; /** * Clears the cached items (localStorage cache only, not pre-built index). */ clearCache(): void; /** * Ensures items are loaded. */ private _ensureLoaded; /** * Searches by bounding box. * * @param bbox - Bounding box [west, south, east, north] * @param limit - Maximum results (default: 50) * @returns Promise resolving to search results */ searchByExtent(bbox: [number, number, number, number], limit?: number): Promise; /** * Gets the EPT URL for a STAC item. * * @param item - STAC item * @returns EPT URL */ getEptUrl(item: StacItem): Promise; /** * Alias for getEptUrl for backward compatibility. * @deprecated Use getEptUrl instead */ getCopcUrl(item: StacItem): Promise; /** * Gets all available items. */ getAllItems(): Promise; /** * Gets the total count of items. */ getCount(): Promise; /** * Gets information about the current index. */ getIndexInfo(): { source: 'prebuilt' | 'cached'; itemCount: number; generatedAt?: string; }; } export {}; //# sourceMappingURL=StacSearcher.d.ts.map