import { Location } from './types'; export declare enum Unit { English = 0, Metric = 1 } /** * Speed between two points */ declare function speed(p1: number[], p2: number[]): number; declare function duration(line: number[][]): number; /** * Distance between geographic points accounting for earth curvature * South latitudes are negative, east longitudes are positive * * @see http://stackoverflow.com/questions/3694380/calculating-distance-between-two-points-using-latitude-longitude-what-am-i-doi * @see http://www.geodatasource.com/developers/javascript * @see http://www.movable-type.co.uk/scripts/latlong.html * @see http://boulter.com/gps/distance/ * * Given φ is latitude radians, λ is longitude radians, R is earth radius: * a = sin²(Δφ/2) + cos φ1 ⋅ cos φ2 ⋅ sin²(Δλ/2) * c = 2 ⋅ atan2(√a, √(1−a)) * d = R ⋅ c */ declare function pointDistance(p1: number[] | undefined, p2: number[] | undefined): number; /** * Find center of coordinates. Points are ordered as longitude, latitude. * * @see http://stackoverflow.com/questions/6671183/calculate-the-center-point-of-multiple-latitude-longitude-coordinate-pairs */ declare function centroid(points: number[][]): Location | null; /** * Simplification using Douglas-Peucker algorithm with recursion elimination */ declare function simplify(points: number[][], maxPointDeviationFeet?: number): number[][]; export declare const measure: { speed: typeof speed; length: (points: number[][]) => number; centroid: typeof centroid; duration: typeof duration; toRadians: (deg: number) => number; sameLocation: (p1: number[] | undefined, p2: number[] | undefined) => boolean; pointDistance: typeof pointDistance; simplify: typeof simplify; }; export {};