From 6f73145e72f96990146f8aa52705cd8b055bb6e6 Mon Sep 17 00:00:00 2001 From: Robert Czobor Date: Fri, 3 Oct 2025 15:35:33 +0200 Subject: [PATCH] docs: add multigeometries to input type --- packages/turf-combine/README.md | 17 +++++++++-------- packages/turf-combine/index.ts | 5 +++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/packages/turf-combine/README.md b/packages/turf-combine/README.md index 1c530e47de..95198e3d3a 100644 --- a/packages/turf-combine/README.md +++ b/packages/turf-combine/README.md @@ -4,12 +4,13 @@ ## combine -Combines a [FeatureCollection][1] of [Point][2], [LineString][3], or [Polygon][4] features -into [MultiPoint][5], [MultiLineString][6], or [MultiPolygon][7] features. +Combines a [FeatureCollection][1] of [Point][2], [MultiPoint][3], [LineString][4], +[MultiLineString][5], [Polygon][6], or [MultiPolygon][7] features +into [MultiPoint][3], [MultiLineString][5], or [MultiPolygon][7] features. ### Parameters -* `fc` **[FeatureCollection][1]<([Point][2] | [LineString][3] | [Polygon][4])>** a FeatureCollection of any type +* `fc` **[FeatureCollection][1]<([Point][2] | [MultiPoint][3] | [LineString][4] | [MultiLineString][5] | [Polygon][6] | [MultiPolygon][7])>** a FeatureCollection of Points, MultiPoints, LineStrings, MultiLineStrings, Polygons, or MultiPolygons ### Examples @@ -25,19 +26,19 @@ var combined = turf.combine(fc); var addToMap = [combined] ``` -Returns **[FeatureCollection][1]<([MultiPoint][5] | [MultiLineString][6] | [MultiPolygon][7])>** a FeatureCollection of corresponding type to input +Returns **[FeatureCollection][1]<([MultiPoint][3] | [MultiLineString][5] | [MultiPolygon][7])>** a FeatureCollection of corresponding type to input [1]: https://tools.ietf.org/html/rfc7946#section-3.3 [2]: https://tools.ietf.org/html/rfc7946#section-3.1.2 -[3]: https://tools.ietf.org/html/rfc7946#section-3.1.4 +[3]: https://tools.ietf.org/html/rfc7946#section-3.1.3 -[4]: https://tools.ietf.org/html/rfc7946#section-3.1.6 +[4]: https://tools.ietf.org/html/rfc7946#section-3.1.4 -[5]: https://tools.ietf.org/html/rfc7946#section-3.1.3 +[5]: https://tools.ietf.org/html/rfc7946#section-3.1.5 -[6]: https://tools.ietf.org/html/rfc7946#section-3.1.5 +[6]: https://tools.ietf.org/html/rfc7946#section-3.1.6 [7]: https://tools.ietf.org/html/rfc7946#section-3.1.7 diff --git a/packages/turf-combine/index.ts b/packages/turf-combine/index.ts index 21650bff58..ab783dd58d 100644 --- a/packages/turf-combine/index.ts +++ b/packages/turf-combine/index.ts @@ -12,11 +12,12 @@ import { feature, featureCollection } from "@turf/helpers"; import { featureEach } from "@turf/meta"; /** - * Combines a {@link FeatureCollection} of {@link Point}, {@link LineString}, or {@link Polygon} features + * Combines a {@link FeatureCollection} of {@link Point}, {@link MultiPoint}, {@link LineString}, + * {@link MultiLineString}, {@link Polygon}, or {@link MultiPolygon} features * into {@link MultiPoint}, {@link MultiLineString}, or {@link MultiPolygon} features. * * @function - * @param {FeatureCollection} fc a FeatureCollection of any type + * @param {FeatureCollection} fc a FeatureCollection of Points, MultiPoints, LineStrings, MultiLineStrings, Polygons, or MultiPolygons * @returns {FeatureCollection} a FeatureCollection of corresponding type to input * @example * var fc = turf.featureCollection([