QGIS API Documentation  3.4.15-Madeira (e83d02e274)
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 (const QgsPointXY &point, const QgsCoordinateReferenceSystem &crs)
 Constructor for QgsReferencedPointXY, with the specified initial point and crs. More...
 
 QgsReferencedPointXY ()=default
 Constructor for QgsReferencedPointXY. More...
 
 operator QVariant () const
 Allows direct construction of QVariants from point. More...
 
- Public Member Functions inherited from QgsPointXY
 QgsPointXY ()=default
 Default constructor. 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 (QPointF point)
 Create a point from a QPointF. More...
 
 QgsPointXY (QPoint point)
 Create a point from a QPoint. More...
 
 QgsPointXY (const QgsPoint &point)
 Create a new point. 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 (double x, double y) const
 Returns the distance between this point and a specified x, y coordinate. More...
 
double distance (const QgsPointXY &other) const
 Returns the distance between this point and another point. 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 (double x, double y) const
 Returns the squared distance between this point a specified x, y coordinate. More...
 
double sqrDist (const QgsPointXY &other) const
 Returns the squared distance between this point another point. 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 103 of file qgsreferencedgeometry.h.

Constructor & Destructor Documentation

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

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

Definition at line 29 of file qgsreferencedgeometry.cpp.

QgsReferencedPointXY::QgsReferencedPointXY ( )
default

Constructor for QgsReferencedPointXY.

Member Function Documentation

QgsReferencedPointXY::operator QVariant ( ) const
inline

Allows direct construction of QVariants from point.

Definition at line 119 of file qgsreferencedgeometry.h.


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