QGIS API Documentation 3.41.0-Master (cea29feecf2)
|
A QgsPointXY with associated coordinate reference system. More...
#include <qgsreferencedgeometry.h>
Public Member Functions | |
QgsReferencedPointXY ()=default | |
QgsReferencedPointXY (const QgsPointXY &point, const QgsCoordinateReferenceSystem &crs) | |
Constructor for QgsReferencedPointXY, with the specified initial point and crs. | |
operator QVariant () const | |
Allows direct construction of QVariants from point. | |
bool | operator!= (const QgsReferencedPointXY &other) |
bool | operator== (const QgsReferencedPointXY &other) |
Public Member Functions inherited from QgsPointXY | |
QgsPointXY ()=default | |
QgsPointXY (const QgsPoint &point) | |
Create a new point. | |
QgsPointXY (const QgsPointXY &p) | |
QgsPointXY (double x, double y) | |
Create a point from x,y coordinates. | |
QgsPointXY (QPoint point) | |
Create a point from a QPoint. | |
QgsPointXY (QPointF point) | |
Create a point from a QPointF. | |
~QgsPointXY ()=default | |
QString | asWkt () const |
Returns the well known text representation for the point (e.g. | |
double | azimuth (const QgsPointXY &other) const |
Calculates azimuth between this point and other one (clockwise in degree, starting from north) | |
bool | compare (const QgsPointXY &other, double epsilon=4 *std::numeric_limits< double >::epsilon()) const |
Compares this point with another point with a fuzzy tolerance. | |
double | distance (const QgsPointXY &other) const |
Returns the distance between this point and another point. | |
double | distance (double x, double y) const |
Returns the distance between this point and a specified x, y coordinate. | |
bool | distanceCompare (const QgsPointXY &other, double epsilon=4 *std::numeric_limits< double >::epsilon()) const |
Compares this point with another point with a fuzzy tolerance using distance comparison. | |
bool | isEmpty () const |
Returns true if the geometry is empty. | |
void | multiply (double scalar) |
Multiply x and y by the given value. | |
operator QVariant () const | |
Allows direct construction of QVariants from points. | |
bool | operator!= (const QgsPointXY &other) const |
QgsPointXY | operator* (double scalar) const |
Multiplies the coordinates in this point by a scalar quantity. | |
QgsPointXY & | operator*= (double scalar) |
Multiplies the coordinates in this point by a scalar quantity in place. | |
QgsPointXY | operator+ (QgsVector v) const |
Adds a vector to this point. | |
QgsPointXY & | operator+= (QgsVector v) |
Adds a vector to this point in place. | |
QgsVector | operator- (const QgsPointXY &p) const |
Calculates the vector obtained by subtracting a point from this point. | |
QgsPointXY | operator- (QgsVector v) const |
Subtracts a vector from this point. | |
QgsPointXY & | operator-= (QgsVector v) |
Subtracts a vector from this point in place. | |
QgsPointXY | operator/ (double scalar) const |
Divides the coordinates in this point by a scalar quantity. | |
QgsPointXY & | operator/= (double scalar) |
Divides the coordinates in this point by a scalar quantity in place. | |
QgsPointXY & | operator= (const QgsPointXY &other) |
bool | operator== (const QgsPointXY &other) const |
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. | |
void | set (double x, double y) |
Sets the x and y value of the point. | |
void | setX (double x) |
Sets the x value of the point. | |
void | setY (double y) |
Sets the y value of the point. | |
double | sqrDist (const QgsPointXY &other) const |
Returns the squared distance between this point another point. | |
double | sqrDist (double x, double y) const |
Returns the squared distance between this point a specified x, y coordinate. | |
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. | |
QPointF | toQPointF () const |
Converts a point to a QPointF. | |
QString | toString (int precision=-1) const |
Returns a string representation of the point (x, y) with a preset precision. | |
double | x () const |
Gets the x value of the point. | |
double | y () const |
Gets the y value of the point. | |
Public Member Functions inherited from QgsReferencedGeometryBase | |
QgsReferencedGeometryBase (const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem()) | |
Constructor for QgsReferencedGeometryBase, with the specified crs. | |
QgsCoordinateReferenceSystem | crs () const |
Returns the associated coordinate reference system, or an invalid CRS if no reference system is set. | |
void | setCrs (const QgsCoordinateReferenceSystem &crs) |
Sets the associated crs. | |
Additional Inherited Members | |
Properties inherited from QgsPointXY | |
double | x |
double | y |
A QgsPointXY with associated coordinate reference system.
Definition at line 110 of file qgsreferencedgeometry.h.
QgsReferencedPointXY::QgsReferencedPointXY | ( | const QgsPointXY & | point, |
const QgsCoordinateReferenceSystem & | crs | ||
) |
Constructor for QgsReferencedPointXY, with the specified initial point and crs.
Definition at line 40 of file qgsreferencedgeometry.cpp.
|
default |
|
inline |
Allows direct construction of QVariants from point.
Definition at line 123 of file qgsreferencedgeometry.h.
bool QgsReferencedPointXY::operator!= | ( | const QgsReferencedPointXY & | other | ) |
Definition at line 50 of file qgsreferencedgeometry.cpp.
bool QgsReferencedPointXY::operator== | ( | const QgsReferencedPointXY & | other | ) |
Definition at line 45 of file qgsreferencedgeometry.cpp.