Short answer
Clean digitizing in QGIS is mostly about setup, not drawing skill. Configure snapping so vertices lock to existing geometry, turn on topological editing and avoid-overlap so adjacent polygons share boundaries instead of almost-touching them, use tracing to follow existing lines, and validate the result with the Topology Checker and Fix geometries. Small linework errors — a vertex 0.3 m off, a self-intersecting ring, a sliver between two parcels — propagate silently into topology and analysis errors downstream, so the discipline is to prevent them at capture time rather than clean them later.
Project and layer setup before you draw
- Set a projected CRS in metres (e.g. EPSG:2154, a UTM zone) for the project and the edit layer, so snapping tolerances and segment lengths are metric and meaningful.
- Use a GeoPackage edit layer with a proper schema and field constraints (not null, unique where appropriate) so attributes are captured consistently as you go.
- Decide geometry type and dimensionality up front (single vs multipart; with or without Z). Mixing breaks later analysis.
- Add a reference backdrop (orthophoto, scanned map, LiDAR hillshade) at the right scale, and digitize at a consistent map scale so vertex density is even.
Snapping: the foundation
Open the Snapping Toolbar (View > Toolbars) and enable snapping (the magnet). Key settings:
- Mode: All Layers when new features must align to several layers, or Advanced to set per-layer tolerance and type. Active Layer keeps you snapping only within the layer you're editing.
- Type: Vertex, Segment, or both. Segment snapping lets you place a vertex anywhere along an existing edge; vertex snapping locks to existing nodes.
- Tolerance: set in pixels (10–12 is a robust default) rather than map units, so it stays usable at any zoom. Pixel tolerance means the snap radius is constant on screen.
- Snapping on intersection: enable it so vertices catch where two lines cross even if no node exists there.
- Self-snapping and snapping to common vertices help when closing complex polygons.
With snapping correct, new geometry coincides exactly with existing geometry — the prerequisite for clean topology.
Topological editing and avoid-overlap
Two toggles on the Snapping toolbar prevent the most common polygon defects:
- Topological Editing. Shared boundaries are treated as shared: editing a vertex on a boundary updates it on every feature using that vertex. This stops gaps and overlaps appearing when you nudge a common edge.
- Avoid Overlap (Overlap settings). When digitizing a new polygon over existing ones, QGIS clips the new feature to the boundary of neighbours so it cannot overlap them. Set it to follow the layer(s) whose edges you must respect. This is how you build a gap-free, overlap-free coverage (geological units, parcels, land cover) where neighbours share exact boundaries.
Together these mean the shared edge between two units exists once, with identical vertices on both sides — not two slightly different lines that leave a sliver.
Tracing for shared boundaries
Enable Trace (the toolbar icon, or press T while digitizing). With tracing on, hovering over an existing line lets QGIS follow it automatically between two clicked points, capturing every vertex of the shared boundary exactly. This is the right way to digitize a new polygon against an existing one: snap to the shared start node, trace along the common edge, then digitize the open side. It guarantees the shared boundary is identical, which is the only reliable defence against slivers.
Digitizing efficiently and accurately
- Use the Add Feature tool; left-click to add vertices, right-click to finish. For curves, add enough vertices to capture the shape without over-densifying.
- The Advanced Digitizing Panel (
Ctrl+4) lets you enter exact distances, angles, and coordinates — essential for surveyed offsets, perpendicular lines, and fixed-length segments. - Vertex Tool (
Vworkflow) edits, adds, and deletes vertices after capture, with the vertex editor table for precise coordinate entry. - For features that must be parallel/perpendicular, use the construction constraints in the Advanced Digitizing panel rather than eyeballing.
- Capture attributes as you draw (or set form defaults) so no feature is left with null required fields.
Worked example: a gap-free geological unit layer
- New GeoPackage polygon layer in EPSG:2154 with field
unit(not null). - Snapping on: All Layers, Vertex + Segment, 12 px, snap on intersection.
- Topological Editing on; Avoid Overlap set to the same unit layer.
- Digitize the first unit. For the neighbour, snap to a shared node, press
Tto trace the common boundary, then close the open side — Avoid Overlap clips it flush. - Fill in
unitper feature. - After capture, validate (below) before any dissolve, area, or intersection step.
The result is a topologically clean coverage where every internal boundary is shared exactly once.
Validation: catch errors before they propagate
- Topology Checker plugin (enable it, then Vector > Topology Checker): define rules such as must not have gaps, must not overlap, must not have dangles (for line networks), must not have duplicates. Run it and zoom to each flagged error.
- Check Geometries (Processing/Vector menu): finds self-intersections, duplicate nodes, rings too few points, and invalid OGC geometries. Fix geometries (
native:fixgeometries) repairs many automatically. - Visual edge review: zoom to polygon junctions and layer edges, where slivers and snapping failures concentrate — not the clean interior.
Common pitfalls and why they happen
- Slivers and gaps between polygons. Boundaries digitized twice, slightly differently, with topological editing off. Use Trace + Avoid Overlap so edges are shared.
- Vertices not snapping. Snapping disabled, tolerance too small, or snapping set to the wrong layer/type. Raise tolerance to ~12 px and check the mode.
- Self-intersecting polygons ("bowties"). Crossing the boundary while digitizing. Fix geometries, or re-digitize the offending part.
- Tolerance in map units, not pixels. Snap radius becomes useless when you zoom; always set pixels.
- Inconsistent vertex density. Digitizing at varying scales. Keep a consistent capture scale.
- Required attributes left null. No field constraints or form defaults. Add not-null constraints so the form blocks empty saves.
- Multipart/singlepart mix. Causes surprises in per-feature stats; standardise and convert with Multipart to singleparts if needed.
QA and validation
Treat validation as a gate, not an afterthought. A digitized coverage passes when the Topology Checker reports zero gaps and overlaps under your rules, Check Geometries reports no invalid features, every feature has its required attributes, and a visual sweep of all internal junctions and the layer boundary shows shared edges with no slivers. Only then is the layer safe for dissolve, overlay, or area-based reporting.
Bathyl perspective
Topologically clean data is captured, not repaired. We set snapping, topological editing, avoid-overlap, and tracing before the first vertex, and we gate every digitized layer through the Topology Checker and geometry validation — because a sliver born at capture time becomes a wrong area, a failed dissolve, or a dropped intersection later.
Related reading
- QGIS Topology Checks for Polygon Maps
- QGIS Virtual Layers for Spatial Queries
- QGIS Clip vs Intersect vs Difference
- GIS and spatial analysis