CGAL 6.2 - 2D Regularized Boolean Set-Operations

Loading...
Searching...
No Matches
Functions
Polygon Intersection Testing Functions
Reference Manual

##

There are several overloaded function templates called `do_intersect()` that determine whether the interior of two or more polygons intersect.

A function template in this group that accepts two input polygons has one of the following signatures:

1. | `bool do_intersect(const Type1& pgn1, const Type2& pgn2);`
2. | `bool do_intersect(const Type1& pgn1, const Type2& pgn2, const GpsTraits& traits);`

There are also function templates that accept one or two ranges of input polygons:

3. | `bool do_intersect(InputIterator begin, InputIterator end);`
4. | `bool do_intersect(InputIterator begin, InputIterator end, const GpsTraits& traits);`
5. | `bool do_intersect(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2, InputIterator2 end2);`
6. | `bool do_intersect(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2, InputIterator2 end2, const GpsTraits& traits);`

Template Parameters

  Kernel | a model of the concept `PolygonTraits_2`.
  Container | a model of the concept `Container`; defaults to `std::vector<Kernel::Point_2`>.
  ArrTraits | a model of the concept `AosDirectionalXMonotoneTraits_2`.
  GpsTraits | a model of the concept `GeneralPolygonSetTraits_2`, which must be convertible to `ArrTraits`.

| `Type1` | `Type2`
--- | --- | ---
1 | `Polygon_2` | `Polygon_2`
2 | `Polygon_2` | `Polygon_with_holes_2`
3 | `Polygon_with_holes_2` | `Polygon_2`
4 | `Polygon_with_holes_2` | `Polygon_with_holes_2`
5 | `General_polygon_2` | `General_polygon_2`
6 | `General_polygon_2` | `General_polygon_with_holes_2`
7 | `General_polygon_with_holes_2` | `General_polygon_2`
8 | `General_polygon_with_holes_2` | `General_polygon_with_holes_2`

Parameters

  pgn1,pgn2 | the input polygons.
  (end,begin) | a range of input polygons.
  (end1,begin1) | the first range of input polygons.
  (end2,begin2) | the second range of input polygons.
  traits | an optional traits object.

See also
  `CGAL::complement()`
  `CGAL::intersection()`
  `CGAL::join()`
  `CGAL::difference()`
  `CGAL::symmetric_difference()`
  Polygon_2<Kernel, Container>
  Polygon_with_holes_2<Kernel, Container>

