UNPKG

gis-tools-ts

Version:

A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.

10 lines 844 B
import type { MValue, Properties, VectorFeature, VectorLineString, VectorLineStringGeometry, VectorPoint } from '../../index.js'; /** * Check to see how far away the point is from the line * @param line - the line to check against * @param point - the point to check against the line * @param method - the method to use, either 'euclidean' or 'haversine'. Defaults to 'euclidean' * @returns The shortest distance between the point and a line. Returns -1 if line is empty */ export declare function pointToLineDistance<M = Record<string, unknown>, D extends MValue = Properties, P extends Properties = Properties>(line: VectorLineString<D> | VectorLineStringGeometry<D> | VectorFeature<M, D, P, VectorLineStringGeometry<D>>, point: VectorPoint, method?: 'euclidean' | 'haversine'): number; //# sourceMappingURL=pointToLineDistance.d.ts.map