QgsGeometryOptions class

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

Constructors, destructors, conversion operators

QgsGeometryOptions() defaulted
Create a new QgsGeometryOptions object.

Public functions

void apply(QgsGeometry& geometry) const
Apply any fixes configured on this class to geometry.
auto checkConfiguration(const QString& checkId) const -> QVariantMap
Access the configuration for the check checkId.
auto geometryChecks() const -> QStringList
A list of activated geometry checks.
auto geometryPrecision() const -> double
The precision in which geometries on this layer should be saved.
auto isActive() const -> bool
Determines if at least one fix is enabled.
void readXml(const QDomNode& node)
Read the geometry options from node.
auto removeDuplicateNodes() const -> bool
Automatically remove duplicate nodes on all geometries which are edited on this layer.
void setCheckConfiguration(const QString& checkId, const QVariantMap& checkConfiguration)
Set the configuration for the check checkId.
void setGeometryChecks(const QStringList& geometryChecks)
A list of activated geometry checks.
void setGeometryPrecision(double value)
The precision in which geometries on this layer should be saved.
void setRemoveDuplicateNodes(bool value)
Automatically remove duplicate nodes on all geometries which are edited on this layer.
void writeXml(QDomNode& node) const
Write the geometry options to the node.

Signals

void checkConfigurationChanged()
Access the configuration for the check checkId.
void geometryChecksChanged()
A list of activated geometry checks.
void geometryPrecisionChanged()
The precision in which geometries on this layer should be saved.
void removeDuplicateNodesChanged()
Automatically remove duplicate nodes on all geometries which are edited on this layer.

Function documentation

void QgsGeometryOptions::apply(QgsGeometry& geometry) const

Apply any fixes configured on this class to geometry.

QVariantMap QgsGeometryOptions::checkConfiguration(const QString& checkId) const

Access the configuration for the check checkId.

QStringList QgsGeometryOptions::geometryChecks() const

A list of activated geometry checks.

double QgsGeometryOptions::geometryPrecision() const

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.

bool QgsGeometryOptions::isActive() const

Determines if at least one fix is enabled.

void QgsGeometryOptions::readXml(const QDomNode& node)

Read the geometry options from node.

bool QgsGeometryOptions::removeDuplicateNodes() const

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

void QgsGeometryOptions::setCheckConfiguration(const QString& checkId, const QVariantMap& checkConfiguration)

Set the configuration for the check checkId.

void QgsGeometryOptions::setGeometryChecks(const QStringList& geometryChecks)

A list of activated geometry checks.

void QgsGeometryOptions::setGeometryPrecision(double value)

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.

void QgsGeometryOptions::setRemoveDuplicateNodes(bool value)

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

void QgsGeometryOptions::writeXml(QDomNode& node) const

Write the geometry options to the node.

void QgsGeometryOptions::checkConfigurationChanged() signal

Access the configuration for the check checkId.

void QgsGeometryOptions::geometryChecksChanged() signal

A list of activated geometry checks.

void QgsGeometryOptions::geometryPrecisionChanged() signal

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.

void QgsGeometryOptions::removeDuplicateNodesChanged() signal

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