Class: QgsGeometryOptions

class qgis.core.QgsGeometryOptions

Bases: PyQt5.QtCore.QObject

The QgsGeometryOptions class contains options to automatically adjust geometries to constraints on a layer.

New in version 3.4.

QgsGeometryOptions() Create a new QgsGeometryOptions object.

Methods

apply

Apply any fixes configured on this class to geometry.

checkConfiguration

Access the configuration for the check checkId.

childEvent

connectNotify

customEvent

disconnectNotify

geometryChecks

A list of activated geometry checks.

geometryPrecision

The precision in which geometries on this layer should be saved.

isActive

Determines if at least one fix is enabled.

isSignalConnected

readXml

Read the geometry options from node.

receivers

removeDuplicateNodes

Automatically remove duplicate nodes on all geometries which are edited on this layer.

sender

senderSignalIndex

setCheckConfiguration

Set the configuration for the check checkId.

setGeometryChecks

A list of activated geometry checks.

setGeometryPrecision

The precision in which geometries on this layer should be saved.

setRemoveDuplicateNodes

Automatically remove duplicate nodes on all geometries which are edited on this layer.

timerEvent

writeXml

Write the geometry options to the node.

Signals

checkConfigurationChanged

pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

geometryChecksChanged

pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

geometryPrecisionChanged

pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

removeDuplicateNodesChanged

pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

apply(self, geometry: QgsGeometry)

Apply any fixes configured on this class to geometry.

New in version 3.4.

Parameters

geometry (QgsGeometry) –

checkConfiguration(self, checkId: str) Dict[str, Any]

Access the configuration for the check checkId.

New in version 3.4.

Parameters

checkId (str) –

Return type

Dict[str, Any]

checkConfigurationChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type

PYQT_SIGNAL

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
disconnectNotify(self, QMetaMethod)
geometryChecks(self) List[str]

A list of activated geometry checks.

New in version 3.4.

Return type

List[str]

geometryChecksChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type

PYQT_SIGNAL

geometryPrecision(self) float

The precision in which geometries on this layer should be saved. Geometries which are edited on this layer will be rounded to multiples of this value (snap to grid). Set to 0.0 to disable.

New in version 3.4.

Return type

float

geometryPrecisionChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type

PYQT_SIGNAL

isActive(self) bool

Determines if at least one fix is enabled.

New in version 3.4.

Return type

bool

isSignalConnected(self, QMetaMethod) bool
readXml(self, node: QDomNode)

Read the geometry options from node.

New in version 3.4.

Parameters

node (QDomNode) –

receivers(self, PYQT_SIGNAL) int
removeDuplicateNodes(self) bool

Automatically remove duplicate nodes on all geometries which are edited on this layer.

New in version 3.4.

Return type

bool

removeDuplicateNodesChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type

PYQT_SIGNAL

sender(self) QObject
senderSignalIndex(self) int
setCheckConfiguration(self, checkId: str, checkConfiguration: Dict[str, Any])

Set the configuration for the check checkId.

New in version 3.4.

Parameters
  • checkId (str) –

  • checkConfiguration (Dict[str) –

setGeometryChecks(self, geometryChecks: Iterable[str])

A list of activated geometry checks.

New in version 3.4.

Parameters

geometryChecks (Iterable[str]) –

setGeometryPrecision(self, value: float)

The precision in which geometries on this layer should be saved. Geometries which are edited on this layer will be rounded to multiples of this value (snap to grid). Set to 0.0 to disable.

New in version 3.4.

Parameters

value (float) –

setRemoveDuplicateNodes(self, value: bool)

Automatically remove duplicate nodes on all geometries which are edited on this layer.

New in version 3.4.

Parameters

value (bool) –

timerEvent(self, QTimerEvent)
writeXml(self, node: QDomNode)

Write the geometry options to the node.

New in version 3.4.

Parameters

node (QDomNode) –