Class: QgsReferencedGeometryBase

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.

Class Hierarchy

Inheritance diagram of qgis.core.QgsReferencedGeometryBase

Subclasses

QgsReferencedGeometry

A QgsGeometry with associated coordinate reference system.

QgsReferencedPointXY

A QgsPointXY with associated coordinate reference system.

QgsReferencedRectangle

A QgsRectangle with associated coordinate reference system.

Methods

crs

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

setCrs

Sets the associated crs.

class qgis.core.QgsReferencedGeometryBase[source]

Bases: object

__init__(crs: QgsCoordinateReferenceSystem = QgsCoordinateReferenceSystem())

Constructor for QgsReferencedGeometryBase, with the specified crs.

Parameters:

crs (QgsCoordinateReferenceSystem = QgsCoordinateReferenceSystem())

__init__(a0: QgsReferencedGeometryBase)
Parameters:

a0 (QgsReferencedGeometryBase)

crs(self) QgsCoordinateReferenceSystem[source]

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)[source]

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

See also

crs()

Parameters:

crs (QgsCoordinateReferenceSystem)