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) • 906 B
text/typescript
import { GeometryObject, FeatureCollection } from 'geojson';
/**
* Takes a {@link FeatureCollection} and returns a FeatureCollection with given number of {@link Feature|features} at random.
*
* @function
* @param {FeatureCollection} featurecollection set of input features
* @param {number} num number of features to select
* @returns {FeatureCollection} a FeatureCollection with `n` features
* @example
* var points = turf.randomPoint(100, {bbox: [-80, 30, -60, 60]});
*
* var sample = turf.sample(points, 5);
*
* //addToMap
* var addToMap = [points, sample]
* turf.featureEach(sample, function (currentFeature) {
* currentFeature.properties['marker-size'] = 'large';
* currentFeature.properties['marker-color'] = '#000';
* });
*/
declare function sample<T extends GeometryObject>(fc: FeatureCollection<T>, num: number): FeatureCollection<T>;
export { sample as default, sample };