|
| template<PolygonRange R, IPolygon P = std::ranges::range_value_t<R>> |
| static std::vector< std::pair< P, P > > | delaunay (const R &polygons, util::BiPredicate< P > auto const &neighbouringPredicate, double tolerance=0.0, bool onlyEdges=true) |
| | Find neighbouring polygons using Delaunay triangulation on centroids.
|
| |
| template<PolygonRange R, IPolygon P = std::ranges::range_value_t<R>> |
| static std::vector< std::pair< P, P > > | delaunay (const R &polygons) |
| | Overload without predicate — returns all Delaunay edges.
|
| |
| template<PolygonRange R, IPolygon P = std::ranges::range_value_t<R>> |
| static std::vector< std::pair< P, P > > | sweepTemplate (const R &polygons, util::BiPredicate< BoundingBoxWrapper< P > > auto const &neighbouringPredicate, util::UnaryFunction< P, BoundingBoxWrapper< P > > auto const &wrapper, size_t maxNeighbours) |
| | Generic findNeighbouringPolygons function, which returns a list of pairs indicating the adjacencies of the polygons.
|
| |
| template<PolygonRange R, IPolygon P = std::ranges::range_value_t<R>> |
| static std::vector< std::pair< P, P > > | sweep (const R &polygons, util::BiPredicate< P > auto &&neighbouringPredicate, util::UnaryFunction< P, BoundingBoxWrapper< P > > auto const &wrapper, size_t maxNeighbours) |
| | Finding neighbours of polygons using a sweepline, returns a list of pairs indicating the adjacencies of two polygons.
|
| |
| template<PolygonRange R, IPolygon P = std::ranges::range_value_t<R>> |
| static std::vector< std::pair< P, P > > | sweep (const R &polygons, util::BiPredicate< P > auto const &neighbouringPredicate, size_t maxNeighbours) |
| | Overload with wrapper into default BoundingBoxWrappers (no custom bounding box allowed)
|
| |
| template<PolygonRange R> |
| static std::vector< std::pair< std::ranges::range_value_t< R >, std::ranges::range_value_t< R > > > | sweepWithFixedBuffer (const R &polygons, fishnet::math::DEFAULT_NUMERIC bufferMultiplier, size_t maxNeighbours) |
| | Overload for finding neighbouring polygons with a custom buffer multiplier for the bounding boxes.
|
| |
template<PolygonRange R, IPolygon P = std::ranges::range_value_t<R>>
| static std::vector< std::pair< P, P > > fishnet::geometry::PolygonNeighbours::delaunay |
( |
const R & |
polygons, |
|
|
util::BiPredicate< P > auto const & |
neighbouringPredicate, |
|
|
double |
tolerance = 0.0, |
|
|
bool |
onlyEdges = true |
|
) |
| |
|
inlinestatic |
Find neighbouring polygons using Delaunay triangulation on centroids.
Computes the centroid for each polygon, builds a Delaunay triangulation, and returns an edge for every triangle side connecting two centroids. A BiPredicate filters which edges are considered valid neighbours.
- Template Parameters
-
| R | range type |
| P | polygon type == value type of range |
- Parameters
-
| polygons | range of polygons |
| neighbouringPredicate | BiPredicate deciding whether two Polygons are neighbours |
- Returns
- std::vector<std::pair<P,P>> list of pairs, indicating the neighbouring relationship of two polygons