Go to the documentation of this file.
8 #ifndef FIELDS2COVER_TYPES_GEOMETRY_H_
9 #define FIELDS2COVER_TYPES_GEOMETRY_H_
11 #include <gdal/ogr_geometry.h>
12 #include <gdal/ogr_core.h>
19 #include <boost/math/constants/constants.hpp>
25 template <
class T, OGRwkbGeometryType R>
30 explicit Geometry(std::shared_ptr<T> g);
34 explicit Geometry(
const OGRGeometry* g);
75 template <
class T2, OGRwkbGeometryType R2>
79 template <
class T2, OGRwkbGeometryType R2>
83 template <
class T2, OGRwkbGeometryType R2>
87 template <
class T2, OGRwkbGeometryType R2>
91 template <
class T2, OGRwkbGeometryType R2>
95 template <
class T2, OGRwkbGeometryType R2>
101 static double mod_2pi(
double val);
102 static double mod(
double a,
double b);
105 static std::vector<double>
getAngContinuity(
const std::vector<double>& val);
126 OGRGeometry*
OGRBuffer(
double dfDist,
int side = 0)
const;
134 template <
typename To,
typename From>
137 template<
typename RetType>
144 GEOSContextHandle_t hGEOSCtxt, GEOSGeom hGeosProduct,
145 const OGRGeometry *poSelf,
const OGRGeometry *poOtherGeom)
const;
149 const OGRGeometry *poOtherGeom, OGRGeometry *poOGRProduct)
const;
157 #endif // FIELDS2COVER_TYPES_GEOMETRY_H_
bool within(const Geometry< T2, R2 > &geom) const
Check if this geometry is inside another geometry.
bool touches(const Geometry< T2, R2 > &geom) const
Check if this and another geometry touch each other.
Types used by fields2cover library.
bool intersects(const Geometry< T2, R2 > &geom) const
Check if this and another geometry intersects.
std::string exportToJson() const
static double getAngleAvg(double a, double b)
Get the angle that is between a and b in the shortest direction.
double getHeight() const
Get the height of the geometry.
std::string exportToKML() const
double getMinSafeLength() const
static RetType destroyResGeom(OGRGeometry *)
Geometry & operator=(Geometry &&g)
bool operator!=(const Geometry< T, R > &geom2) const
OGRGeometry * OGRBuffer(double dfDist, int side=0) const
bool crosses(const Geometry< T2, R2 > &geom) const
Check if this and another geometry cross.
OGRGeometry * buildGeometryFromGEOS(GEOSContextHandle_t hGEOSCtxt, GEOSGeom hGeosProduct, const OGRGeometry *poSelf, const OGRGeometry *poOtherGeom) const
bool operator==(const Geometry< T, R > &geom2) const
double getDimMaxX() const
Get the maximum x value of the geometry.
std::string exportToWkt() const
static double mod_2pi(double val)
static double getAngContinuity(double prev_val, double val)
OGRGeometry * OGRGeometryRebuildCurves(const OGRGeometry *poGeom, const OGRGeometry *poOtherGeom, OGRGeometry *poOGRProduct) const
std::shared_ptr< T > operator->()
static double getAngleDiffAbs(double a, double b)
To downCast(From *f) const
double distance(const Geometry< T2, R2 > &p) const
Compute shortest distance between this and another geometry.
double getDimMinX() const
Get the minimum x value of the geometry.
std::shared_ptr< T > data_
void importFromWkt(const std::string &text)
std::string exportToGML() const
double getDimMaxY() const
Get the maximum y value of the geometry.
double getWidth() const
Get the width of the geometry.
static double mod(double a, double b)
double getDimMinY() const
Get the minimum y value of the geometry.
bool disjoint(const Geometry< T2, R2 > &geom) const
Check if this and another geometry are disjoint.
fields2cover
Author(s):
autogenerated on Fri Apr 25 2025 02:18:31