Dissolving polygons by attribute
Merge polygons that share an attribute value into one feature with Dissolve, removing internal boundaries, and add a count of the merged features.
You will learn
- Dissolve polygons by one or more fields.
- Read the count of merged features.
- Choose between Dissolve and Aggregate.
Prerequisites
Data for this tutorial
Land use 2019 and 2024 (synthetic) Download landuse_2024.geojson
- Format
- GeoJSON (also landuse_2019.geojson)
- Geometry
- Polygon
- CRS
- EPSG:32643 (WGS 84 / UTM zone 43N)
- Content
- 61 polygons (2024), 50 polygons (2019)
- In Orbis
- Browser panel ▸ Tutorial sample data (synthetic) ▸ Land use 2024, or Load complete tutorial pack.
Fields used in the tutorials
| Field | Type | Description |
|---|---|---|
lu_id | text | Polygon identifier. |
class | text | built-up, cropland, forest, water or scrub. |
code | integer | Class code 1 to 5. |
year | integer | 2019 or 2024. |
area_ha | real | Ellipsoidal area in hectares. |
Licence: CC0 1.0. All tutorial data is synthetic and generated by Orbis. About the datasets
The task
The 2024 land-use layer has 61 polygons, several per class. You want one feature per class, without boundaries between neighbouring polygons of the same class.
Steps
- Add Land use 2024 from the tutorial data.
In the Toolbox, open Dissolve. Choose Land use 2024 (synthetic) as Input layer and tick class under Group by fields (optional). Click Run.

Five features after dissolving by class.
- The new layer Dissolved (Land use 2024 (synthetic)) has five features with the fields
classandcount(the number of polygons merged).
Expected result
| class | count |
|---|---|
| built-up | 21 |
| cropland | 6 |
| forest | 14 |
| water | 2 |
| scrub | 18 |
Polygons of the same class become one (multi)polygon; the exact union removes shared boundaries.
Common mistakes
- Stale area fields. Fields such as
area_haare not carried over; calculate the area of the dissolved features again. - Dissolving without a field. With no grouping field the whole layer becomes a single feature.
Troubleshooting
- Dissolve is slow or fails on some polygons. Invalid geometries (self-intersections) disturb the union. Run Fix geometries first (see Validating and repairing geometries).