geometry/doc/reference/intersection.qbk
2011-01-01 16:22:40 +00:00

134 lines
5.2 KiB
Plaintext

[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
[/ Generated from doxy/doxygen_output/xml/group__intersection.xml]
[section:intersection intersection]
Calculate the intersection of two geometries.
[heading Description]
The free function intersection calculates the spatial set theoretic intersection of two geometries.
[heading Synopsis]
``template<typename Geometry1, typename Geometry2, typename GeometryOut, >
bool intersection (Geometry1 const &geometry1, Geometry2 const &geometry2, GeometryOut &geometry_out)``
[heading Parameters]
[table
[[Type] [Concept] [Name] [Description] ]
[[Collection] [Collection of geometries (e.g. std::vector, std::deque, boost::geometry::multi*) of which the value_type (below referred to as 'GeometryOut') fulfills a Point, LineString or Polygon concept. ] [ - ] [Must be specified]]
[[Geometry1 const &] [Any type fulfilling a Geometry Concept ] [geometry1] [A model of the specified concept ]]
[[Geometry2 const &] [Any type fulfilling a Geometry Concept ] [geometry2] [A model of the specified concept ]]
[[GeometryOut &] [] [geometry_out] [The output geometry, either a multi_point, multi_polygon, multi_linestring, or a box (for intersection of two boxes)]]
]
[heading Header]
Either
`#include <boost/geometry/geometry.hpp>`
Or
`#include <boost/geometry/algorithms/intersection.hpp>`
[heading Behavior]
[table
[[Case] [Behavior] ]
[[[qbk_out __point__]][Calculates intersection points of input geometries]]
[[[qbk_out __linestring__]][Calculates intersection linestrings of input geometries (NYI)]]
[[[qbk_out __polygon__]][Calculates intersection polygons input (multi)polygons and/or boxes]]
]
[heading Examples]
[intersection_linestring]
[intersection_segment]
[endsect]
[section:intersection_inserter_3 intersection_inserter]
Calculate the intersection of two geometries.
[heading Description]
The free function intersection_inserter calculates the spatial set theoretic intersection of two geometries. This version with the _inserter suffix outputs the intersection to an output iterator, and a template parameter must therefore be specified in the call.
[heading Synopsis]
``template<typename GeometryOut, typename Geometry1, typename Geometry2, typename OutputIterator>
OutputIterator intersection_inserter (Geometry1 const &geometry1, Geometry2 const &geometry2, OutputIterator out)``
[heading Parameters]
[table
[[Type] [Concept] [Name] [Description] ]
[[GeometryOut] [A type fulfilling a Point, LineString or Polygon Concept ] [ - ] [Must be specified]]
[[Geometry1 const &] [Any type fulfilling a Geometry Concept ] [geometry1] [A model of the specified concept ]]
[[Geometry2 const &] [Any type fulfilling a Geometry Concept ] [geometry2] [A model of the specified concept ]]
[[OutputIterator] [A valid output iterator type, accepting geometries of Point, LineString or Polygon Concept ] [out] [The output iterator, to which intersection geometries are feeded ]]
]
[heading Returns]
The output iterator
[heading Header]
`#include <boost/geometry/algorithms/intersection_inserter.hpp>`
[heading Behavior]
[table
[[Case] [Behavior] ]
[[[qbk_out __point__]][Calculates intersection points of input geometries]]
[[[qbk_out __linestring__]][Calculates intersection linestrings of input geometries (NYI)]]
[[[qbk_out __polygon__]][Calculates intersection polygons input (multi)polygons and/or boxes]]
]
[heading Examples]
[intersection_segment_inserter]
[endsect]
[section:intersection_inserter_4_with_strategy intersection_inserter (with strategy)]
Calculate the intersection of two geometries using the specified strategy.
[heading Description]
The free function intersection_inserter calculates the spatial set theoretic intersection of two geometries using the specified strategy. This version with the _inserter suffix outputs the intersection to an output iterator, and a template parameter must therefore be specified in the call.
[heading Synopsis]
``template<typename GeometryOut, typename Geometry1, typename Geometry2, typename OutputIterator, typename Strategy>
OutputIterator intersection_inserter (Geometry1 const &geometry1, Geometry2 const &geometry2, OutputIterator out, Strategy const &strategy)``
[heading Parameters]
[table
[[Type] [Concept] [Name] [Description] ]
[[GeometryOut] [A type fulfilling a Point, LineString or Polygon Concept ] [ - ] [Must be specified]]
[[Geometry1 const &] [Any type fulfilling a Geometry Concept ] [geometry1] [A model of the specified concept ]]
[[Geometry2 const &] [Any type fulfilling a Geometry Concept ] [geometry2] [A model of the specified concept ]]
[[OutputIterator] [A valid output iterator type, accepting geometries of Point, LineString or Polygon Concept ] [out] [The output iterator, to which intersection geometries are feeded ]]
[[Strategy const &] [Compound strategy for intersection ] [strategy] [The strategy ]]
]
[heading Returns]
The output iterator
[heading Header]
`#include <boost/geometry/algorithms/intersection_inserter.hpp>`
[heading Behavior]
[table
[[Case] [Behavior] ]
[[[qbk_out __point__]][Calculates intersection points of input geometries]]
[[[qbk_out __linestring__]][Calculates intersection linestrings of input geometries (NYI)]]
[[[qbk_out __polygon__]][Calculates intersection polygons input (multi)polygons and/or boxes]]
]
[endsect]