import { Coordinate } from 'ol/coordinate';
import { Extent } from 'ol/extent';
import { default as Geometry } from 'ol/geom/Geometry';
import { ProjectionLike } from 'ol/proj';
import { default as Projection } from 'ol/proj/Projection';
import { default as WMTSTileGrid } from 'ol/tilegrid/WMTS';
import { IProjInfo, ITileGridSchema } from './Models';
import { default as Feature } from 'ol/Feature';
/**
 * 用于投影和矩阵集的工具
 */
export default class PrjGridTool {
    /**
     * 缓存投影对象
     */
    static prjMap: Map<string, Projection>;
    /**
     * 瓦片矩阵集缓存
     */
    static tileGridMap: Map<string, WMTSTileGrid>;
    /**
     *
     */
    static EPSG4326Extent: Extent;
    static EPSG3857Extent: Extent;
    /**
     * 初始化获得地图投影对象
     * @param prjInfo
     * @returns
     */
    static getProjection(prjInfo?: IProjInfo): Projection;
    /**
     * 将当前投影的坐标，转为经纬度
     * @param currentPrjCoord 当前投影的坐标
     * @param currentPrj 当前投影
     * @returns
     */
    static toLonLat(currentPrjCoord: Coordinate, currentPrj: ProjectionLike): Coordinate;
    /**
     * 经纬度坐标 转目标投影，与fromLonLatCoordinate方法相同
     * @param center84
     * @param targetProjection
     * @returns
     */
    static fromLonLat(center84: Coordinate, targetProjection: ProjectionLike): Coordinate;
    /**
     *  获的目标投影的坐标点
     * @param center84  WGS84中心点
     * @param targetProjection 目标视图投影
     * @returns
     */
    static fromLonLatCoordinate(center84: Coordinate, targetProjection: ProjectionLike): Coordinate;
    /**
     * 将某一投影下坐标，转化到另一投影下
     * @param coord 坐标
     * @param fromProjection 源投影
     * @param toProjection 目标投影
     * @returns
     */
    static transformCoordinate(coord: Coordinate, fromProjection: ProjectionLike, toProjection: ProjectionLike): Coordinate;
    /**
     * 根据经纬度范围，获取投影的Extent
     * @param extent84 经纬度范围
     * @param targetPrj 目标投影对象
     * @returns
     */
    static getExtentFrom4326(extent84: Extent, targetPrj?: ProjectionLike): number[];
    /**
     * 转换Extent的投影,与getExtentFromTransform方法相同
     * @param fromPrjExtent 当前投影的Extent
     * @param fromPrj 当前投影
     * @param targetPrj 目标投影
     */
    static transformExtent(fromPrjExtent: Extent, fromPrj: ProjectionLike, targetPrj?: ProjectionLike): void;
    /**
     * 转换Extent的投影
     * @param extent 当前投影的Extent
     * @param fromPrj 当前投影
     * @param targetPrj 目标投影
     * @returns
     */
    static getExtentFromTransform(extent: Extent, fromPrj: ProjectionLike, targetPrj?: ProjectionLike): number[];
    /**
     * 对ol/geom里各个矢量进行重投影变化
     * @param geom 矢量对象
     * @param fromPrj  原投影
     * @param targetPrj 目标投影
     * @returns
     */
    static transformGeometry(geom: Geometry, fromPrj: ProjectionLike, targetPrj?: ProjectionLike): Geometry;
    /**
     * 对单个Feature进行转投影变换
     * @param feature 单个Feature
     * @param fromPrj 原投影
     * @param targetPrj 目标投影
     * @returns
     */
    static transformFeature(feature: Feature, fromPrj: ProjectionLike, targetPrj?: ProjectionLike): Feature;
    /**
     * 对要素列表进行投影变换
     * @param featureList 要素列表
     * @param fromPrj 原始投影
     * @param targetPrj 目标投影
     * @returns
     */
    static transformFeatures(featureList: Feature[], fromPrj: ProjectionLike, targetPrj?: ProjectionLike): Feature[];
    /**
     * 创建WMTS图层的WMTSTileGrid
     * @param wmtsLyrInfo WMTS图层的元数据信息
     * @returns  WMTSTileGrid 对象
     */
    static createWMTSTileGrid(tileSchema: ITileGridSchema): WMTSTileGrid;
    /**
     * 获得天地图瓦片矩阵集
     * @param isWebMercator 默认是墨卡托的
     * @returns
     */
    static getTDTTileGrid(isWebMercator?: boolean): WMTSTileGrid;
    /**
     * 在线查询EPSG，并构建Projection对象和isGeographic
     * @param epsgCode Code值，例如:4490 4326
     * @param epsgSearchURL
     */
    static getProjectionOnline(epsgNum: string, epsgSearchURL?: string): Promise<{
        projection: Projection;
        isGeographic: boolean;
    }>;
    /**
     * 判断投影是否是地理投影
     * @param projection 投影对象
     * @returns true:地理  false:投影
     */
    static isGeographic(projection: Projection): boolean;
    /**
     * 请求WMTS GetCapabilities，并解析XML为对象
     * 例如：https://image.gis.digsur.com/IMGWMTS?layer=s:test789&Service=WMTS&Request=GetCapabilities
     * @param wmtsURL wmts服务地址，例如https://image.gis.digsur.com/IMGWMTS
     * @param layer 图层名,例如：s:test1
     */
    static getWMTSCapabilities(wmtsURL: string, layer: string): Promise<any>;
    /**
     * 获取比例尺=》分辨率转换参数
     * @param isGeographic 是否是地理投影，默认为true
     * @param isChinaDPI 是否是中国dpi 96,默认为true
     * @returns
     */
    static getScaleToResolutionParam(isGeographic?: boolean, isChinaDPI?: boolean): number;
    /**
     * 通过分辨率，获取当前级别的比例尺
     * 1:Scale
     * @param resolution 分辨率
     * @param isGeographic 是否地理投影
     * @param isChinaDPI 是否中国96 DPI
     */
    static computeScaleByResolution(resolution: number, isGeographic?: boolean, isChinaDPI?: boolean): number;
    /**
     *通过地图比例尺，计算地面分辨率
     *通过比例尺，获取当前分辨率
     * @param scale 比例尺
     * @param isGeographic 是否地理投影
     * @param isChinaDPI 是否中国96 DPI
     * @returns 地面分辨率
     */
    static computeResolutionByScale(scale: number, isGeographic?: boolean, isChinaDPI?: boolean): number;
    /**
     * 解析WMTS XML元数据对象，为WMTSLayer加载需要的options对象
     * @param wmtsCap  WMTS XML元数据对象
     * @param isChinaDPI 是否是中国96dpi还是国际标准，默认为true，中国标准
     * @param epsgSearchURL epsg查询地址，默认为 https://epsg.gis.digsur.com/epsg
     * @returns
     */
    static getXMLOptionsFromCapabilities(wmtsCap: any, isChinaDPI?: boolean, epsgSearchURL?: string): Promise<{
        wmtsURL: any;
        layerName: any;
        layerExtent: any;
        tilegrid: WMTSTileGrid;
        projection: any;
        style: any;
        format: any;
        tileMatrixSet: any;
    }>;
}
