QGIS API Documentation  3.20.0-Odense (decaadbb31)
Public Member Functions | List of all members
QgsReferencedPointXY Class Reference

A QgsPointXY with associated coordinate reference system. More...

#include <qgsreferencedgeometry.h>

Inheritance diagram for QgsReferencedPointXY:
Inheritance graph
[legend]

Public Member Functions

 QgsReferencedPointXY ()=default
 Constructor for QgsReferencedPointXY. More...
 
 QgsReferencedPointXY (const QgsPointXY &point, const QgsCoordinateReferenceSystem &crs)
 Constructor for QgsReferencedPointXY, with the specified initial point and crs. More...
 
 operator QVariant () const
 Allows direct construction of QVariants from point. More...
 
bool operator!= (const QgsReferencedPointXY &other)
 
bool operator== (const QgsReferencedPointXY &other)
 
- Public Member Functions inherited from QgsPointXY
 QgsPointXY ()=default
 Default constructor. More...
 
 QgsPointXY (const QgsPoint &point) SIP_HOLDGIL
 Create a new point. More...
 
 QgsPointXY (const QgsPointXY &p) SIP_HOLDGIL
 Create a point from another point. More...
 
 QgsPointXY (double x, double y) SIP_HOLDGIL
 Create a point from x,y coordinates. More...
 
 QgsPointXY (QPoint point) SIP_HOLDGIL
 Create a point from a QPoint. More...
 
 QgsPointXY (QPointF point) SIP_HOLDGIL
 Create a point from a QPointF. More...
 
 ~QgsPointXY ()=default
 
QString asWkt () const
 Returns the well known text representation for the point (e.g. More...
 
double azimuth (const QgsPointXY &other) const SIP_HOLDGIL
 Calculates azimuth between this point and other one (clockwise in degree, starting from north) More...
 
bool compare (const QgsPointXY &other, double epsilon=4 *std::numeric_limits< double >::epsilon()) const SIP_HOLDGIL
 Compares this point with another point with a fuzzy tolerance. More...
 
double distance (const QgsPointXY &other) const SIP_HOLDGIL
 Returns the distance between this point and another point. More...
 
double distance (double x, double y) const SIP_HOLDGIL
 Returns the distance between this point and a specified x, y coordinate. More...
 
bool isEmpty () const SIP_HOLDGIL
 Returns true if the geometry is empty. More...
 
void multiply (double scalar) SIP_HOLDGIL
 Multiply x and y by the given value. More...
 
 operator QVariant () const
 Allows direct construction of QVariants from points. More...
 
bool operator!= (const QgsPointXY &other) const SIP_HOLDGIL
 Inequality operator. More...
 
QgsPointXY operator* (double scalar) const
 Multiplies the coordinates in this point by a scalar quantity. More...
 
QgsPointXYoperator*= (double scalar)
 Multiplies the coordinates in this point by a scalar quantity in place. More...
 
QgsPointXY operator+ (QgsVector v) const
 Adds a vector to this point. More...
 
QgsPointXYoperator+= (QgsVector v)
 Adds a vector to this point in place. More...
 
QgsVector operator- (const QgsPointXY &p) const
 Calculates the vector obtained by subtracting a point from this point. More...
 
QgsPointXY operator- (QgsVector v) const
 Subtracts a vector from this point. More...
 
QgsPointXYoperator-= (QgsVector v)
 Subtracts a vector from this point in place. More...
 
QgsPointXY operator/ (double scalar) const
 Divides the coordinates in this point by a scalar quantity. More...
 
QgsPointXYoperator/= (double scalar)
 Divides the coordinates in this point by a scalar quantity in place. More...
 
QgsPointXYoperator= (const QgsPointXY &other) SIP_HOLDGIL
 Assignment. More...
 
bool operator== (const QgsPointXY &other) SIP_HOLDGIL
 equality operator More...
 
QgsPointXY project (double distance, double bearing) const SIP_HOLDGIL
 Returns a new point which corresponds to this point projected by a specified distance in a specified bearing. More...
 
void set (double x, double y) SIP_HOLDGIL
 Sets the x and y value of the point. More...
 
void setX (double x) SIP_HOLDGIL
 Sets the x value of the point. More...
 
void setY (double y) SIP_HOLDGIL
 Sets the y value of the point. More...
 
double sqrDist (const QgsPointXY &other) const SIP_HOLDGIL
 Returns the squared distance between this point another point. More...
 
double sqrDist (double x, double y) const SIP_HOLDGIL
 Returns the squared distance between this point a specified x, y coordinate. More...
 
double sqrDistToSegment (double x1, double y1, double x2, double y2, QgsPointXY &minDistPoint, double epsilon=DEFAULT_SEGMENT_EPSILON) const SIP_HOLDGIL
 Returns the minimum distance between this point and a segment. More...
 
QPointF toQPointF () const
 Converts a point to a QPointF. More...
 
QString toString (int precision=-1) const
 Returns a string representation of the point (x, y) with a preset precision. More...
 
double x () const SIP_HOLDGIL
 Gets the x value of the point. More...
 
double y () const SIP_HOLDGIL
 Gets the y value of the point. More...
 
- Public Member Functions inherited from QgsReferencedGeometryBase
 QgsReferencedGeometryBase (const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem())
 Constructor for QgsReferencedGeometryBase, with the specified crs. More...
 
QgsCoordinateReferenceSystem crs () const
 Returns the associated coordinate reference system, or an invalid CRS if no reference system is set. More...
 
void setCrs (const QgsCoordinateReferenceSystem &crs)
 Sets the associated crs. More...
 

Additional Inherited Members

- Properties inherited from QgsPointXY
Q_GADGET double x
 
double y
 

Detailed Description

A QgsPointXY with associated coordinate reference system.

Since
QGIS 3.0

Definition at line 114 of file qgsreferencedgeometry.h.

Constructor & Destructor Documentation

◆ QgsReferencedPointXY() [1/2]

QgsReferencedPointXY::QgsReferencedPointXY ( const QgsPointXY point,
const QgsCoordinateReferenceSystem crs 
)

Constructor for QgsReferencedPointXY, with the specified initial point and crs.

Definition at line 39 of file qgsreferencedgeometry.cpp.

◆ QgsReferencedPointXY() [2/2]

QgsReferencedPointXY::QgsReferencedPointXY ( )
default

Constructor for QgsReferencedPointXY.

Member Function Documentation

◆ operator QVariant()

QgsReferencedPointXY::operator QVariant ( ) const
inline

Allows direct construction of QVariants from point.

Definition at line 130 of file qgsreferencedgeometry.h.

◆ operator!=()

bool QgsReferencedPointXY::operator!= ( const QgsReferencedPointXY other)

Definition at line 49 of file qgsreferencedgeometry.cpp.

◆ operator==()

bool QgsReferencedPointXY::operator== ( const QgsReferencedPointXY other)

Definition at line 44 of file qgsreferencedgeometry.cpp.


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