UNPKG

geobuf-merge

Version:

Merge multiple geobuf-encoded geometries together

11 lines (9 loc) 268 B
import type { FeatureCollection } from 'geojson'; export function mergeFeatureCollections( featureCollections: FeatureCollection[], ): FeatureCollection { return { type: 'FeatureCollection', features: featureCollections.flatMap((d) => d.features), }; }