## Functions
template<typename Kernel , typename Container >
bool | CGAL::do_intersect (const Polygon_2< Kernel, Container > &pgn1, const Polygon_2< Kernel, Container > &pgn2)
| determines whether two polygons intersect in their interior.
template<typename Kernel , typename Container >
bool | CGAL::do_intersect (const Polygon_2< Kernel, Container > &pgn1, const Polygon_with_holes_2< Kernel, Container > &pgn2)
| determines whether two polygons intersect in their interior.
template<typename Kernel , typename Container >
bool | CGAL::do_intersect (const Polygon_with_holes_2< Kernel, Container > &pgn1, const Polygon_2< Kernel, Container > &pgn2)
| determines whether two polygons intersect in their interior.
template<typename Kernel , typename Container >
bool | CGAL::do_intersect (const Polygon_with_holes_2< Kernel, Container > &pgn1, const Polygon_with_holes_2< Kernel, Container > &pgn2)
| determines whether two polygons with holes intersect in their interior.
template<typename ArrTraits >
bool | CGAL::do_intersect (const General_polygon_2< ArrTraits > &pgn1, const General_polygon_2< ArrTraits > &pgn2)
| determines whether two general polygons intersect in their interior.
template<typename ArrTraits >
bool | CGAL::do_intersect (const General_polygon_2< ArrTraits > &pgn1, const General_polygon_with_holes_2< General_polygon_2< ArrTraits > > &pgn2)
| determines whether two general polygons intersect in their interior.
template<typename ArrTraits >
bool | CGAL::do_intersect (const General_polygon_with_holes_2< General_polygon_2< ArrTraits > > &pgn1, const General_polygon_2< ArrTraits > &pgn2)
| determines whether two general polygons intersect in their interior.
template<typename Polygon >
bool | CGAL::do_intersect (const General_polygon_with_holes_2< Polygon > &pgn1, const General_polygon_with_holes_2< Polygon > &pgn2)
| determines whether two general polygons with holes intersect in their interior.
template<typename InputIterator >
bool | CGAL::do_intersect (InputIterator begin, InputIterator end)
| Given a range of polygons or a range of polygons with holes (respectively a range of general polygons or a range of general polygons with holes) determines whether the open polygons (respectively general polygons) in the range have a common point.
template<typename InputIterator1 , typename InputIterator2 >
bool | CGAL::do_intersect (InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2, InputIterator2 end2)
| Given a range of polygons (respectively general polygons) and a range of polygons with holes (respectively general polygons with holes) determines whether the open polygons (respectively general polygons) in the two ranges have a common point.
template<typename Kernel , typename Container , typename GpsTraits >
bool | CGAL::do_intersect (const Polygon_2< Kernel, Container > &pgn1, const Polygon_2< Kernel, Container > &pgn2, const GpsTraits &traits)
| determines whether two polygons intersect in their interior.
template<typename Kernel , typename Container , typename GpsTraits >
bool | CGAL::do_intersect (const Polygon_2< Kernel, Container > &pgn1, const Polygon_with_holes_2< Kernel, Container > &pgn2, const GpsTraits &traits)
| determines whether two polygons intersect in their interior.
template<typename Kernel , typename Container , typename GpsTraits >
bool | CGAL::do_intersect (const Polygon_with_holes_2< Kernel, Container > &pgn1, const Polygon_2< Kernel, Container > &pgn2, const GpsTraits &traits)
| determines whether two polygons intersect in their interior.
template<typename Kernel , typename Container , typename GpsTraits >
bool | CGAL::do_intersect (const Polygon_with_holes_2< Kernel, Container > &pgn1, const Polygon_with_holes_2< Kernel, Container > &pgn2, const GpsTraits &traits)
| determines whether two polygons with holes intersect in their interior.
template<typename ArrTraits , typename GpsTraits >
bool | CGAL::do_intersect (const General_polygon_2< ArrTraits > &pgn1, const General_polygon_2< ArrTraits > &pgn2, const GpsTraits &traits)
| determines whether two general polygons intersect in their interior.
template<typename ArrTraits , typename GpsTraits >
bool | CGAL::do_intersect (const General_polygon_2< ArrTraits > &pgn1, const General_polygon_with_holes_2< General_polygon_2< ArrTraits > > &pgn2, const GpsTraits &traits)
| determines whether two general polygons intersect in their interior.
template<typename ArrTraits , typename GpsTraits >
bool | CGAL::do_intersect (const General_polygon_with_holes_2< General_polygon_2< ArrTraits > > &pgn1, const General_polygon_2< ArrTraits > &pgn2, const GpsTraits &traits)
| determines whether two general polygons intersect in their interior.
template<typename Polygon , typename GpsTraits >
bool | CGAL::do_intersect (const General_polygon_with_holes_2< Polygon > &pgn1, const General_polygon_with_holes_2< Polygon > &pgn2, const GpsTraits &traits)
| determines whether two general polygons with holes intersect in their interior.
template<typename InputIterator , typename GpsTraits >
bool | CGAL::do_intersect (InputIterator begin, InputIterator end, const GpsTraits &traits)
| Given a range of polygons or a range of polygons with holes (respectively a range of general polygons or a range of general polygons with holes) determines whether the open polygons (respectively general polygons) in the range have a common point.
template<typename InputIterator1 , typename InputIterator2 , typename GpsTraits >
bool | CGAL::do_intersect (InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2, InputIterator2 end2, const GpsTraits &traits)
| Given a range of polygons (respectively general polygons) and a range of polygons with holes (respectively general polygons with holes) determines whether the open polygons (respectively general polygons) in the two ranges have a common point.

## Function Documentation

## ◆ do_intersect() [1/20]

template<typename ArrTraits >

bool CGAL::do_intersect | ( | const General_polygon_2< ArrTraits > & | pgn1,
|  | const General_polygon_2< ArrTraits > & | pgn2
| ) |  |

`#include <CGAL/Boolean_set_operations_2.h>`

determines whether two general polygons intersect in their interior.

Parameters

  pgn1 | the 1st input polygon.
  pgn2 | the 2nd input polygon.

Returns
  `true` if `pgn1` and `pgn2` intersect in their interior and `false` otherwise.

