Skip to main content

union

Merges polygons into one area. Polygons that touch or overlap become one polygon, and ones that do not stay apart as a multipolygon. A single input comes back as a copy.

This is a function exported by @mapcairn/core, checked against version 0.2.0.

Signature​

import { union } from "@mapcairn/core";

function union(geometries: readonly GeometryInput[]): PolygonalGeometry;

Parameters​

  • geometries (readonly GeometryInput[])

Returns​

PolygonalGeometry

Throws​

  • GeometryError of kind invalid for a malformed geometry, empty for no input or an empty polygon, unsupported for anything but a Polygon or MultiPolygon.

See also​

Source: packages/core/src/geometry/operations.ts:168