Binary

Binary predicates

predicate meaning inverse of
contains None of the points of A are outside B within
contains_properly A contains B and B has no points in common with the boundary of A
covers No points of B lie in the exterior of A covered_by
covered_by Inverse of covers
crosses A and B have some but not all interior points in common
disjoint A and B have no points in common intersects
equals A and B are topologically equal: node order or number of nodes may differ; identical to A contains B and A within B
equals_exact A and B are geometrically equal, and have identical node order
intersects A and B are not disjoint disjoint
is_within_distance A is closer to B than a given distance
within None of the points of B are outside A contains
touches A and B have at least one boundary point in common, but no interior points
overlaps A and B have some points in common; the dimension of these is identical to that of A and B
relate Given a mask pattern, return whether A and B adhere to this pattern

Binary measures

  • distance: returns distance between geometries

Binary transformers

Transformations that work on pair of geometries and return a new geometry.

function returns infix operator
intersection the overlapping geometries for pair of geometries &
union the combination of the geometries; removes internal boundaries and duplicate points, nodes or line pieces |
difference the geometries of the first after removing the overlap with the second geometry /
sym_difference the combinations of the geometries after removing where they intersect; the negation (opposite) of intersection %/%