# Clean/Simplify (Process operations)

Select **Create > Process > Construction.**

Generalises geometry using a variation of the Douglas-Peucker algorithm that is limited by the number of output points.

**Number of points*:** The number of output points, as a simple value, or as an expression, eg '10' or 'Int(_np&/10)'.

The following examples show the effect of increasing the **Number of points** value.

**Initial Polygon Item:**

**Number of points** = **50:**

**Number of points** = **100:**

**Number of points** = **500:**

Generalises geometry using the Douglas-Peucker algorithm.

**Tolerance*:** The Douglas-Peuker algorithm tolerance, as a simple vale, or as an expression, eg '12.34' or '0.1234*_length#'

All vertices in the simplified geometry will be within this distance of the original geometry.

The following examples show the effect of increasing the **Tolerance** value.

**Initial Polygon Item:**

**Tolerance** = **50:**

**Tolerance** = **100:**

**Tolerance** = **300:**

Generalises geometry using the Perpendicular Distance algorithm.

**Properties**

**Repeat***

The number of times to repeat the algorithm, as a simple value, or as an expression, eg '4' or 'Int(_np&/50)'

**Tolerance***

The Perpendicular Distance algorithm tolerance, as a simple value, or as an expression eg '12.34' or '0.1234*_length#'

The following examples show the effect of increasing the **Tolerance** value.

**The original map:**

**Tolerance = 50:**

**Tolerance = 500:**

**Tolerance = 1000:**

Generalises geometry using the Radial Distance algorithm.

**Tolerance***

The Radial Distance algorithm tolerance, as a simple value, or as an expression eg '12.34' or '0.1234*_length#'

The following examples show the effect of increasing the **Tolerance** value.

**The original map:**

**Tolerance = 50:**

**Tolerance = 500:**

**Tolerance = 1000:**

Generalises geometry using the Reumann-Witkam algorithm.

**Tolerance*:** The Reumann-Witkam algorithm tolerance as a simple value or as an expression eg '12.34' or '0.1234*_length#'

The following examples show the effect of increasing the **Tolerance** value.

**The original map:**

**Tolerance = 50:**

**Tolerance = 500:**

**Tolerance = 1000:**

Removes duplicate items based on an expression.

**Expression***

The test expression, eg 'FC&' or 'building_type$="industrial"'

In this example, the overlay **Units** contains **Industrial** and **Office** buildings:

Click **Next**.

The **Processing Operations** dialog will be displayed.

Select **General > Filter** in the left-hand pane and click the right arrow button to add **Filter** to the right-hand pane.

Click the **...** button to open the **Expression Builder** window.

Set the **Process** command **General > Filter** to show only the **Industrial** buildings and click **OK**.

This will be **building_type$="Industrial"**

Click **OK**.

The **Filter** now appears in the **Processing Operations** window:

Click **Next** to open the **Processing Output** dialog. Select the required output and click **Finish**.

This opens the **Processing Input** window again:

Check the **Units** overlay is still selected and click **Next**.

The process will run and the final display will be shown:

The new overlay will be displayed with all duplicates removed.

**Note: **The item remaining will be the last item drawn or edited.

Removes duplicate items based on their geometry.

Removes self-intersections, eg a bow-tie.

Removes segments shorter than a tolerance.

**Tolerance*:** The tolerance as a simple value or as an expression eg '0.1234' or '0.001234*_length#'

Removes vertices that cause a spike.

**Tolerance*:** The tolerance in degrees, as a simple value or as an expression, eg '0.1' or 'Acos(0.999998)*180/3.14'

Removes vertices between straight, or near straight segments.

**Tolerance*:** The tolerance in degrees as a simple value or as an expression eg '0.1' or 'Acos(0.999998)*180/3.14'.

Simplifies the geometry of an item so that it matches the OGC 'simple' form (eg by removing all self-intersections).