Precondition
  `ArrTraits` must be a model of the concept `AosDirectionalXMonotoneTraits_2`.

## ◆ do_intersect() [2/20]

template<typename ArrTraits , typename GpsTraits >

bool CGAL::do_intersect | ( | const General_polygon_2< ArrTraits > & | pgn1,
|  | const General_polygon_2< ArrTraits > & | pgn2,
|  | const GpsTraits & | traits
| ) |  |

`#include <CGAL/Boolean_set_operations_2.h>`

determines whether two general polygons intersect in their interior.

Parameters

  pgn1 | the 1st input polygon.
  pgn2 | the 2nd input polygon.
  traits | a traits object.

Returns
  `true` if `pgn1` and `pgn2` intersect in their interior and `false` otherwise.

Precondition
  `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
  `ArrTraits` must be a model of the concept `AosDirectionalXMonotoneTraits_2`.

## ◆ do_intersect() [3/20]

template<typename ArrTraits >

bool CGAL::do_intersect | ( | const General_polygon_2< ArrTraits > & | pgn1,
|  | const General_polygon_with_holes_2< General_polygon_2< ArrTraits > > & | pgn2
| ) |  |

`#include <CGAL/Boolean_set_operations_2.h>`

determines whether two general polygons intersect in their interior.

Parameters

  pgn1 | the 1st input polygon.
  pgn2 | the 2nd input polygon.

Returns
  `true` if `pgn1` and `pgn2` intersect in their interior and `false` otherwise.

Precondition
  `ArrTraits` must be a model of the concept `AosDirectionalXMonotoneTraits_2`.

## ◆ do_intersect() [4/20]

template<typename ArrTraits , typename GpsTraits >

bool CGAL::do_intersect | ( | const General_polygon_2< ArrTraits > & | pgn1,
|  | const General_polygon_with_holes_2< General_polygon_2< ArrTraits > > & | pgn2,
|  | const GpsTraits & | traits
| ) |  |

`#include <CGAL/Boolean_set_operations_2.h>`

determines whether two general polygons intersect in their interior.

Parameters

  pgn1 | the 1st input polygon.
  pgn2 | the 2nd input polygon.
  traits | a traits object.

Returns
  `true` if `pgn1` and `pgn2` intersect in their interior and `false` otherwise.

Precondition
  `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
  `ArrTraits` must be a model of the concept `AosDirectionalXMonotoneTraits_2`.

## ◆ do_intersect() [5/20]

template<typename ArrTraits >

bool CGAL::do_intersect | ( | const General_polygon_with_holes_2< General_polygon_2< ArrTraits > > & | pgn1,
|  | const General_polygon_2< ArrTraits > & | pgn2
| ) |  |

`#include <CGAL/Boolean_set_operations_2.h>`

determines whether two general polygons intersect in their interior.

Parameters

  pgn1 | the 1st input polygon.
  pgn2 | the 2nd input polygon.

Returns
  `true` if `pgn1` and `pgn2` intersect in their interior and `false` otherwise.

Precondition
  `ArrTraits` must be a model of the concept `AosDirectionalXMonotoneTraits_2`.

## ◆ do_intersect() [6/20]

template<typename ArrTraits , typename GpsTraits >

bool CGAL::do_intersect | ( | const General_polygon_with_holes_2< General_polygon_2< ArrTraits > > & | pgn1,
|  | const General_polygon_2< ArrTraits > & | pgn2,
|  | const GpsTraits & | traits
| ) |  |

`#include <CGAL/Boolean_set_operations_2.h>`

determines whether two general polygons intersect in their interior.

Parameters

  pgn1 | the 1st input polygon.
  pgn2 | the 2nd input polygon.
  traits | a traits object.

Returns
  `true` if `pgn1` and `pgn2` intersect in their interior and `false` otherwise.

Precondition
  `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
  `ArrTraits` must be a model of the concept `AosDirectionalXMonotoneTraits_2`.

## ◆ do_intersect() [7/20]

template<typename Polygon >

bool CGAL::do_intersect | ( | const General_polygon_with_holes_2< Polygon > & | pgn1,
|  | const General_polygon_with_holes_2< Polygon > & | pgn2
| ) |  |

`#include <CGAL/Boolean_set_operations_2.h>`

