Version: dev

intersect_polygon

Stable function · Relational keys and geometry

Tier: stable · Kind: function · Topic: Relational keys and geometry

JuliaTypeScriptPythonRustGo
not exportednot exportedintersect_polygonintersect_polygonnot exported

Julia

Julia does not export this function.

TypeScript

TypeScript does not export this function.

Python

intersect_polygon(poly_a: object, poly_b: object, manifold: str) -> np.ndarray

Clip two lon-lat polygon rings; return the overlap ring (RFC §8.1).

poly_a / poly_b are [verts, 2] lon-lat coordinate arrays. manifold is one of MANIFOLDS and is required — the geometry interpretation is part of the op’s contract and is never inferred (CONFORMANCE_SPEC.md §5.8.4). Returns the overlap as [n, 2] distinct lon-lat vertices (data-dependent n), or an empty (0, 2) array when the cells do not overlap.

Source

Rust

pub fn intersect_polygon(a: &[(f64, f64)], b: &[(f64, f64)], manifold: Manifold) -> Result<Vec<(f64, f64)>, GeometryError>

Clip polygon a against polygon b on the given manifold, returning the overlap ring as (lon, lat) degree vertices. The ring is implicitly closed and has data-dependent length; a disjoint / edge-touching clip returns an empty Vec (§8.1, §5.8.2).

This is the evaluator for the intersect_polygon leaf op. polygon_area over the returned ring is a separate sum_product FAQ (not computed here).

Source · Rust docs

Go

Go does not export this function.