import type { Point } from "../types/interface"; import type { DistanceFn } from "../types/mapHelper"; export declare const findClosestPointInSegment: (point: Point, segment: [Point, Point]) => Point; export declare const findClosestPointInLine: (point: Point, path: Point[], distanceFn: DistanceFn) => { point: Point; distance: number; index: number; }; export declare const isPointInSegment: (point: Point, segment: [Point, Point]) => boolean; export declare const isPointInHalfOpenSegment: (point: Point, segment: [Point, Point]) => boolean; export declare const uniDirectionalHausdorffDistanceOfLine: (line1: Point[], line2: Point[], distanceFn: DistanceFn) => number; export declare const hausdorffDistanceOfLine: (line1: Point[], line2: Point[], distanceFn: DistanceFn) => number; /** * 在折线范围内寻找与基准折线距离最近的子折线,并且该子折线必须包含 includeIndex 位置的点。 * @param targetLine 基准折线 * @param line 折线范围 * @param includeIndex 折线范围内必须包含的点的下标 * @param distanceFn 距离函数 * @param maxLength 结果子路径允许的最大长度,默认无限制。 */ export declare const findClosestSublineInLineWithCertainPoint: (targetLine: Point[], line: Point[], includeIndex: number, distanceFn: DistanceFn, maxLength?: number) => { from: number; to: number; distance: number; line: Point[]; }; /** * 在折线范围内寻找与基准折线距离最近的子折线,并且该子折线必须包含 includeIndex 位置的点。 * 与 findClosestSublineInLineWithCertainPoint 不同的是,该基准折线只有部分可以被当作计算基准 * 所以先要在 targetLine 里面找到最佳部分作为基准,然后再计算 line 中的 subLine * 并且计算 targetLine 的最后一个点在 subLine 中 includePoint 之后的线段上的最近距离点。 * * @param targetLine 基准折线 * @param line 折线范围 * @param includeIndex 折线范围内必须包含的点的下标 * @param includePoint 计算最近距离点时,需要用 includePoint(而不是 includeIndex) 作为起点约束,因为要支持非端点子路径 * @param distanceFn 距离函数 * @param intersectionMaxLength targetLine 计算最佳公共部分时允许的最大长度,默认无限制。 */ export declare const findClosestSublineInLineWithPartialIntersection: (targetLine: Point[], line: Point[], includeIndex: number, includePoint: Point, distanceFn: DistanceFn, intersectionMaxLength?: number) => { from: number; to: number; distance: number; line: Point[]; intersection: Point[]; intersectionUniDistance: number; extendedIntersectionPoint: Point; closestPoint: Point; };