determines whether two general polygons with holes intersect in their interior.

Parameters

  pgn1 | the 1st input polygon.
  pgn2 | the 2nd input polygon.

Returns
  `true` if `pgn1` and `pgn2` intersect in their interior and `false` otherwise.

## ◆ do_intersect() [8/20]

template<typename Polygon , typename GpsTraits >

bool CGAL::do_intersect | ( | const General_polygon_with_holes_2< Polygon > & | pgn1,
|  | const General_polygon_with_holes_2< Polygon > & | pgn2,
|  | const GpsTraits & | traits
| ) |  |

`#include <CGAL/Boolean_set_operations_2.h>`

determines whether two general polygons with holes intersect in their interior.

Parameters

  pgn1 | the 1st input polygon.
  pgn2 | the 2nd input polygon.
  traits | a traits object.

Returns
  `true` if `pgn1` and `pgn2` intersect in their interior and `false` otherwise.

Precondition
  `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.

## ◆ do_intersect() [9/20]

template<typename Kernel , typename Container >

bool CGAL::do_intersect | ( | const Polygon_2< Kernel, Container > & | pgn1,
|  | const Polygon_2< Kernel, Container > & | pgn2
| ) |  |

`#include <CGAL/Boolean_set_operations_2.h>`

determines whether two polygons intersect in their interior.

The kernel used to instantiate the type of the input polygons must support exact predicates to guarantee correct results; however, inexact constructions are tolerated.

Parameters

  pgn1 | the 1st input polygon.
  pgn2 | the 2nd input polygon.

Returns
  `true` if `pgn1` and `pgn2` intersect in their interior and `false` otherwise.

## ◆ do_intersect() [10/20]

template<typename Kernel , typename Container , typename GpsTraits >

bool CGAL::do_intersect | ( | const Polygon_2< Kernel, Container > & | pgn1,
|  | const Polygon_2< Kernel, Container > & | pgn2,
|  | const GpsTraits & | traits
| ) |  |

`#include <CGAL/Boolean_set_operations_2.h>`

determines whether two polygons intersect in their interior.

The kernel used to instantiate the type of the input polygons must support exact predicates to guarantee correct results; however, inexact constructions are tolerated.

Parameters

  pgn1 | the 1st input polygon.
  pgn2 | the 2nd input polygon.
  traits | a traits object.

Returns
  `true` if `pgn1` and `pgn2` intersect in their interior and `false` otherwise.

Precondition
  `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.

## ◆ do_intersect() [11/20]

template<typename Kernel , typename Container >

bool CGAL::do_intersect | ( | const Polygon_2< Kernel, Container > & | pgn1,
|  | const Polygon_with_holes_2< Kernel, Container > & | pgn2
| ) |  |

`#include <CGAL/Boolean_set_operations_2.h>`

determines whether two polygons intersect in their interior.

The kernel used to instantiate the type of the input polygons must support exact predicates to guarantee correct results; however, inexact constructions are tolerated.

Parameters

  pgn1 | the 1st input polygon.
  pgn2 | the 2nd input polygon.

Returns
  `true` if `pgn1` and `pgn2` intersect in their interior and `false` otherwise.

## ◆ do_intersect() [12/20]

template<typename Kernel , typename Container , typename GpsTraits >

bool CGAL::do_intersect | ( | const Polygon_2< Kernel, Container > & | pgn1,
|  | const Polygon_with_holes_2< Kernel, Container > & | pgn2,
|  | const GpsTraits & | traits
| ) |  |

`#include <CGAL/Boolean_set_operations_2.h>`

determines whether two polygons intersect in their interior.

The kernel used to instantiate the type of the input polygons must support exact predicates to guarantee correct results; however, inexact constructions are tolerated.

Parameters

  pgn1 | the 1st input polygon.
  pgn2 | the 2nd input polygon.
  traits | a traits object.

Returns
  `true` if `pgn1` and `pgn2` intersect in their interior and `false` otherwise.

Precondition
  `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.

## ◆ do_intersect() [13/20]

template<typename Kernel , typename Container >

bool CGAL::do_intersect | ( | const Polygon_with_holes_2< Kernel, Container > & | pgn1,
|  | const Polygon_2< Kernel, Container > & | pgn2
| ) |  |

`#include <CGAL/Boolean_set_operations_2.h>`

