/** @packageDocumentation
 * @module Tiles
 */
import { Cartographic } from "@itwin/core-common";
import { MapCartoRectangle, MapTilingScheme } from "../internal";
import { SortedArray } from "@itwin/core-bentley";
/** @internal */
declare class RectangleWithLevel extends MapCartoRectangle {
    level: number;
    constructor(level: number, west: number, south: number, east: number, north: number);
}
/** @internal */
declare class QuadTreeNode {
    tilingScheme: MapTilingScheme;
    parent: QuadTreeNode | undefined;
    level: number;
    x: number;
    y: number;
    swNode?: QuadTreeNode;
    seNode?: QuadTreeNode;
    nwNode?: QuadTreeNode;
    neNode?: QuadTreeNode;
    extent: MapCartoRectangle;
    rectangles: SortedArray<RectangleWithLevel>;
    constructor(tilingScheme: MapTilingScheme, parent: QuadTreeNode | undefined, level: number, x: number, y: number);
    get nw(): QuadTreeNode;
    get ne(): QuadTreeNode;
    get sw(): QuadTreeNode;
    get se(): QuadTreeNode;
}
/** @internal */
export declare class TileAvailability {
    private _tilingScheme;
    private _maximumLevel;
    private _rootNodes;
    constructor(_tilingScheme: MapTilingScheme, _maximumLevel: number);
    static rectangleScratch: MapCartoRectangle;
    findNode(level: number, x: number, y: number, nodes: QuadTreeNode[]): boolean;
    /**
     * Marks a rectangular range of tiles in a particular level as being available.  For best performance,
     * add your ranges in order of increasing level.
     *
     * @param {Number} level The level.
     * @param {Number} startX The X coordinate of the first available tiles at the level.
     * @param {Number} startY The Y coordinate of the first available tiles at the level.
     * @param {Number} endX The X coordinate of the last available tiles at the level.
     * @param {Number} endY The Y coordinate of the last available tiles at the level.
     */
    addAvailableTileRange(level: number, startX: number, startY: number, endX: number, endY: number): void;
    computeMaximumLevelAtPosition(position: Cartographic): number;
    private _cartographicScratch;
    /**
     * Determines if a particular tile is available.
     * @param {Number} level The tile level to check.
     * @param {Number} x The X coordinate of the tile to check.
     * @param {Number} y The Y coordinate of the tile to check.
     * @return {Boolean} True if the tile is available; otherwise, false.
     */
    isTileAvailable(level: number, x: number, y: number): boolean;
    private findMaxLevelFromNode;
}
export {};
//# sourceMappingURL=MapTileAvailability.d.ts.map