LSSTApplications
20.0.0
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
25 #if !defined(LSST_AFW_GEOM_POLYGON_POLYGON_H)
26 #define LSST_AFW_GEOM_POLYGON_POLYGON_H
std::shared_ptr< Polygon > transform(TransformPoint2ToPoint2 const &transform) const
Transform the polygon.
Polygon(Box const &box)
Construct a rectangular Polygon whose vertices are the corners of a box.
std::shared_ptr< typehandling::Storable > cloneStorable() const override
Create a new Polygon that is a copy of this one.
afw::table::PointKey< double > vertices
std::vector< std::shared_ptr< Polygon > > operator|(Box const &rhs) const
double calculatePerimeter() const
std::vector< Point >::const_iterator end() const
double calculateArea() const
std::shared_ptr< afw::image::Image< float > > createImage(lsst::geom::Extent2I const &extent) const
Interface supporting iteration over heterogenous containers.
std::shared_ptr< Polygon > subSample(size_t num) const
Sub-sample each edge.
bool overlaps(Polygon const &other) const
Returns whether the polygons overlap each other.
std::vector< std::shared_ptr< Polygon > > operator|(Polygon const &rhs) const
std::shared_ptr< Polygon > unionSingle(Polygon const &other) const
Returns the union of two polygons.
bool equals(typehandling::Storable const &other) const noexcept override
Compare this object to another Storable.
An exception that indicates the single-polygon assumption has been violated.
std::size_t hash_value() const noexcept override
Return a hash of this object.
Polygon & operator=(Polygon const &)
std::vector< std::shared_ptr< Polygon > > intersection(Polygon const &other) const
Returns the intersection of two polygons.
bool isPersistable() const noexcept override
Whether Polygon is persistable which is always true.
std::shared_ptr< afw::image::Image< float > > createImage(lsst::geom::Box2I const &bbox) const
Create image of polygon.
std::vector< std::shared_ptr< Polygon > > union_(Polygon const &other) const
Returns the union of two polygons.
ItemVariant const * other
Box getBBox() const
Return bounding box.
std::ostream & operator<<(std::ostream &os, Polygon const &poly)
Stream polygon.
Polygon & operator=(Polygon &&)
std::string toString() const override
Create a string representation of this object.
bool contains(Point const &point) const
Returns whether the polygon contains the point.
Point calculateCenter() const
std::vector< Point > getVertices() const
Get vector of vertices.
A base class for image defects.
std::shared_ptr< Polygon > simplify(double const distance) const
Return a simplified polygon.
std::vector< std::pair< Point, Point > > getEdges() const
Get vector of edges.
std::vector< Point >::const_iterator begin() const
Iterator for vertices.
A coordinate class intended to represent absolute positions.
std::vector< std::shared_ptr< Polygon > > operator^(Box const &rhs) const
void swap(Polygon &other) noexcept
Swap two polygons.
A CRTP facade class for subclasses of Persistable.
void write(OutputArchiveHandle &handle) const override
Write the object to one or more catalogs.
An integer coordinate rectangle.
std::shared_ptr< Polygon > intersectionSingle(Polygon const &other) const
Returns the intersection of two polygons.
std::string getPersistenceName() const override
Return the unique name used to persist this object and look up its factory.
size_t getNumEdges() const
Return number of edges.
std::shared_ptr< Polygon > convexHull() const
Produce a polygon from the convex hull.
size_t operator()(argument_type const &obj) const noexcept
A floating-point coordinate rectangle geometry.
lsst::geom::Point2D Point
std::vector< std::shared_ptr< Polygon > > symDifference(Polygon const &other) const
Return the symmetric difference of two polygons.
#define LSST_EXCEPTION_TYPE(t, b, c)
Macro used to define new types of exceptions without additional data.
std::vector< std::shared_ptr< Polygon > > operator^(Polygon const &rhs) const
bool operator!=(Polygon const &other) const
io::OutputArchiveHandle OutputArchiveHandle
std::vector< std::shared_ptr< Polygon > > operator&(Box const &rhs) const
bool operator==(Polygon const &other) const
Reports errors that are due to events beyond the control of the program.