determines whether two polygons intersect in their interior.

The kernel used to instantiate the type of the input polygons must support exact predicates to guarantee correct results; however, inexact constructions are tolerated.

Parameters

  pgn1 | the 1st input polygon.
  pgn2 | the 2nd input polygon.

Returns
  `true` if `pgn1` and `pgn2` intersect in their interior and `false` otherwise.

## ◆ do_intersect() [14/20]

template<typename Kernel , typename Container , typename GpsTraits >

bool CGAL::do_intersect | ( | const Polygon_with_holes_2< Kernel, Container > & | pgn1,
|  | const Polygon_2< Kernel, Container > & | pgn2,
|  | const GpsTraits & | traits
| ) |  |

`#include <CGAL/Boolean_set_operations_2.h>`

determines whether two polygons intersect in their interior.

The kernel used to instantiate the type of the input polygons must support exact predicates to guarantee correct results; however, inexact constructions are tolerated.

Parameters

  pgn1 | the 1st input polygon.
  pgn2 | the 2nd input polygon.
  traits | a traits object.

Returns
  `true` if `pgn1` and `pgn2` intersect in their interior and `false` otherwise.

Precondition
  `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.

## ◆ do_intersect() [15/20]

template<typename Kernel , typename Container >

bool CGAL::do_intersect | ( | const Polygon_with_holes_2< Kernel, Container > & | pgn1,
|  | const Polygon_with_holes_2< Kernel, Container > & | pgn2
| ) |  |

`#include <CGAL/Boolean_set_operations_2.h>`

determines whether two polygons with holes intersect in their interior.

The kernel used to instantiate the type of the input polygons must support exact predicates to guarantee correct results; however, inexact constructions are tolerated.

Parameters

  pgn1 | the 1st input polygon.
  pgn2 | the 2nd input polygon.

Returns
  `true` if `pgn1` and `pgn2` intersect in their interior and `false` otherwise.

## ◆ do_intersect() [16/20]

template<typename Kernel , typename Container , typename GpsTraits >

bool CGAL::do_intersect | ( | const Polygon_with_holes_2< Kernel, Container > & | pgn1,
|  | const Polygon_with_holes_2< Kernel, Container > & | pgn2,
|  | const GpsTraits & | traits
| ) |  |

`#include <CGAL/Boolean_set_operations_2.h>`

determines whether two polygons with holes intersect in their interior.

The kernel used to instantiate the type of the input polygons must support exact predicates to guarantee correct results; however, inexact constructions are tolerated.

Parameters

  pgn1 | the 1st input polygon.
  pgn2 | the 2nd input polygon.
  traits | a traits object.

Returns
  `true` if `pgn1` and `pgn2` intersect in their interior and `false` otherwise.

Precondition
  `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.

## ◆ do_intersect() [17/20]

template<typename InputIterator >

bool CGAL::do_intersect | ( | InputIterator | begin,
|  | InputIterator | end
| ) |  |

`#include <CGAL/Boolean_set_operations_2.h>`

Given a range of polygons or a range of polygons with holes (respectively a range of general polygons or a range of general polygons with holes) determines whether the open polygons (respectively general polygons) in the range have a common point.

When the operation is applied to linear polygons (that is, the value type of the input iterator is either `Polygon_2` or `Polygon_with_holes_2`), the kernel used to instantiate the type of the input polygons must support exact predicates to guarantee correct results; however, inexact constructions are tolerated.

Parameters

  begin | the first iterator of the input range. Its value type is either `Polygon_2` (respectively `General_polygon_2`) or `Polygon_with_holes_2` (respectively `General_polygon_with_holes_2`).
  end | the past-the-end iterator of the input range. Its value type is either `Polygon_2` (respectively `General_polygon_2`) or `Polygon_with_holes_2` (respectively `General_polygon_with_holes_2`).

Returns
  `true` if the pairwise intersections of all open polygons or polygons with holes (respectively general polygons or general polygons with holes) in the range [*begin,*end) overlap, and `false` otherwise.

## ◆ do_intersect() [18/20]

template<typename InputIterator , typename GpsTraits >

bool CGAL::do_intersect | ( | InputIterator | begin,
|  | InputIterator | end,
|  | const GpsTraits & | traits
| ) |  |

`#include <CGAL/Boolean_set_operations_2.h>`

