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

29 lines 678 B
// index.ts import { coordEach } from "@turf/meta"; function bbox(geojson, options = {}) { if (geojson.bbox != null && true !== options.recompute) { return geojson.bbox; } const result = [Infinity, Infinity, -Infinity, -Infinity]; coordEach(geojson, (coord) => { if (result[0] > coord[0]) { result[0] = coord[0]; } if (result[1] > coord[1]) { result[1] = coord[1]; } if (result[2] < coord[0]) { result[2] = coord[0]; } if (result[3] < coord[1]) { result[3] = coord[1]; } }); return result; } var turf_bbox_default = bbox; export { bbox, turf_bbox_default as default }; //# sourceMappingURL=index.js.map