Short answer

Dissolve merges adjacent or scattered polygons that share an attribute value into a single feature. For geological maps, you almost always dissolve by a map-unit code so that a formation split across dozens of digitised polygons becomes one queryable unit. The two things that go wrong are: dissolving over dirty geometry (so slivers and gaps survive untouched inside the result), and dissolving over inconsistent attribute values (so the same unit ends up as several features, or different units collapse together because a code is blank).

Run the operation deliberately: clean and standardise first, dissolve by an exact unit field, decide how every other attribute is aggregated, then validate that polygon count dropped to the number of distinct units and that area is conserved.

What Dissolve actually does

In QGIS, native:dissolve (menu path Vector > Geoprocessing Tools > Dissolve) performs an attribute-driven union. It groups input features by the value(s) in Dissolve field(s) and replaces each group with one geometry that is the union of its members. If you leave the dissolve field empty, every feature in the layer collapses into a single multipart geometry, which is rarely what you want for geology.

Two properties matter for geologists:

  • Dissolve does not clean geometry. It does not snap vertices, remove overlaps, or close gaps. If two polygons of the same unit touch along a shared edge with a 0.4 m gap, the dissolved result contains that gap as an interior ring or a pinch. Dissolve is a set union, not a topology repair tool.
  • Adjacency is not required. Polygons with the same code on opposite sides of the map merge into one multipart feature. That is correct for geology (the same formation can outcrop in several disconnected patches) but it means your output feature count equals the number of distinct attribute values, not the number of contiguous blobs.

By default QGIS keeps the dissolve field and carries the first encountered value for all other columns. That silently discards information unless you handle it explicitly.

Worked example: dissolving a digitised formation map

Suppose you digitised outcrops as units_raw.gpkg, projected in a metric CRS such as EPSG:32633 (UTM 33N) so that area and distance are meaningful. The attribute table has MapUnit (e.g. Jl, Kss, Qal), Confidence, ThicknessM, and SourceRef. You have ~1,800 polygons and roughly 22 real units.

Step 1 — standardise the dissolve key. Inconsistent codes are the single biggest cause of bad dissolves. Open the Field Calculator and normalise:

trim(upper("MapUnit"))

Update MapUnit in place, then check for nulls and stray values with Layer > Filter: "MapUnit" IS NULL OR "MapUnit" = ''. Every null becomes its own group (or merges all nulls together), so fix these before dissolving.

Step 2 — fix topology first. Run Processing > Toolbox > native:fixgeometries to repair self-intersections, then native:snapgeometries or the Topology Checker plugin to remove gaps and overlaps against a tolerance you choose deliberately (for a 1:50,000 map, a snapping tolerance of 1–5 m is typical). If you skip this, the slivers travel straight into the dissolved layer.

Step 3 — dissolve. Open native:dissolve:

  • Input layer: cleaned units
  • Dissolve field(s): MapUnit
  • Run.

Equivalent on the command line with GDAL:

ogr2ogr -f GPKG units_dissolved.gpkg units_clean.gpkg \
  -dialect sqlite \
  -sql "SELECT MapUnit, ST_Union(geom) AS geom, \
        SUM(ThicknessM) AS total_thick, COUNT(*) AS n_parts \
        FROM units_clean GROUP BY MapUnit"

Note the GDAL version lets you aggregate in the same statement, which the GUI dissolve does not.

Step 4 — aggregate the other attributes. If you need per-unit summaries (mean dip, total mapped area, concatenated sources), use native:aggregate instead of, or after, dissolve. Group by MapUnit and define expressions such as mean("DipDeg"), sum($area), or array_to_string(array_agg("SourceRef")). Aggregate dissolves geometry by group and computes proper statistics in one pass, which is usually what a geologist actually wants.

Common pitfalls and why they happen

  • Surviving slivers. Cause: dissolve does not snap. A 1 m gap between two Kss polygons becomes a thin interior hole. Fix: run native:fixgeometries + snapping before dissolve, and afterwards run native:deleteholes with a minimum area threshold (e.g. drop holes smaller than 50 m²) to clear sliver rings.
  • Units split into several output features. Cause: the dissolve key was not standardised, so Jl, jl, and Jl are treated as three groups. Fix: trim(upper()) the key first.
  • Attributes silently lost. Cause: default "first value" behaviour. Fix: use Aggregate, or accept that only the key is meaningful in the output and document it.
  • Wrong CRS for area-based decisions. Cause: dissolving in a geographic CRS (EPSG:4326) means subsequent $area is in square degrees. Fix: reproject to a projected CRS first with native:reprojectlayer.
  • Multipart confusion. Cause: each unit is one multipart feature, so a count of features no longer equals a count of outcrops. Fix: if you need contiguous-patch counts, run native:multiparttosingleparts on a copy, not on the dissolved master.

Validation: prove the dissolve is correct

Before the layer feeds a legend, area calculation, or report, confirm three things:

  1. Feature count equals the number of distinct unit codes. Check with the field statistics panel or SELECT COUNT(DISTINCT MapUnit) FROM units_clean; — the dissolved layer should match it exactly.
  2. Area is conserved. Total $area of the dissolved layer should equal the total of the cleaned input within rounding. A large drop means geometry was lost to invalid inputs; a large gain means overlaps were double-counted before cleaning.
  3. Boundaries are intact. Overlay the dissolved layer at 30% opacity on the original. Internal lines should disappear; external contacts and fault-bounded edges should be unchanged. Faults that were attribute boundaries must still separate units — if a fault juxtaposes two different formations, those must remain two features.

Bathyl perspective

A dissolved geological layer is only as trustworthy as the attribute discipline behind it. We treat the unit code as a controlled vocabulary, clean topology before any union, and aggregate rather than discard the thickness, dip, and provenance that downstream cross-sections and 3D models depend on. The dissolve itself is one click; the value is in the keys and the validation around it.

Related reading

Sources