Class: QgsGeometryOptions

Contains options to automatically adjust geometries to constraints on a layer.

Added in version 3.4.

Class Hierarchy

Inheritance diagram of qgis.core.QgsGeometryOptions

Base classes

QObject

class qgis.core.QgsGeometryOptions[source]

Bases: QObject

__init__()

Create a new QgsGeometryOptions object.

apply(self, geometry: QgsGeometry)[source]

Apply any fixes configured on this class to geometry.

Added in version 3.4.

Parameters:

geometry (QgsGeometry)

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

Access the configuration for the check checkId.

Added in version 3.4.

Parameters:

checkId (Optional[str])

Return type:

Dict[str, Any]

signal checkConfigurationChanged[source]

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.

geometryChecks(self) List[str][source]

A list of activated geometry checks.

Added in version 3.4.

Return type:

List[str]

signal geometryChecksChanged[source]

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.

geometryPrecision(self) float[source]

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.

Added in version 3.4.

Return type:

float

signal geometryPrecisionChanged[source]

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.

isActive(self) bool[source]

Determines if at least one fix is enabled.

Added in version 3.4.

Return type:

bool

readXml(self, node: QDomNode)[source]

Read the geometry options from node.

Added in version 3.4.

Parameters:

node (QDomNode)

removeDuplicateNodes(self) bool[source]

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

Added in version 3.4.

Return type:

bool

signal removeDuplicateNodesChanged[source]

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.

setCheckConfiguration(self, checkId: str | None, checkConfiguration: Dict[str, Any])[source]

Set the configuration for the check checkId.

Added in version 3.4.

Parameters:
  • checkId (Optional[str])

  • checkConfiguration (Dict[str, Any])

setGeometryChecks(self, geometryChecks: Iterable[str | None])[source]

A list of activated geometry checks.

Added in version 3.4.

Parameters:

geometryChecks (Iterable[Optional[str]])

setGeometryPrecision(self, value: float)[source]

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.

Added in version 3.4.

Parameters:

value (float)

setRemoveDuplicateNodes(self, value: bool)[source]

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

Added in version 3.4.

Parameters:

value (bool)

writeXml(self, node: QDomNode)[source]

Write the geometry options to the node.

Added in version 3.4.

Parameters:

node (QDomNode)