SpatiumLib
Public Member Functions | Friends | List of all members
spatium::geom3d::GeoPoint3 Class Reference

Point in 3D geographical space as homogeneous coordinates. More...

#include <GeoPoint3.h>

Inheritance diagram for spatium::geom3d::GeoPoint3:
Inheritance graph
[legend]
Collaboration diagram for spatium::geom3d::GeoPoint3:
Collaboration graph
[legend]

Public Member Functions

 GeoPoint3 ()
 Constructor. More...
 
 GeoPoint3 (double longitude, double latitude, double elevation)
 Constructor. More...
 
 GeoPoint3 (double lonLatElev[])
 Constructor. More...
 
 GeoPoint3 (const GeoPoint3 &other)
 Copy constructor. More...
 
 GeoPoint3 (const Matrix &other)
 Copy constructor. More...
 
GeoPoint3operator= (const GeoPoint3 &other)=default
 Assignment operator. More...
 
 ~GeoPoint3 ()=default
 Destructor. More...
 
void longitude (double val)
 
double longitude () const
 
void latitude (double val)
 
double latitude () const
 
void elevation (double val)
 
double elevation () const
 
GeoPoint3 operator- (const Matrix &other) const
 Subtract matrix from geo point. More...
 
GeoPoint3 operator+ (const Matrix &other) const
 Add matrix to geo point. More...
 
- Public Member Functions inherited from spatium::geom3d::Point3
 Point3 ()
 Constructor. More...
 
 Point3 (double x, double y, double z)
 Constructor. More...
 
 Point3 (double xyz[])
 Constructor. More...
 
 Point3 (const Point3 &other)
 Copy constructor. More...
 
 Point3 (const Matrix &other)
 Copy constructor. More...
 
Point3operator= (const Point3 &other)=default
 Assignment operator. More...
 
 ~Point3 ()=default
 Destructor. More...
 
void x (double val)
 
double x () const
 
void y (double val)
 
double y () const
 
void z (double val)
 
double z () const
 
double * array ()
 Get coordinates as array. More...
 
Point3 operator- (const Matrix &other) const
 Subtract matrix from point. More...
 
Point3 operator+ (const Matrix &other) const
 Add matrix to point. More...
 
double distanceTo (const Point3 &point) const
 Calculate Euclidean distance to point. More...
 
- Public Member Functions inherited from spatium::Vector
 Vector (size_t rows)
 Constructor. More...
 
 Vector (std::initializer_list< double > array)
 Constructor. More...
 
 Vector (const std::vector< double > &vector)
 Constructor. More...
 
 Vector (const Vector &other)
 Copy constructor. More...
 
 Vector (const Matrix &other)
 Copy constructor. More...
 
Vectoroperator= (const Vector &other)=default
 Assignment operator. More...
 
 ~Vector ()=default
 Destructor. More...
 
double operator() (size_t row) const
 Access element by value. More...
 
double & operator() (size_t row)
 Access element by reference. More...
 
Vector operator+ (const Matrix &other) const
 Add matrix to vector. More...
 
Vector operator- (const Matrix &other) const
 Subtract matrix from vector. More...
 
Vector operator * (double scalar) const
 Multiply by scalar. More...
 
Vector operator/ (double scalar) const
 Divide by scalar. More...
 
void resize (size_t rows)
 Resize. More...
 
- Public Member Functions inherited from spatium::Matrix
 Matrix (size_t rows, size_t cols)
 Constructor. More...
 
 Matrix (std::initializer_list< std::initializer_list< double >> array)
 Constructor. More...
 
bool operator== (const Matrix &other) const
 Compare operator. Is equal. More...
 
bool operator!= (const Matrix &other) const
 Compare operator. Is unequal. More...
 
size_t rows () const
 Get the number of rows. More...
 
size_t cols () const
 Get the number of columns. More...
 
std::vector< double > data () const
 Get all matrix elements. More...
 
void clear ()
 Clear all matrix elements. More...
 
Matrix transposed () const
 Get transposed matrix. More...
 
double determinant () const
 Calculate determinant. More...
 
double minor (size_t row, size_t col) const
 Calulcate minor. More...
 
Matrix omit (size_t row, size_t col) const
 Omit a given row and column. More...
 
