QGIS API Documentation 3.41.0-Master (af5edcb665c)
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#include "moc_qgsreferencedgeometry.cpp"
20
24
29
31{
32 return QgsRectangle::operator==( other ) && crs() == other.crs();
33}
34
36{
37 return !( *this == other );
38}
39
44
46{
47 return QgsPointXY::operator==( other ) && crs() == other.crs();
48}
49
51{
52 return !( *this == other );
53}
54
59
61{
62 return ( ( this->isNull() && other.isNull() ) || this->equals( other ) ) && crs() == other.crs();
63}
64
66{
67 return !( *this == other );
68}
69
74
This class represents a coordinate reference system (CRS).
A geometry is the spatial representation of a feature.
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.
A class to represent a 2D point.
Definition qgspointxy.h:60
bool operator==(const QgsPointXY &other) const
Definition qgspointxy.h:273
A rectangle specified with double values.
bool operator==(const QgsRectangle &r1) const
A base class for geometry primitives which are stored with an associated reference system.
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.
A QgsGeometry with associated coordinate reference system.
bool operator==(const QgsReferencedGeometry &other) const
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.
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()=default
const QgsCoordinateReferenceSystem & crs