Struct Point

Inheritance Relationships

Base Type

Struct Documentation

struct Point : public f2c::types::Geometry<OGRPoint, wkbPoint>

Public Functions

Point()
Point(double x, double y, double z = 0)
Point(const Point&)
Point(Point&&)
~Point()
Point &operator=(const Point&)
Point &operator=(Point&&)
bool operator==(const Point &b) const
bool operator!=(const Point &b) const
bool operator<(const Point &b) const
Point operator+(const Point &b) const
Point operator-(const Point &b) const
Point &operator*=(double b)
Point operator*(double b) const
double operator*(const Point &b) const
Point operator/(double b) const
Point clone() const
double X() const
double Y() const
double Z() const
double getX() const
double getY() const
double getZ() const
void setX(double x)
void setY(double y)
void setZ(double z)
void setPoint(double x, double y, double z = 0)
void setPoint(const OGRPoint &p)
void setPoint(const Point &p)
double getAngleFromPoints(const Point &end) const
double getAngleFromPoint() const
Point getPointFromAngle(double angle, double dist) const
Point rotateFromPoint(double angle, const Point &p_r) const
double signedDistance2Segment(const Point &start, const Point &end) const
Point closestPointInSegment(const Point &seg_s, const Point &seg_e) const
template<class T>
std::vector<T> rotateFromPoint(double angle, const std::vector<T> &t) const
template<class T>
T rotateFromPoint(double angle, const T &t) const
std::shared_ptr<OGRPoint> operator->()
std::shared_ptr<const OGRPoint> operator->() const
OGRPoint *get()
const OGRPoint *get() const
bool operator!=(const Geometry<OGRPoint, R> &geom2) const
bool operator==(const Geometry<OGRPoint, 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.

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

Compute shortest distance between this and another geometry.

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

Check if this and another geometry are disjoint.

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

Check if this and another geometry cross.

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

Check if this and another geometry touch each other.

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

Check if this geometry is inside another geometry.

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 det(const Point &u, const Point &v)
static double getAngleFromPoints(const Point &p1, const Point &p2, const Point &p3)

Angle between vectors p1->p2 and p2->p3.

static Point intersectionOfLines(const Point &l1_s, const Point &l1_e, const Point &l2_s, const Point &l2_e)
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.