import * as turf from '@turf/turf'; export declare class TropicalHelper { /** * 将原始数据转换为geojson * @param raw */ static convert2Geojson(raw: { id: string; name: string; nameCn?: string; forecasts: any[]; history: any[]; }[]): turf.helpers.FeatureCollection; /** * 插值台风预报轨迹 * @param tropicals * @param step */ static interpolate(tropicals: any, step?: number): turf.helpers.Feature[]; /** * 计算穿航核验点 * 返回24小时内台风中心点 * @param tropical 台风数据 { history: any[], forecasts: any[] } * @param options */ static accelPassageAt(tropical: any, options: { requestId?: string; debug?: boolean; }): { t1: any; t2: any; hr: number; hours: any; }; /** * 计算最佳绕航点 * 1) 确定当前船位与当前台风中心点之间的方位角, * 2) 当前台风中心点与近24小时台风中心点的方位角, * 3) 根据1)、2)及可航半圆计算绕航点 * @param from 船舶位置 * @param tropical 台风数据 { history: any[], forecasts: any[] } * @param radius 与台风中心的距离 * @param speed 前进速度 * @param options */ static diversionPassageAt(from: { lat: number; lng: number; }, tropical: any, radius: number, options?: { requestId?: string; debug?: boolean; }): { at?: undefined; t1?: undefined; t2?: undefined; hr?: undefined; hours?: undefined; } | { at: { lng: number; lat: number; }; t1: any; t2: any; hr: number; hours: any; }; /** * 计算最佳漂航点 * 1) 确定当前船位与当前台风中心点之间的方位角, * 2) 当前台风中心点与近24小时台风中心点的方位角, * 3) 根据2)、3)反向计算航漂航点 * @param from 船舶位置 * @param tropical 台风数据 { history: any[], forecasts: any[] } * @param radius 与台风中心的距离 * @param options */ static driftPassageAt(from: { lat: number; lng: number; }, tropical: any, radius: number, options?: { requestId?: string; debug?: boolean; }): { at?: undefined; t1?: undefined; t2?: undefined; hr?: undefined; hours?: undefined; } | { at: { lng: number; lat: number; }; t1: any; t2: any; hr: number; hours: any; }; /** * 获取台风中心点对 * @param tropical { history: any[], forecasts: any[] } * @param hrs 未来小时数,默认24 * @param options * @returns { t1: 当前台风中心点, t2: 未来hr小时台风中心点, hr: 未来台风中心点与当前台风中心点之间的时间差, hours: 未来24小时内所有台风中心点 } * @private */ private static tropicalCenterTwin; private static pickIndex; private static computeNumber; }