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
35 lines (32 loc) • 1.39 kB
text/typescript
import { Coord, Units } from '@turf/helpers';
import { GeoJsonProperties, Feature, Polygon } from 'geojson';
/**
* Takes a {@link Point} and calculates the ellipse polygon given two semi-axes expressed in variable units and steps for precision.
*
* @param {Coord} center center point
* @param {number} xSemiAxis semi (major) axis of the ellipse along the x-axis
* @param {number} ySemiAxis semi (minor) axis of the ellipse along the y-axis
* @param {Object} [options={}] Optional parameters
* @param {number} [options.angle=0] angle of rotation in decimal degrees, positive clockwise
* @param {Coord} [options.pivot=center] point around which any rotation will be performed
* @param {number} [options.steps=64] number of steps
* @param {string} [options.units='kilometers'] unit of measurement for axes
* @param {Object} [options.properties={}] properties
* @returns {Feature<Polygon>} ellipse polygon
* @example
* var center = [-75, 40];
* var xSemiAxis = 5;
* var ySemiAxis = 2;
* var ellipse = turf.ellipse(center, xSemiAxis, ySemiAxis);
*
* //addToMap
* var addToMap = [turf.point(center), ellipse]
*/
declare function ellipse(center: Coord, xSemiAxis: number, ySemiAxis: number, options: {
steps?: number;
units?: Units;
angle?: number;
pivot?: Coord;
properties?: GeoJsonProperties;
}): Feature<Polygon>;
export { ellipse as default, ellipse };