QGIS API Documentation  3.14.0-Pi (9f7028fd23)
Public Member Functions | List of all members
QgsReferencedPointXY Class Reference

#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)
 Create a new point. More...
 
 QgsPointXY (const QgsPointXY &p)
 Create a point from another point. More...
 
 QgsPointXY (double x, double y)
 Create a point from x,y coordinates. More...
 
 QgsPointXY (QPoint point)
 Create a point from a QPoint. More...
 
 QgsPointXY (QPointF point)
 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
 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
 Compares this point with another point with a fuzzy tolerance. More...
 
double distance (const QgsPointXY &other) const
 Returns the distance between this point and another point. More...
 
double distance (double x, double y) const
 Returns the distance between this point and a specified x, y coordinate. More...
 
bool isEmpty () const
 Returns true if the geometry is empty. More...
 
void multiply (double scalar)
 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
 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)
 Assignment. More...
 
bool operator== (const QgsPointXY &other)
 equality operator More...
 
QgsPointXY project (double distance, double bearing) const
 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)
 Sets the x and y value of the point. More...
 
void setX (double x)
 Sets the x value of the point. More...
 
void setY (double y)
 Sets the y value of the point. More...
 
double sqrDist (const QgsPointXY &other) const
 Returns the squared distance between this point another point. More...
 
double sqrDist (double x, double y) const
 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
 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
 Gets the x value of the point. More...
 
double y () const
 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
double x
 
double y
 

Detailed Description

A QgsPointXY with associated coordinate reference system.

Since
QGIS 3.0

Definition at line 113 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 129 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: