atlas::util::PolygonCoordinates class

Derived classes

class PolygonXY
Implement PolygonCoordinates::contains for a polygon defined in XY space.
class SphericalPolygon

Public types

using Vector = VectorOfAbstract<PolygonCoordinates>

Constructors, destructors, conversion operators

PolygonCoordinates(const Polygon&, const double x[], const double y[], size_t xstride, size_t ystride, bool removeAlignedPoints)
template<typename Extents, typename LayoutPolicy, typename AccessorPolicy>
PolygonCoordinates(const Polygon& poly, atlas::mdspan<const double, Extents, LayoutPolicy, AccessorPolicy> coordinates, bool removeAlignedPoints)
template<typename PointContainer>
PolygonCoordinates(const PointContainer& points)
template<typename PointContainer>
PolygonCoordinates(const PointContainer& points, bool removeAlignedPoints)
~PolygonCoordinates() virtual

Public functions

auto contains(const Point2& P) const -> bool pure virtual
Point-in-partition test.
auto coordinatesMax() const -> const Point2&
auto coordinatesMin() const -> const Point2&
auto centroid() const -> const Point2&
template<typename Index>
auto operator[](Index i) const -> const Point2&
auto size() const -> idx_t
void print(std::ostream&) const

Friends

auto operator<<(std::ostream& out, const PolygonCoordinates& pc) -> std::ostream&

Function documentation

bool atlas::util::PolygonCoordinates::contains(const Point2& P) const pure virtual

Point-in-partition test.

Returns if point is in polygon