Boost.Geometry    Boost C++ Libraries
Functions
intersection: calculate new geometry

Functions

template<typename Geometry1 , typename Geometry2 , typename GeometryOut >
bool boost::geometry::intersection (Geometry1 const &geometry1, Geometry2 const &geometry2, GeometryOut &geometry_out)
 Calculate the intersection of two geometries. More...
 

Detailed Description

Function Documentation

template<typename Geometry1 , typename Geometry2 , typename GeometryOut >
bool boost::geometry::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.

Template Parameters
Geometry1Any type fulfilling a Geometry Concept
Geometry2Any type fulfilling a Geometry Concept
GeometryOutCollection 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)
Parameters
geometry1A model of the specified concept
geometry2A model of the specified concept
geometry_outThe output geometry, either a multi_point, multi_polygon, multi_linestring, or a box (for intersection of two boxes)
Examples:
02_linestring_example.cpp, and 03_polygon_example.cpp.

April 2, 2011

Copyright © 2007-2011 Barend Gehrels, Amsterdam, the Netherlands
Copyright © 2008-2011 Bruno Lalande, Paris, France
Copyright © 2009-2010 Mateusz Loskot, London, UK
Documentation is generated by Doxygen