export interface ElevationTileOptions {
    tileUrlBuilder?: (z: number, x: number, y: number) => string;
    elevDecoder?: (r: number, g: number, b: number) => number;
}
export declare class ElevationFetcher {
    private _zoom;
    private _tileUrlBuilder?;
    private _elevDecoder;
    constructor(zoom?: number, options?: ElevationTileOptions);
    /** Build tile URL (defaults to AWS Terrain Tiles) */
    tileUrl(lat: number, lng: number, zoom?: number): string;
    /**
     * Fetch elevation grid for a given lat/lng.
     * Returns number[][] (TILE_SIZE x TILE_SIZE) with elevation in meters.
     * Falls back to flat terrain (all zeros) on any error.
     *
     * @param decodeImageFn - Optional image decoder for testability.
     *   In browser: uses OffscreenCanvas or createImageBitmap.
     *   In tests: pass a mock that returns ImageData-like object.
     */
    fetchGrid(lat: number, lng: number, decodeImageFn?: (blob: Blob) => Promise<{
        data: Uint8ClampedArray;
        width: number;
        height: number;
    }>): Promise<number[][]>;
    /** Crop a full-tile grid to only the pixels covering center +/- radius */
    cropToRadius(grid: number[][], lat: number, lng: number, radiusMeters: number): number[][];
    /** Generate a flat terrain grid (all zeros) of given size */
    static flatGrid(size: number): number[][];
    /** Decode Terrarium RGB to elevation in meters (exposed for testing) */
    static decodeTerrarium(r: number, g: number, b: number): number;
    /** Decode full tile from ImageData (exposed for testing) */
    static decodeTile(imageData: {
        data: Uint8ClampedArray;
        width: number;
        height: number;
    }): number[][];
    /** Default browser-based image decoder using OffscreenCanvas with raw pixel access */
    private static _defaultDecoder;
}
