24.1.3. Check Geometry
24.1.3.1. Duplicated geometries
Checks for duplicated geometries in a vector layer, and reports them as errors.
Parameters
Basic parameters
Label |
Name |
Type |
Description |
---|---|---|---|
Input layer |
|
[vector: geometry] |
Layer with the geometries to check |
Unique feature identifier |
|
[tablefield: any] |
Field storing unique values for feature identification |
Duplicate geometries errors |
|
[vector: point] Default: |
Specification of the output layer containing the errors location. One of:
The file encoding can also be changed here. |
Duplicate geometries Optional |
|
[vector: same as input] Default: |
Specification of the output layer containing the geometries that were found to be duplicated. One of:
The file encoding can also be changed here. |
Advanced parameters
Label |
Name |
Type |
Description |
---|---|---|---|
Tolerance |
|
[numeric: integer] Default: 8 |
Numerical precision of geometric operations, given as an integer n, meaning that two vertices less than 10-n apart (in map units) are considered to be merged. |
Outputs
Label |
Name |
Type |
Description |
---|---|---|---|
Duplicate geometries errors |
|
[vector: point] |
Output point layer representing the error locations and information (the ID and name of the input layer, the geometry part, ring and vertex index of the erroneous feature, x and y coordinates of the error and affected feature IDs). |
Duplicate geometries |
|
[vector: same as input] |
Output layer containing the geometries that were found to be duplicated.
Additional fields are added (see |
Python code
Algorithm ID: native:checkgeometryduplicate
import processing
processing.run("algorithm_id", {parameter_dictionary})
The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Using processing algorithms from the console for details on how to run processing algorithms from the Python console.
24.1.3.2. Duplicated vertices
Checks for duplicated vertices in line or polygon geometries, and reports them as errors.
Parameters
Basic parameters
Label |
Name |
Type |
Description |
---|---|---|---|
Input layer |
|
[vector: line, polygon] |
Layer with the geometries to check |
Unique feature identifier |
|
[tablefield: any] |
Field storing unique values for feature identification |
Duplicated vertices errors |
|
[vector: point] Default: |
Specification of the output layer containing the errors location. One of:
The file encoding can also be changed here. |
Duplicated vertices features Optional |
|
[vector: same as input] Default: |
Specification of the output layer containing the features with duplicated vertices. One of:
|
Advanced parameters
Label |
Name |
Type |
Description |
---|---|---|---|
Tolerance |
|
[numeric: integer] Default: 8 |
Numerical precision of geometric operations, given as an integer n, meaning that two vertices less than 10-n apart (in map units) are considered to be merged. |
Outputs
Label |
Name |
Type |
Description |
---|---|---|---|
Duplicated vertices errors |
|
[vector: point] |
Output point layer representing the error locations and information (the ID and name of the input layer, the geometry part, ring and vertex index of the erroneous feature, x and y coordinates of the error). |
Duplicated vertices features |
|
[vector: line, polygon] |
Output layer containing the features with duplicated vertices.
Additional fields are added (see |
Python code
Algorithm ID: native:checkgeometryduplicatenodes
import processing
processing.run("algorithm_id", {parameter_dictionary})
The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Using processing algorithms from the console for details on how to run processing algorithms from the Python console.
24.1.3.3. Features inside polygon
Checks the input geometries contained in the polygons from the polygon layers list. A polygon layer can be checked against itself. Any contained features are reported as errors.

Fig. 24.2 Reporting errors on features inside a polygon.
See also
Parameters
Basic parameters
Label |
Name |
Type |
Description |
---|---|---|---|
Input layer |
|
[vector: geometry] |
Layer with the geometries to check. |
Unique feature identifier |
|
[tablefield: any] |
Field storing unique values for feature identification. |
Polygon layers |
|
[vector: polygon][list] |
List of polygon layers to check against. |
Errors from contained features |
|
[vector: point] Default: |
Point layer representing the contained features. One of:
The file encoding can also be changed here. |
Contained features Optional |
|
[vector: same as input] Default: |
Specification of the output layer containing features within the checked polygons. One of:
The file encoding can also be changed here. |
Advanced parameters
Label |
Name |
Type |
Description |
---|---|---|---|
Tolerance |
|
[numeric: integer] Default: 8 |
Numerical precision of geometric operations, given as an integer n, meaning that two vertices less than 10-n apart (in map units) are considered to be merged. |
Outputs
Label |
Name |
Type |
Description |
---|---|---|---|
Errors from contained features |
|
[vector: point] |
Output point layer representing the error locations and information (the ID and name of the input layer, the geometry part, ring and vertex index of the erroneous feature, x and y coordinates of the centroid of the contained feature, and the layer name and index of a polygon containing the feature). |
Contained features |
|
[vector: same as input] |
Output layer containing features within the checked polygons. |
Python code
Algorithm ID: native:checkgeometrycontained
import processing
processing.run("algorithm_id", {parameter_dictionary})
The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Using processing algorithms from the console for details on how to run processing algorithms from the Python console.
24.1.3.4. Holes
Detects holes in polygon geometries and reports them as errors.

Fig. 24.3 Reporting errors for holes on a polygon feature.
See also
Parameters
Basic parameters
Label |
Name |
Type |
Description |
---|---|---|---|
Input layer |
|
[vector: polygon] |
Layer with the geometries to check |
Unique feature identifier |
|
[tablefield: any] |
Field storing unique values for feature identification |
Holes errors |
|
[vector: point] Default: |
Specification of the output layer containing the errors location. One of:
The file encoding can also be changed here. |
Polygons with holes Optional |
|
[vector: polygon] Default: |
Polygon layer with the features containing holes. One of:
The file encoding can also be changed here. |
Advanced parameters
Label |
Name |
Type |
Description |
---|---|---|---|
Tolerance |
|
[numeric: integer] Default: 8 |
Numerical precision of geometric operations, given as an integer n, meaning that two vertices less than 10-n apart (in map units) are considered to be merged. |
Outputs
Label |
Name |
Type |
Description |
---|---|---|---|
Holes errors |
|
[vector: point] |
Output point layer representing the error locations and information (the ID and name of the input layer, the ID, geometry part, ring and vertex index of the erroneous feature, x and y coordinates of the error). |
Polygon with holes |
|
[vector: polygon] |
Output polygon layer with features containing holes. If no holes are found, the output layer will be empty. |
Python code
Algorithm ID: native:checkgeometryhole
import processing
processing.run("algorithm_id", {parameter_dictionary})
The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Using processing algorithms from the console for details on how to run processing algorithms from the Python console.
24.1.3.5. Self-intersections
Detects self-intersections in line or polygon geometries, and reports them as errors.

Fig. 24.4 Reporting errors on features with self-intersections.
See also
Parameters
Basic parameters
Label |
Name |
Type |
Description |
---|---|---|---|
Input layer |
|
[vector: line, polygon] |
Layer with the geometries to check |
Unique feature identifier |
|
[tablefield: any] |
Field storing unique values for feature identification |
Self-intersecting errors |
|
[vector: point] Default: |
Specification of the output layer containing the errors location. One of:
The file encoding can also be changed here. |
Self-intersecting features Optional |
|
[same as input] Default: |
Line or polygon layer containing self-intersected features. One of:
The file encoding can also be changed here. |
Advanced parameters
Label |
Name |
Type |
Description |
---|---|---|---|
Tolerance |
|
[numeric: integer] Default: 8 |
Numerical precision of geometric operations, given as an integer n, meaning that two vertices less than 10-n apart (in map units) are considered to be merged. |
Outputs
Label |
Name |
Type |
Description |
---|---|---|---|
Self-intersecting errors |
|
[vector: point] |
Output point layer representing the error locations and information (the ID and name of the input layer, the ID, geometry part, ring and vertex index of the erroneous feature, x and y coordinates of the error, the index of the intersecting segments). |
Self-intersecting features |
|
[vector: line, polygon] |
Output polygon or line layer with features containing the self-intersecting features.
If no self-intersecting features are found, the output layer will be empty.
Additional fields are added (see |
Python code
Algorithm ID: native:checkgeometryselfintersection
import processing
processing.run("algorithm_id", {parameter_dictionary})
The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Using processing algorithms from the console for details on how to run processing algorithms from the Python console.
24.1.3.6. Small angles
Compares the angles within line or polygon geometries to a specified threshold, and reports as error any angle below that value.

Fig. 24.5 Reporting errors on a line feature for angles lower than 15°.
See also
Parameters
Basic parameters
Label |
Name |
Type |
Description |
---|---|---|---|
Input layer |
|
[vector: line, polygon] |
Layer with the geometries to check. |
Unique feature identifier |
|
[tablefield: any] |
Field storing unique values for feature identification. |
Minimum angle |
|
[numeric: double] |
Allowed minimum angle between adjacent segments in a feature’s geometry. Any angle below this threshold is reported as error. |
Small angle errors |
|
[vector: point] Default: |
Specification of the output layer containing the errors location. One of:
The file encoding can also be changed here. |
Advanced parameters
Label |
Name |
Type |
Description |
---|---|---|---|
Tolerance |
|
[numeric: integer] Default: 8 |
Numerical precision of geometric operations, given as an integer n, meaning that two vertices less than 10-n apart (in map units) are considered to be merged. |
Outputs
Label |
Name |
Type |
Description |
---|---|---|---|
Small angle errors |
|
[vector: point] |
Output point layer representing the error locations and information (the ID and name of the input layer, the ID, geometry part, ring and vertex index of the erroneous feature, x and y coordinates of the error and the value of the erroneous angle). |
Python code
Algorithm ID: native:checkgeometryangle
import processing
processing.run("algorithm_id", {parameter_dictionary})
The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Using processing algorithms from the console for details on how to run processing algorithms from the Python console.