Skip to main content

intersect

The area two polygons share, or null when they share none. Polygons that only touch along an edge or at a point share no area.

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

Signature​

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

function intersect(first: GeometryInput, second: GeometryInput): PolygonalGeometry | null;

Parameters​

  • first (GeometryInput)
  • second (GeometryInput)

Returns​

PolygonalGeometry | null

Throws​

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

See also​

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