Given a range of polygons or a range of polygons with holes (respectively a range of general polygons or a range of general polygons with holes) determines whether the open polygons (respectively general polygons) in the range have a common point.

When the operation is applied to linear polygons (that is, the value type of the input iterator is either `Polygon_2` or `Polygon_with_holes_2`), the traits parameter `GpsTraits` must support exact predicates to guarantee correct results; however, inexact constructions are tolerated.

Parameters

  begin | the first iterator of the input range. Its value type is either `Polygon_2` (respectively `General_polygon_2`) or `Polygon_with_holes_2` (respectively `General_polygon_with_holes_2`).
  end | the past-the-end iterator of the input range. Its value type is either `Polygon_2` (respectively `General_polygon_2`) or `Polygon_with_holes_2` (respectively `General_polygon_with_holes_2`).
  traits | a traits object.

Returns
  `true` if the pairwise intersections of all open polygons or polygons with holes (respectively general polygons or general polygons with holes) in the range [*begin,*end) overlap, and `false` otherwise.

Precondition
  `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.

## ◆ do_intersect() [19/20]

template<typename InputIterator1 , typename InputIterator2 >

bool CGAL::do_intersect | ( | InputIterator1 | begin1,
|  | InputIterator1 | end1,
|  | InputIterator2 | begin2,
|  | InputIterator2 | end2
| ) |  |

`#include <CGAL/Boolean_set_operations_2.h>`

Given a range of polygons (respectively general polygons) and a range of polygons with holes (respectively general polygons with holes) determines whether the open polygons (respectively general polygons) in the two ranges have a common point.

When the operation is applied to linear polygons (that is, the value type of any input iterator is either `Polygon_2` or `Polygon_with_holes_2`), the kernel used to instantiate the type of the input polygons must support exact predicates to guarantee correct results; however, inexact constructions are tolerated.

Parameters

  begin1 | the first iterator of the 1st input range. Its value type is `Polygon_2` (respectively `General_polygon_2`).
  end1 | the past-the-end iterator of the 1st input range. Its value type is `Polygon_2` (respectively `General_polygon_2`).
  begin2 | the first iterator of the 2nd input range. Its value type is `Polygon_with_holes_2` (respectively `General_polygon_with_holes_2`).
  end2 | the past-the-end iterator of the 2nd input range. Its value type is `Polygon_with_holes_2` (respectively `General_polygon_with_holes_2`).

Returns
  `true` if the pairwise intersections of all open polygons (respectively general polygons) and polygons with holes (respectively general polygons with holes) in the ranges [*begin1,*end1) and [*begin2,*end2), respectively, overlap, and `false` otherwise.

## ◆ do_intersect() [20/20]

template<typename InputIterator1 , typename InputIterator2 , typename GpsTraits >

bool CGAL::do_intersect | ( | InputIterator1 | begin1,
|  | InputIterator1 | end1,
|  | InputIterator2 | begin2,
|  | InputIterator2 | end2,
|  | const GpsTraits & | traits
| ) |  |

`#include <CGAL/Boolean_set_operations_2.h>`

Given a range of polygons (respectively general polygons) and a range of polygons with holes (respectively general polygons with holes) determines whether the open polygons (respectively general polygons) in the two ranges have a common point.

When the operation is applied to linear polygons (that is, the value type of any input iterator is either `Polygon_2` or `Polygon_with_holes_2`), the traits parameter `GpsTraits` must support exact predicates to guarantee correct results; however, inexact constructions are tolerated.

Parameters

  begin1 | the first iterator of the 1st input range. Its value type is `Polygon_2` (respectively `General_polygon_2`).
  end1 | the past-the-end iterator of the 1st input range. Its value type is `Polygon_2` (respectively `General_polygon_2`).
  begin2 | the first iterator of the 2nd input range. Its value type is `Polygon_with_holes_2` (respectively `General_polygon_with_holes_2`).
  end2 | the past-the-end iterator of the 2nd input range. Its value type is `Polygon_with_holes_2` (respectively `General_polygon_with_holes_2`).
  traits | a traits object.

Returns
  `true` if the pairwise intersections of all open polygons (respectively general polygons) and polygons with holes (respectively general polygons with holes) in the ranges [*begin1,*end1) and [*begin2,*end2), respectively, overlap, and `false` otherwise.