Template Struct Geometries

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Struct Documentation

template<class SAMETYPE, class T, OGRwkbGeometryType R, class CHILDRENTYPE>
struct Geometries : public f2c::types::Geometry<T, R>

Public Functions

double area() const

Compute area of the geometry.

SAMETYPE clone() const
SAMETYPE simplify(double d_tol) const
Iterator begin()
Iterator end()
ConstIterator begin() const
ConstIterator end() const
ConstIterator begin(const SAMETYPE *poSelf)
ConstIterator end(const SAMETYPE *poSelf)
const CHILDRENTYPE operator[](int i) const
const CHILDRENTYPE at(int i) const
const CHILDRENTYPE back() const
SAMETYPE &append(const SAMETYPE &other)
std::shared_ptr<T> operator->()
std::shared_ptr<const T> operator->() const
T *get()
const T *get() const
bool operator!=(const Geometry<T, R> &geom2) const
bool operator==(const Geometry<T, R> &geom2) const
double getDimMinX() const

Get the minimum x value of the geometry.

double getDimMaxX() const

Get the maximum x value of the geometry.

double getDimMinY() const

Get the minimum y value of the geometry.

double getDimMaxY() const

Get the maximum y value of the geometry.

double getHeight() const

Get the height of the geometry.

double getWidth() const

Get the width of the geometry.

double getMinSafeLength() const

Get the manhattan distance of the diagonal of the rectangle that cover the geometry.

A circle from any point of the geometry and with this distance as radius can be created and it will, at least, crosses the geometry.

template<class T2, OGRwkbGeometryType R2>
double distance(const Geometry<T2, R2> &p) const

Compute shortest distance between this and another geometry.

template<class T2, OGRwkbGeometryType R2>
bool disjoint(const Geometry<T2, R2> &geom) const

Check if this and another geometry are disjoint.

template<class T2, OGRwkbGeometryType R2>
bool crosses(const Geometry<T2, R2> &geom) const

Check if this and another geometry cross.

template<class T2, OGRwkbGeometryType R2>
bool touches(const Geometry<T2, R2> &geom) const

Check if this and another geometry touch each other.

template<class T2, OGRwkbGeometryType R2>
bool within(const Geometry<T2, R2> &geom) const

Check if this geometry is inside another geometry.

template<class T2, OGRwkbGeometryType R2>
bool intersects(const Geometry<T2, R2> &geom) const

Check if this and another geometry intersects.

bool isEmpty() const
std::string exportToWkt() const
void importFromWkt(const std::string &text)
std::string exportToGML() const
std::string exportToKML() const
std::string exportToJson() const
OGRGeometry *OGRBuffer(double dfDist, int side = 0) const

Public Static Functions

static double mod_2pi(double val)

Transform from \( [-\inf, \inf) \) to \( [0, 2\pi) \) applying \(2\pi\) modulus.

Returns:

value modulus in the range of \( [0, 2\pi) \)

static double mod(double a, double b)
static double getAngContinuity(double prev_val, double val)
static std::vector<double> getAngContinuity(const std::vector<double> &val)
static double getAngleDiffAbs(double a, double b)

Compute the smallest difference between two angles.

Parameters:
  • a – first angle

  • b – second angle

Returns:

difference between both angles

static double getAngleAvg(double a, double b)

Get the angle that is between a and b in the shortest direction.

class ConstIterator

Public Functions

ConstIterator(ConstIterator &oOther)
ConstIterator(const Geometries<SAMETYPE, T, R, CHILDRENTYPE> *poSelf, int nPos)
~ConstIterator()
const CHILDRENTYPE &operator*() const
ConstIterator &operator++()
bool operator!=(const ConstIterator &it) const
bool operator==(const Iterator &it) const
class Iterator

Public Functions

Iterator(Geometries<SAMETYPE, T, R, CHILDRENTYPE> *poSelf, int nPos)
~Iterator()
CHILDRENTYPE &operator*()
Iterator &operator++()
bool operator!=(const Iterator &it) const