combine
Description
Combines a FeatureCollection of Point, LineString, or Polygon features into MultiPoint, MultiLineString, or MultiPolygon features.
Parameters
Name | Type | Description |
---|---|---|
fc | FeatureCollection<Point | LineString | Polygon> | a FeatureCollection of any type |
Returns
FeatureCollection<MultiPoint | MultiLineString | MultiPolygon> a FeatureCollection of corresponding type to input
Examples
var fc = turf.featureCollection([
turf.point([19.026432, 47.49134]),
turf.point([19.074497, 47.509548]),
]);
var combined = turf.combine(fc);
Installation
$ npm install @turf/combine
import { combine } from "@turf/combine";
const result = combine(...);
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.combine(...);