node-red-contrib-tak-registration
Version:
A Node-RED node to register to TAK and to help wrap files as datapackages to send to TAK
27 lines (24 loc) • 1.08 kB
text/typescript
import { Feature, LineString } from 'geojson';
import { Coord } from '@turf/helpers';
/**
* Returns true if a point is on a line. Accepts a optional parameter to ignore the
* start and end vertices of the linestring.
*
* @function
* @param {Coord} pt GeoJSON Point
* @param {Feature<LineString>} line GeoJSON LineString
* @param {Object} [options={}] Optional parameters
* @param {boolean} [options.ignoreEndVertices=false] whether to ignore the start and end vertices.
* @param {number} [options.epsilon] Fractional number to compare with the cross product result. Useful for dealing with floating points such as lng/lat points
* @returns {boolean} true/false
* @example
* var pt = turf.point([0, 0]);
* var line = turf.lineString([[-1, -1],[1, 1],[1.5, 2.2]]);
* var isPointOnLine = turf.booleanPointOnLine(pt, line);
* //=true
*/
declare function booleanPointOnLine(pt: Coord, line: Feature<LineString> | LineString, options?: {
ignoreEndVertices?: boolean;
epsilon?: number;
}): boolean;
export { booleanPointOnLine, booleanPointOnLine as default };