Package pygeodesy :: Module booleans |
[frames] | no frames]

# Module booleans

Boolean operations on composite polygons and clips.

Classes BooleanFHP and BooleanGH are composites and provide boolean operations `intersection`, `difference`, `reverse-difference`, `sum` and `union`.

Note: A clip is defined as a single, usually closed polygon, a composite is a collection of one or more clips.

See Also: Forster-Hormann-Popa and Greiner-Hormann.

Version: 23.08.16

Classes
| _LatLonBool (INTERNAL) Base class for LatLonFHP and LatLonGH.
| LatLonFHP A point or intersection in a BooleanFHP clip or composite.
| LatLonGH A point or intersection in a BooleanGH clip or composite.
| _Clip (INTERNAL) A doubly-linked list representing a closed polygon of LatLonFHP or LatLonGH points, duplicates and intersections with other clips.
| _CompositeBase (INTERNAL) Base class for BooleanFHP and BooleanGH (`_CompositeFHP` and `_CompositeGH`).
| _CompositeFHP (INTERNAL) A list of clips representing a composite of LatLonFHP points, duplicates and intersections with an other composite.
| _CompositeGH (INTERNAL) A list of clips representing a composite of LatLonGH points, duplicates and intersections with an other composite.
| _BooleanBase
| BooleanFHP Composite class providing boolean operations between two composites using Forster-Hormann-Popa's C++ implementation, transcoded to pure Python.
| BooleanGH Composite class providing boolean operations between two composites using the Greiner-Hormann algorithm and Correia's implementation, modified and extended.

Functions
isBoolean(obj) Check for `Boolean` composites. |

Variables
| __all__ = `_ALL_LAZY.booleans`

Function Details

### isBoolean (obj) |
Check for `Boolean` composites. Arguments: `obj` - The object (any `type`). Returns: `True` if `obj` is BooleanFHP, BooleanGH oe some other composite, `False` otherwise.