Class: QgsCoverageCleanParameters

Encapsulates parameters for a coverage cleaning operation.

Added in version 4.4.

List of all members, including inherited members

Methods

maximumGapWidth

Returns the maximum gap width.

overlapMergeStrategy

Returns the overlap merge strategy to use during cleaning.

setMaximumGapWidth

Sets the maximum gap width.

setOverlapMergeStrategy

Sets the overlap merge strategy to use during cleaning.

setSnappingDistance

Sets the snapping distance.

snappingDistance

Returns the snapping distance.

class qgis.core.QgsCoverageCleanParameters[source]

Bases: object

maximumGapWidth(self) float[source]

Returns the maximum gap width.

Gaps which are smaller than this distance are merged with an adjacent polygon.

Polygon width is determined as twice the radius of the maximum inscribed circle of the gap polygon.

Gaps are merged with the adjacent polygon depending on overlapMergeStrategy().

Empty holes in input polygons are treated as gaps, and may be filled in.

Gaps which are not fully enclosed (“inlets”) are not removed.

The width of a gap is twice the radius of the Maximum Inscribed Circle in the gap polygon,

A width of zero prevents gaps from being merged.

Return type:

float

overlapMergeStrategy(self) Qgis.CoverageCleanOverlapMergeStrategy[source]

Returns the overlap merge strategy to use during cleaning.

Return type:

Qgis.CoverageCleanOverlapMergeStrategy

setMaximumGapWidth(self, width: float)[source]

Sets the maximum gap width.

Parameters:

width (float)

setOverlapMergeStrategy(self, strategy: Qgis.CoverageCleanOverlapMergeStrategy)[source]

Sets the overlap merge strategy to use during cleaning.

Parameters:

strategy (Qgis.CoverageCleanOverlapMergeStrategy)

setSnappingDistance(self, distance: float)[source]

Sets the snapping distance.

Parameters:

distance (float)

snappingDistance(self) float[source]

Returns the snapping distance.

Snapping to nearby vertices and line segment snapping is used to improve noding robustness and eliminate small errors in an efficient way.

By default the snapping distance is -1, which means that the clean operation uses a very small snapping distance based on the extent of the input data.

The snapping distance may be specified explicitly.

This can reduce the number of overlaps and gaps that need to be merged, and reduce the risk of spikes formed by merging gaps. However, a large snapping distance may introduce undesirable data alteration.

A distance of zero prevents snapping from being used.

Return type:

float