Skip to main content
Version: 7.0.0

combine

Description

Combines a FeatureCollection of Point, LineString, or Polygon features into MultiPoint, MultiLineString, or MultiPolygon features.

Parameters

NameTypeDescription
fcFeatureCollection<Point | LineString | Polygon>a FeatureCollection of any type

Returns

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(...);