Go to the documentation of this file.
8 #ifndef FIELDS2COVER_TYPES_CELL_H_
9 #define FIELDS2COVER_TYPES_CELL_H_
11 #include <gdal/ogr_geometry.h>
13 #include <boost/math/constants/constants.hpp>
23 template <
typename... Args >
24 inline std::string
sstr(Args &&... args) {
25 std::ostringstream
sstr;
27 (
sstr << ... << args);
36 explicit Cell(
const OGRGeometry* geom);
65 template <
class T, OGRwkbGeometryType R>
104 template <
class T, OGRwkbGeometryType R>
106 OGRGeometry* c_hull = geom->ConvexHull();
108 OGRGeometryFactory::destroyGeometry(c_hull);
115 #endif // FIELDS2COVER_TYPES_CELL_H_
static Cell buffer(const Cell &geom, double width)
bool isConvex() const
Check if the Cell is convex.
Types used by fields2cover library.
void addRing(const LinearRing &ring)
LineString createSemiLongLine(const Point &point, double angle) const
std::string sstr(Args &&... args)
bool isPointInBorder(const Point &p) const
Check if a point is in the border of this cell.
MultiLineString getLinesInside(const LineString &line) const
Compute the sections of a LineString that is inside this cell.
bool isPointIn(const Point &p) const
Check if a point is inside this cell.
const LinearRing getInteriorRing(size_t i_ring) const
LineString createStraightLongLine(const Point &point, double angle) const
void setGeometry(size_t i, const LinearRing &ring)
LineString createLineUntilBorder(const Point &p, double ang) const
Generate a line from a point to the border of this cell.
void getGeometry(size_t i, LinearRing &ring)
void addGeometry(const LinearRing &ring)
void operator*=(double b)
Scale this Cell by a scale factor.
const LinearRing getExteriorRing() const
Point closestPointOnBorderTo(const Point &p) const
Find the closest point from a point to the border of the field.
fields2cover
Author(s):
autogenerated on Fri Apr 25 2025 02:18:31