Matrix inverse () const
 Calculate inverse of matrix. More...
 
double operator() (size_t row, size_t col) const
 Access element by value. More...
 
double & operator() (size_t row, size_t col)
 Access element by reference. More...
 
Matrix operator+ (const Matrix &other) const
 Add by matrix. More...
 
Matrix operator- (const Matrix &other) const
 Subtract by matrix. More...
 
Matrix operator * (const Matrix &other) const
 Multiply by matrix. More...
 
Matrix operator * (double scalar) const
 Multiply by scalar. More...
 
Matrix operator/ (double scalar) const
 Divide by scalar. More...
 
void resize (size_t rows, size_t cols)
 Resize. More...
 

Friends

std::ostream & operator<< (std::ostream &os, const GeoPoint3 &geoPoint)
 Output to ostream. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from spatium::Matrix
static Matrix identity (size_t order)
 Construct identity matrix. More...
 
- Protected Member Functions inherited from spatium::Matrix
double determinant (const Matrix &matrix) const
 Calculate determinant. More...
 
- Protected Attributes inherited from spatium::Matrix
size_t m_rows
 
size_t m_cols
 
std::vector< double > m_data
 

Detailed Description

Point in 3D geographical space as homogeneous coordinates.

The implementation of GeoPoint3 is identical to Point3. Only the names of the fields are different: longitude, latitude and elevation.

Constructor & Destructor Documentation

◆ GeoPoint3() [1/5]

spatium::geom3d::GeoPoint3::GeoPoint3 ( )
inline

Constructor.

◆ GeoPoint3() [2/5]

spatium::geom3d::GeoPoint3::GeoPoint3 ( double  longitude,
double  latitude,
double  elevation 
)
inline

Constructor.

Parameters
[in]longitudeLongitude coordinate
[in]latitudeLatitude coordinate
[in]elevationElevation coordinate

◆ GeoPoint3() [3/5]

spatium::geom3d::GeoPoint3::GeoPoint3 ( double  lonLatElev[])
inline

Constructor.

Parameters
[in]lonLatElevArray with longitude, latitude and latitude coordinates

◆ GeoPoint3() [4/5]

spatium::geom3d::GeoPoint3::GeoPoint3 ( const GeoPoint3 other)
inline

Copy constructor.

Parameters
[in]otherOther GeoPoint3

◆ GeoPoint3() [5/5]

spatium::geom3d::GeoPoint3::GeoPoint3 ( const Matrix other)
inline

Copy constructor.

Parameters
[in]otherOther matrix
Exceptions
std::out_of_rangeMatrix dimensions out of range

◆ ~GeoPoint3()

spatium::geom3d::GeoPoint3::~GeoPoint3 ( )
default

Destructor.

Member Function Documentation

◆ elevation() [1/2]

void spatium::geom3d::GeoPoint3::elevation ( double  val)
inline

◆ elevation() [2/2]

double spatium::geom3d::GeoPoint3::elevation ( ) const
inline

◆ latitude() [1/2]

void spatium::geom3d::GeoPoint3::latitude ( double  val)
inline

◆ latitude() [2/2]

double spatium::geom3d::GeoPoint3::latitude ( ) const
inline

◆ longitude() [1/2]

void spatium::geom3d::GeoPoint3::longitude ( double  val)
inline

◆ longitude() [2/2]

double spatium::geom3d::GeoPoint3::longitude ( ) const
inline

◆ operator+()

GeoPoint3 spatium::geom3d::GeoPoint3::operator+ ( const Matrix other) const
inline

Add matrix to geo point.

Parameters
[in]otherMatrix to add
Exceptions
std::out_of_rangeMatrix dimensions out of range
Returns
Added point

◆ operator-()

GeoPoint3 spatium::geom3d::GeoPoint3::operator- ( const Matrix other) const
inline

Subtract matrix from geo point.

Parameters
[in]otherMatrix to subtract
Exceptions
std::out_of_rangeMatrix dimensions out of range
Returns
Subtracted point

◆ operator=()

GeoPoint3& spatium::geom3d::GeoPoint3::operator= ( const GeoPoint3 other)
default

Assignment operator.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const GeoPoint3 geoPoint 
)
friend

Output to ostream.


The documentation for this class was generated from the following file: