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
25 lines (22 loc) • 918 B
TypeScript
import { Feature, FeatureCollection, GeometryCollection } from 'geojson';
import { Units } from '@turf/helpers';
/**
* Takes a {@link GeoJSON} and measures its length in the specified units, {@link (Multi)Point}'s distance are ignored.
*
* @function
* @param {Feature<LineString|MultiLineString>} geojson GeoJSON to measure
* @param {Object} [options={}] Optional parameters
* @param {string} [options.units=kilometers] can be degrees, radians, miles, or kilometers
* @returns {number} length of GeoJSON
* @example
* var line = turf.lineString([[115, -32], [131, -22], [143, -25], [150, -34]]);
* var length = turf.length(line, {units: 'miles'});
*
* //addToMap
* var addToMap = [line];
* line.properties.distance = length;
*/
declare function length(geojson: Feature<any> | FeatureCollection<any> | GeometryCollection, options?: {
units?: Units;
}): number;
export { length as default, length };