intersection

# intersection: calculate new geometry

typename Geometry1
typename Geometry2
typename GeometryOut
bool bool boost::geometry::intersection (Geometry1 const &geometry1, Geometry2 const &geometry2, GeometryOut &geometry_out) intersection Geometry1 const & geometry1 Geometry2 const & geometry2 GeometryOut & geometry_out

Calculate the intersection of two geometries.

The free function intersection calculates the spatial set theoretic intersection of two geometries. Geometry1

Any type fulfilling a Geometry Concept

Geometry2

Any type fulfilling a Geometry Concept

GeometryOut

Collection of geometries (e.g. std::vector, std::deque, boost::geometry::multi*) of which the value_type fulfills a Point, LineString or Polygon concept, or it is the output geometry (e.g. for a box)

geometry1

A model of the specified concept

geometry2

A model of the specified concept

geometry_out

The output geometry, either a multi_point, multi_polygon, multi_linestring, or a box (for intersection of two boxes)

[include reference/algorithms/intersection.qbk]