Fishnet 2.0.1
Framework for Graph-Based Analysis of GIS Vector Data
Loading...
Searching...
No Matches
fishnet::geometry::MultiPolygon< P > Class Template Reference

Implementation of a Multi-Polygon. More...

#include <MultiPolygon.hpp>

Public Types

using numeric_type = typename P::numeric_type
 
using polygon_type = P
 

Public Member Functions

 MultiPolygon (util::input_range_of< P > auto &&polygonsRange, bool checked=false)
 Construct a new Multi Polygon object.
 
 MultiPolygon (const P &polygon)
 
 MultiPolygon (const P &polygon, const P &otherPolygon)
 
template<typename... Args>
 MultiPolygon (const P &current, const P &next, Args... remaining)
 VarArg constructor of a new Multi Polygon object.
 
constexpr util::view_of< P > auto getPolygons () const noexcept
 
template<bool checked = false>
constexpr bool addPolygon (const P &polygon) noexcept
 Add Polygon to the multi-polygon.
 
constexpr bool removePolygon (const P &polygon) noexcept
 
constexpr fishnet::math::DEFAULT_FLOATING_POINT area () const noexcept
 
constexpr Vec2DReal centroid () const noexcept
 Computes centroid point of multi-polygon, by weighting the centroid point of each polygon with its area.
 
constexpr bool contains (IPoint auto const &point) const noexcept
 
constexpr bool contains (ISegment auto const &segment) const noexcept
 
constexpr bool isInside (IPoint auto const &point) const noexcept
 
constexpr bool isOnBoundary (IPoint auto const &point) const noexcept
 
constexpr bool isOutside (IPoint auto const &point) const noexcept
 
constexpr bool intersects (LinearGeometry auto const &linearFeature) const noexcept
 
constexpr std::unordered_set< Vec2DReal > intersections (LinearGeometry auto const &linearGeometry) const noexcept
 
constexpr bool contains (IPolygon auto const &query) const noexcept
 
constexpr bool crosses (IPolygon auto const &query) const noexcept
 
constexpr bool touches (IPolygon auto const &query) const noexcept
 
constexpr bool containsInHole (IPolygon auto const &query) const noexcept
 
constexpr fishnet::math::DEFAULT_FLOATING_POINT distance (IPolygon auto const &query) const noexcept
 
constexpr fishnet::math::DEFAULT_FLOATING_POINT distance (IMultiPolygon auto const &other) const noexcept
 
constexpr Rectangle< numeric_type > aaBB () const noexcept
 
template<IPolygon Q>
constexpr bool operator== (const MultiPolygon< Q > &other) const noexcept
 
constexpr size_t hash () const noexcept
 
constexpr std::string toString () const noexcept
 

Static Public Attributes

static constexpr GeometryType type = GeometryType::MULTIPOLYGON
 

Detailed Description

template<IPolygon P>
class fishnet::geometry::MultiPolygon< P >

Implementation of a Multi-Polygon.

Template Parameters
Ppolygon type stored within the multi-polygon

Member Typedef Documentation

◆ numeric_type

template<IPolygon P>
using fishnet::geometry::MultiPolygon< P >::numeric_type = typename P::numeric_type

◆ polygon_type

template<IPolygon P>
using fishnet::geometry::MultiPolygon< P >::polygon_type = P

Constructor & Destructor Documentation

◆ MultiPolygon() [1/4]

template<IPolygon P>
fishnet::geometry::MultiPolygon< P >::MultiPolygon ( util::input_range_of< P > auto &&  polygonsRange,
bool  checked = false 
)
inline

Construct a new Multi Polygon object.

Parameters
polygonsRange
checkedif true, no checks are applied, potentially speeding up the construction

◆ MultiPolygon() [2/4]

template<IPolygon P>
fishnet::geometry::MultiPolygon< P >::MultiPolygon ( const P &  polygon)
inline

◆ MultiPolygon() [3/4]

template<IPolygon P>
fishnet::geometry::MultiPolygon< P >::MultiPolygon ( const P &  polygon,
const P &  otherPolygon 
)
inline

◆ MultiPolygon() [4/4]

template<IPolygon P>
template<typename... Args>
fishnet::geometry::MultiPolygon< P >::MultiPolygon ( const P &  current,
const P &  next,
Args...  remaining 
)
inline

VarArg constructor of a new Multi Polygon object.

Template Parameters
Args
Parameters
current
next
remaining

Member Function Documentation

◆ aaBB()

template<IPolygon P>
constexpr Rectangle< numeric_type > fishnet::geometry::MultiPolygon< P >::aaBB ( ) const
inlineconstexprnoexcept

◆ addPolygon()

