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
33 lines (30 loc) • 976 B
text/typescript
import { Feature, Point } from 'geojson';
import { AllGeoJSON } from '@turf/helpers';
/**
* Takes a Feature or FeatureCollection and returns a {@link Point} guaranteed to be on the surface of the feature.
*
* * Given a {@link Polygon}, the point will be in the area of the polygon
* * Given a {@link LineString}, the point will be along the string
* * Given a {@link Point}, the point will the same as the input
*
* @function
* @param {GeoJSON} geojson any Feature or FeatureCollection
* @returns {Feature<Point>} a point on the surface of `input`
* @example
* var polygon = turf.polygon([[
* [116, -36],
* [131, -32],
* [146, -43],
* [155, -25],
* [133, -9],
* [111, -22],
* [116, -36]
* ]]);
*
* var pointOnPolygon = turf.pointOnFeature(polygon);
*
* //addToMap
* var addToMap = [polygon, pointOnPolygon];
*/
declare function pointOnFeature(geojson: AllGeoJSON): Feature<Point>;
export { pointOnFeature as default, pointOnFeature };