UNPKG

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

28 lines (27 loc) 1.16 kB
import { MultiLineString, MultiPoint, MultiPolygon, Properties } from "@turf/helpers"; import { Point, LineString, Polygon, FeatureCollection } from "@turf/helpers"; /** * Combines a {@link FeatureCollection} of {@link Point}, {@link LineString}, or {@link Polygon} features * into {@link MultiPoint}, {@link MultiLineString}, or {@link MultiPolygon} features. * * @name combine * @param {FeatureCollection<Point|LineString|Polygon>} fc a FeatureCollection of any type * @returns {FeatureCollection<MultiPoint|MultiLineString|MultiPolygon>} a FeatureCollection of corresponding type to input * @example * var fc = turf.featureCollection([ * turf.point([19.026432, 47.49134]), * turf.point([19.074497, 47.509548]) * ]); * * var combined = turf.combine(fc); * * //addToMap * var addToMap = [combined] */ declare function combine(fc: FeatureCollection<Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon>): FeatureCollection<{ type: "MultiPoint" | "MultiLineString" | "MultiPolygon"; coordinates: number[][] | number[][][] | number[][][][]; }, { collectedProperties: Properties[]; }>; export default combine;