/** @packageDocumentation
 * @module Tiles
 */
import { BentleyError, GuidString, LoggingMetaData, RealityDataStatus } from "@itwin/core-bentley";
import { Cartographic, EcefLocation, OrbitGtBlobProps, RealityData, RealityDataFormat, RealityDataProvider, RealityDataSourceKey } from "@itwin/core-common";
import { Range3d } from "@itwin/core-geometry";
/**
 * Reality Data Operation error
 * @alpha
 */
export declare class RealityDataError extends BentleyError {
    constructor(errorNumber: RealityDataStatus, message: string, getMetaData?: LoggingMetaData);
}
/** This interface provide spatial location and volume of interest, in meters, centered around `spatial location`
 * @alpha
 */
export interface SpatialLocationAndExtents {
    /** location of the point at the center of the reaity data */
    location: Cartographic | EcefLocation;
    /** extents of the volume around location */
    worldRange: Range3d;
    /** true if this reality data is geolocated
     * A reality data is geolocated when we can compute a valid position relative to the earth surface.
     * Note that some reality data contains custom coordinate system without any information on the relative position on earth.
     * These reality data will have a location and worldRange but will be identified by the isGeoLocated set to false.
     */
    isGeolocated: boolean;
}
/** This interface provides information to identify the product and engine that create this reality data
 * @alpha
 */
export interface PublisherProductInfo {
    /** product that create this reality data */
    product: string;
    /** engine that create this reality data */
    engine: string;
    /** the version of the engine that create this reality data */
    version: string;
}
/** This interface provide methods used to access a reality data from a reality data provider
 * @beta
 */
export interface RealityDataSource {
    readonly key: RealityDataSourceKey;
    readonly isContextShare: boolean;
    readonly realityDataId: string | undefined;
    /** Metatdata on the reality data source */
    readonly realityData: RealityData | undefined;
    /** The reality data type (e.g.: "RealityMesh3DTiles", OPC, Terrain3DTiles, Cesium3DTiles, ... )*/
    readonly realityDataType: string | undefined;
    /** This method returns the URL to obtain the Reality Data properties.
     * @param iTwinId id of associated iTwin project
     * @returns string containing the URL to reality data.
     */
    getServiceUrl(iTwinId: GuidString | undefined): Promise<string | undefined>;
    /** If true, the geometricError property of the tiles will be used to compute screen-space error.
     * @alpha
     */
    readonly usesGeometricError?: boolean;
    /** If [[usesGeometricError]] is `true`, optionally specifies the maximum error, in pixels, to permit for a tile before requiring refinement of that tile.
     * Default: 16
     * @alpha
     */
    readonly maximumScreenSpaceError?: number;
    /** Given the URL of a tile's content, return the type of that content.
     * "tileset" indicates the content points to a JSON tileset describing the structure of the tile tree below the tile.
     * "tile" indicates the content points to a binary representation of the tile's graphics.
     * @alpha
     */
    getTileContentType(url: string): "tile" | "tileset";
    /** Gets a reality data root document json
     * @returns tile data json
     * @internal
     */
    getRootDocument(iTwinId: GuidString | undefined): Promise<any>;
    /** Gets tile content
     * @param name name or path of tile
     * @returns array buffer of tile content
     * @internal
     */
    getTileContent(name: string): Promise<any>;
    /** Gets a tileset's app data json
     * @param name name or path of tile
     * @returns app data json object
     * @internal
     */
    getTileJson(name: string): Promise<any>;
    /** Gets spatial location and extents of this reality data source.
     * Will return undefined if cannot be resolved or is unbounded (cover entire earth eg: Open Street Map Building from Ion Asset)
     * @returns spatial location and extents
     * @throws [[RealityDataError]] if source is invalid or cannot be read
     * @alpha
     */
    getSpatialLocationAndExtents(): Promise<SpatialLocationAndExtents | undefined>;
    /** Gets information to identify the product and engine that create this reality data
     * Will return undefined if cannot be resolved
     * @returns information to identify the product and engine that create this reality data
     * @alpha
     */
    getPublisherProductInfo(): Promise<PublisherProductInfo | undefined>;
}
/** Utility functions for RealityDataSource
 * @beta
 */
export declare namespace RealityDataSource {
    /** Create a RealityDataSourceKey from a tilesetUrl.
     * @param tilesetUrl the reality data attachment url
     * @param inputProvider identify the RealityDataProvider if known, otherwise function will try to extract it from the tilesetUrl
     * @param inputFormat identify the RealityDataFormat if known, otherwise function will try to extract it from the tilesetUrl
     * @returns the RealityDataSourceKey that uniquely identify a reality data for a provider
     */
    function createKeyFromUrl(tilesetUrl: string, inputProvider?: RealityDataProvider, inputFormat?: RealityDataFormat): RealityDataSourceKey;
    /** @alpha - was used for a very specific case of point cloud (opc) attachment that should not be made public */
    function createKeyFromBlobUrl(blobUrl: string, inputProvider?: RealityDataProvider, inputFormat?: RealityDataFormat): RealityDataSourceKey;
    /** @alpha - OrbitGtBlobProps is alpha */
    function createKeyFromOrbitGtBlobProps(orbitGtBlob: OrbitGtBlobProps, inputProvider?: RealityDataProvider, inputFormat?: RealityDataFormat): RealityDataSourceKey;
    /** @alpha - OrbitGtBlobProps is alpha */
    function createOrbitGtBlobPropsFromKey(rdSourceKey: RealityDataSourceKey): OrbitGtBlobProps | undefined;
    /** @internal - Is used by "fdt attach cesium asset" keyin*/
    function createCesiumIonAssetKey(osmAssetId: number, requestKey: string): RealityDataSourceKey;
    /** Return an instance of a RealityDataSource from a source key.
     * There will aways be only one reality data RealityDataSource for a corresponding reality data source key.
     * @alpha
     */
    function fromKey(key: RealityDataSourceKey, iTwinId: GuidString | undefined): Promise<RealityDataSource | undefined>;
}
/** A named supplier of [RealityDataSource]]s.
 * The provider's name is stored in a [RealityDataSourceKey]($common). When the [[RealityDataSource]] is requested from the key,
 * the provider is looked up in [[IModelApp.realityDataSourceProviders]] by its name and, if found, its [[createRealityDataSource]] method
 * is invoked to produce the reality data source.
 * @alpha
 */
export interface RealityDataSourceProvider {
    /** Produce a RealityDataSource for the specified `key`.
     * @param key Identifies the reality data source.
     * @param iTwinId A default iTwinId to use.
     * @returns the requested reality data source, or `undefined` if it could not be produced.
     */
    createRealityDataSource(key: RealityDataSourceKey, iTwinId: GuidString | undefined): Promise<RealityDataSource | undefined>;
}
/** A registry of [[RealityDataSourceProvider]]s identified by their unique names. The registry can be accessed via [[IModelApp.realityDataSourceProviders]].
 * It includes a handful of built-in providers for sources like Cesium ION, ContextShare, OrbitGT, and arbitrary public-accessible URLs.
 * Any number of additional providers can be registered. They should typically be registered just after [[IModelAp.startup]].
 * @alpha
 */
export declare class RealityDataSourceProviderRegistry {
    private readonly _providers;
    /** @internal */
    constructor();
    /** Register `provider` to produce [[RealityDataSource]]s for the specified provider `name`. */
    register(name: string, provider: RealityDataSourceProvider): void;
    /** Look up the provider registered by the specified `name`. */
    find(name: string): RealityDataSourceProvider | undefined;
}
//# sourceMappingURL=RealityDataSource.d.ts.map