QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
qgsreferencedgeometry.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgsreferencedgeometry.cpp
3 ------------------------
4 begin : June 2017
5 copyright : (C) 2017 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
19
20#include "moc_qgsreferencedgeometry.cpp"
21
25
30
32{
33 return QgsRectangle::operator==( other ) && crs() == other.crs();
34}
35
37{
38 return !( *this == other );
39}
40
45
47{
48 return QgsPointXY::operator==( other ) && crs() == other.crs();
49}
50
52{
53 return !( *this == other );
54}
55
60
62{
63 return ( ( this->isNull() && other.isNull() ) || this->equals( other ) ) && crs() == other.crs();
64}
65
67{
68 return !( *this == other );
69}
70
75
Represents a coordinate reference system (CRS).
static QgsGeometry fromRect(const QgsRectangle &rect)
Creates a new geometry from a QgsRectangle.
static QgsGeometry fromPointXY(const QgsPointXY &point)
Creates a new geometry from a QgsPointXY object.
QgsPointXY()=default
bool operator==(const QgsPointXY &other) const
Definition qgspointxy.h:273
QgsRectangle()=default
Constructor for a null rectangle.
bool operator==(const QgsRectangle &r1) const
QgsCoordinateReferenceSystem crs() const
Returns the associated coordinate reference system, or an invalid CRS if no reference system is set.
QgsReferencedGeometryBase(const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem())
Constructor for QgsReferencedGeometryBase, with the specified crs.
bool operator==(const QgsReferencedGeometry &other) const
QgsReferencedGeometry(const QgsGeometry &geometry, const QgsCoordinateReferenceSystem &crs)
Constructor for QgsReferencedGeometry, with the specified initial geometry and crs.
QgsReferencedGeometry()=default
bool operator!=(const QgsReferencedGeometry &other) const
static QgsReferencedGeometry fromReferencedPointXY(const QgsReferencedPointXY &point)
Construct a new QgsReferencedGeometry from referenced point.
static QgsReferencedGeometry fromReferencedRect(const QgsReferencedRectangle &rectangle)
Construct a new QgsReferencedGeometry from referenced rectangle.
A QgsPointXY with associated coordinate reference system.
QgsReferencedPointXY(const QgsPointXY &point, const QgsCoordinateReferenceSystem &crs)
Constructor for QgsReferencedPointXY, with the specified initial point and crs.
bool operator!=(const QgsReferencedPointXY &other)
QgsReferencedPointXY()=default
bool operator==(const QgsReferencedPointXY &other)
A QgsRectangle with associated coordinate reference system.
bool operator!=(const QgsReferencedRectangle &other) const
bool operator==(const QgsReferencedRectangle &other) const
QgsReferencedRectangle(const QgsRectangle &rectangle, const QgsCoordinateReferenceSystem &crs)
Constructor for QgsReferencedRectangle, with the specified initial rectangle and crs.
QgsReferencedRectangle()=default