QgsReferencedGeometryBase class

A base class for geometry primitives which are stored with an associated reference system.

QgsReferencedGeometryBase classes represent some form of geometry primitive (such as rectangles) which have an optional coordinate reference system associated with them.

Derived classes

class QgsReferencedPointXY
A QgsPointXY with associated coordinate reference system.
class QgsReferencedRectangle
A QgsRectangle with associated coordinate reference system.

Constructors, destructors, conversion operators

QgsReferencedGeometryBase(const QgsCoordinateReferenceSystem& crs = QgsCoordinateReferenceSystem())
Constructor for QgsReferencedGeometryBase, with the specified crs.

Public functions

auto crs() const -> QgsCoordinateReferenceSystem
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.

Function documentation

QgsCoordinateReferenceSystem QgsReferencedGeometryBase::crs() const

Returns the associated coordinate reference system, or an invalid CRS if no reference system is set.

void QgsReferencedGeometryBase::setCrs(const QgsCoordinateReferenceSystem& crs)

Sets the associated crs.

Set to an invalid CRS if no reference system is required.