template<IPolygon P>
template<bool checked = false>
constexpr bool fishnet::geometry::MultiPolygon< P >::addPolygon ( const P &  polygon)
inlineconstexprnoexcept

Add Polygon to the multi-polygon.

Template Parameters
checkedif true, all checks are skipped, speeding up the method
Parameters
polygon
Returns
true = success
false = error

◆ area()

template<IPolygon P>
constexpr fishnet::math::DEFAULT_FLOATING_POINT fishnet::geometry::MultiPolygon< P >::area ( ) const
inlineconstexprnoexcept

◆ centroid()

template<IPolygon P>
constexpr Vec2DReal fishnet::geometry::MultiPolygon< P >::centroid ( ) const
inlineconstexprnoexcept

Computes centroid point of multi-polygon, by weighting the centroid point of each polygon with its area.

Returns
centroid point

◆ contains() [1/3]

template<IPolygon P>
constexpr bool fishnet::geometry::MultiPolygon< P >::contains ( IPoint auto const &  point) const
inlineconstexprnoexcept

◆ contains() [2/3]

template<IPolygon P>
constexpr bool fishnet::geometry::MultiPolygon< P >::contains ( IPolygon auto const &  query) const
inlineconstexprnoexcept

◆ contains() [3/3]

template<IPolygon P>
constexpr bool fishnet::geometry::MultiPolygon< P >::contains ( ISegment auto const &  segment) const
inlineconstexprnoexcept

◆ containsInHole()

template<IPolygon P>
constexpr bool fishnet::geometry::MultiPolygon< P >::containsInHole ( IPolygon auto const &  query) const
inlineconstexprnoexcept

◆ crosses()

template<IPolygon P>
constexpr bool fishnet::geometry::MultiPolygon< P >::crosses ( IPolygon auto const &  query) const
inlineconstexprnoexcept

◆ distance() [1/2]

template<IPolygon P>
constexpr fishnet::math::DEFAULT_FLOATING_POINT fishnet::geometry::MultiPolygon< P >::distance ( IMultiPolygon< P > auto const &  other) const
inlineconstexprnoexcept

◆ distance() [2/2]

template<IPolygon P>
constexpr fishnet::math::DEFAULT_FLOATING_POINT fishnet::geometry::MultiPolygon< P >::distance ( IPolygon auto const &  query) const
inlineconstexprnoexcept

◆ getPolygons()

template<IPolygon P>
constexpr util::view_of< P > auto fishnet::geometry::MultiPolygon< P >::getPolygons ( ) const
inlineconstexprnoexcept

◆ hash()

template<IPolygon P>
constexpr size_t fishnet::geometry::MultiPolygon< P >::hash ( ) const
inlineconstexprnoexcept

◆ intersections()

template<IPolygon P>
constexpr std::unordered_set< Vec2DReal > fishnet::geometry::MultiPolygon< P >::intersections ( LinearGeometry auto const &  linearGeometry) const
inlineconstexprnoexcept

◆ intersects()

template<IPolygon P>
constexpr bool fishnet::geometry::MultiPolygon< P >::intersects ( LinearGeometry auto const &  linearFeature) const
inlineconstexprnoexcept

◆ isInside()

template<IPolygon P>
constexpr bool fishnet::geometry::MultiPolygon< P >::isInside ( IPoint auto const &  point) const
inlineconstexprnoexcept

◆ isOnBoundary()

template<IPolygon P>
constexpr bool fishnet::geometry::MultiPolygon< P >::isOnBoundary ( IPoint auto const &  point) const
inlineconstexprnoexcept

◆ isOutside()

template<IPolygon P>
constexpr bool fishnet::geometry::MultiPolygon< P >::isOutside ( IPoint auto const &  point) const
inlineconstexprnoexcept

◆ operator==()

template<IPolygon P>
template<IPolygon Q>
constexpr bool fishnet::geometry::MultiPolygon< P >::operator== ( const MultiPolygon< Q > &  other) const
inlineconstexprnoexcept

◆ removePolygon()

template<IPolygon P>
constexpr bool fishnet::geometry::MultiPolygon< P >::removePolygon ( const P &  polygon)
inlineconstexprnoexcept

◆ toString()

template<IPolygon P>
constexpr std::string fishnet::geometry::MultiPolygon< P >::toString ( ) const
inlineconstexprnoexcept

◆ touches()

template<IPolygon P>
constexpr bool fishnet::geometry::MultiPolygon< P >::touches ( IPolygon auto const &  query) const
inlineconstexprnoexcept

Member Data Documentation

◆ type

template<IPolygon P>
constexpr GeometryType fishnet::geometry::MultiPolygon< P >::type = GeometryType::MULTIPOLYGON
staticconstexpr

The documentation for this class was generated from the following file: