Class: QgsReferencedGeometryBase

class qgis.core.QgsReferencedGeometryBase

Bases: sip.wrapper

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.

New in version 3.0.

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

QgsReferencedGeometryBase(QgsReferencedGeometryBase)

Methods

crs

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

setCrs

Sets the associated crs.

crs(self)QgsCoordinateReferenceSystem

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

See also

setCrs()

Return type

QgsCoordinateReferenceSystem

setCrs(self, crs: QgsCoordinateReferenceSystem)

Sets the associated crs. Set to an invalid CRS if no reference system is required.

See also

crs()

Parameters

crs (QgsCoordinateReferenceSystem) –