Skip to content

Mul (polygon intersection)

MaartenHilferink edited this page Sep 5, 2026 · 5 revisions

Geometric functions mul (polygon intersection)

syntax

  • mul(polygon_data_itemA, polygon_data_itemB)
  • polygon_data_itemA * polygon_data_itemB

definition

mul(polygon_data_itemA, polygon_data_itemB) or polygon_data_itemA * polygon_data_itemB results in a new polygon data item with the value-by-value intersection of the polygon_data_itemA and polygon_data_itemB.

The resulting polygon is the intersection (also known as overlap) of the arguments, for instance of a square (polygon_data_itemA) and a set of districts (polygon_data_itemB).

description

Use the bp_overlay_polygon function (or geos_overlay_polygon for dpoint coordinates) to find the intersections of all combinations of two (possibly unrelated) domains with polygon data items. Use the polygon_connectivity function to find out which polygons in a rowset are intersecting or touching; the comparison of these pair-finding operators is on polygon operators.

Use the area function on the results of the multiplied polygons to find out the size of the overlap.

applies to

data items polygon_data_itemA and polygon_data_itemB with an ipoint or spoint value type.

conditions

  1. The composition type type of the arguments needs to be polygon.
  2. The domain unit of the arguments must match or be void. If one domain is void, the argument is handled as if it was the same value for each element of the domain of the other argument.

since version

7.112

example

attribute<ipoint> geometry (poly) := square/geometry[0] * union_polygon/geometry;

see also

Clone this wiki locally