Offline help generated from the Freehand Digitize user guide. The online version is at GitHub.

Freehand Digitize — User Guide

Version 2.2.0 (unreleased) | Last Updated: 2026-11-29

Feature and workflow guide for the Freehand Digitize QGIS plugin. For a quick start see README.md; for the design see ARCHITECTURE_EN.md.

Contents

  1. What the plugin does
  2. Requirements
  3. Installation
  4. Drawing and editing features
  5. Drawing a new feature
  6. Reshape
  7. Difference/cut
  8. Clip
  9. Split
  10. Live measurements
  11. Toolbar and sampling
  12. Actions
  13. Tolerance spin box
  14. Sampling
  15. Snapping with Ctrl
  16. Attribute form and defaults
  17. Undo, cancel and invalid geometries
  18. CRS behaviour
  19. Keyboard and mouse reference
  20. Troubleshooting
  21. Getting help
  22. Known limitations

1. What the plugin does

Freehand Digitize lets you draw lines and polygons by dragging the mouse over the map. On release, the stroke becomes a feature in the active vector layer.

It restores the feature set of the classic freehandEditing plugin:

The UI is available in English (source language), Spanish, Portuguese (Brazil), French, German, Italian and Indonesian. This guide uses the short English action names shown in the tooltips: Add, Reshape, Difference/cut, Clip, Split, Sampling and Help.


2. Requirements


3. Installation

From the ZIP

  1. Download dist/freehand_digitize.<version>.zip.
  2. In QGIS open Plugins → Manage and Install Plugins → Install from ZIP.
  3. Select the ZIP and enable Freehand Digitize in the installed plugins list.

From the repository (development)

uv run qgis-manage deploy --no-compile --qgis-version 4

Alternatively, copy the plugin folder to ~/.local/share/QGIS/QGIS4/profiles/default/python/plugins/freehand_digitize.

After installation, the action appears in the Digitize toolbar and in Vector → Freehand Digitize.


4. Drawing and editing features

4.1 Drawing a new feature

  1. Select the line or polygon layer where the feature must be created.
  2. Start editing. The actions are disabled until the layer is in edit mode, and they are disabled again when editing stops.
  3. Click Add in the Digitize toolbar or choose Vector → Freehand Digitize.
  4. Drag with the left mouse button to draw the stroke.
  5. Release to finish. The feature is added to the active layer.

A polygon is closed automatically: you only need three distinct points, and the first point is repeated to build the ring. A line needs at least two points.

While drawing

4.2 Reshape

The reshape action modifies existing geometries instead of creating new ones:

  1. Select the line or polygon layer that contains the geometry.
  2. Optional: select one or more features to restrict the operation. If nothing is selected, every feature under the stroke is considered.
  3. Click Reshape in the Digitize toolbar or choose Vector → Freehand Digitize.
  4. Draw a stroke across the geometry you want to change. For a line or a polygon boundary the stroke must cross it at least twice; a stroke that crosses once is ignored.
  5. Release to apply. The action is one undo command: Ctrl+Z restores every reshaped feature.

If a selection exists, only selected features that also intersect the stroke are reshaped. A warning is shown when the stroke crosses no feature or when no candidate could be reshaped. Esc cancels the stroke, and Ctrl snapping works on the first and last vertex exactly as in the creation tool.

4.3 Difference/cut

The difference action subtracts one existing feature from another:

  1. Start editing the line/polygon layer.
  2. Select exactly two features, or leave the selection as is and use the mouse pick flow.
  3. Click Difference/cut.
  4. If two features are selected, choose the target and cutter in the dialog. Otherwise click the target feature and then the cutter feature on the map; the dialog opens with those two.
  5. Press Apply. The target becomes target − cutter; the cutter is not modified. One Ctrl+Z restores the target.

The target keeps its attributes. If the result is empty (the cutter covers it) or invalid, the target is left unchanged and a warning is shown. This is a difference, not a split: the result remains one feature, possibly multipart. Cross-layer difference is not supported in this version.

Clip and split use the same target/cutter and selection rules; see Clip, split and live measurements.

4.4 Clip

Select two features, or click the target and then the cutter, and choose Clip. The target is replaced by its intersection with the cutter; the cutter is not modified. The result must keep the layer geometry type.

4.5 Split

Select exactly one line or polygon, activate Split, and draw a stroke across it. The original attributes are copied to the new parts and the operation is one undo command.

4.6 Live measurements

While drawing, a small overlay shows the current length (line) or area (polygon). It is hidden when the stroke finishes or is cancelled and does not change the stored geometry.


5. Toolbar and sampling

5.1 Actions

The plugin uses the QGIS Digitize toolbar. The action order is:

Add → Reshape → Difference/cut → Clip → Split → Sampling → Tolerance → Help
Icon Action Behaviour
Add Add Draw a new line or polygon.
Reshape Reshape Reshape existing features under a stroke.
Difference/cut Difference/cut Subtract the cutter from the target.
Clip Clip Keep the target ∩ cutter.
Split Split Split one selected feature with a stroke.
Sampling Sampling Configure pixel or layer-unit vertex spacing.
Tolerance Simplification tolerance in layer units (spin box).
Help Help Open the bundled offline user guide.

Tooltips start with the action name, for example Add — … or Difference/cut — …. Icons have light and dark variants and follow the active QGIS theme.

5.2 Tolerance spin box

The tolerance spin box sits next to the actions.

Control Behaviour
Tolerance (0.000–5.000) Simplification tolerance in layer units. 0 disables simplification.
Decimals / step 3 decimals, step 0.1.
Persistence The value is stored in QGIS settings (freehand_digitize/tolerance).
Legacy migration The old freehandEdit/tolerance value is imported on first use.
Geographic CRS The spin box is disabled and the effective tolerance is 0.

The simplification is applied before the feature is validated and inserted. If the simplified geometry is empty, the original stroke is kept.


5.3 Sampling

The Sampling action controls how many vertices are captured:

  1. Choose Pixels or Layer units.
  2. Set the minimum distance between vertices.
  3. Press OK; the setting applies to the next stroke in both creation and reshape.

Defaults are 1.5 px and 0.5 layer units. The layer-unit default becomes 0.0001° when the active layer uses a geographic CRS. Each unit keeps its own distance.

Geographic CRS warning: in a geographic layer, layer units are degrees. One degree of longitude is not a constant length (it shrinks with latitude), so layer-unit sampling is not a uniform ground distance. Use pixels for a uniform on-screen density or a projected CRS for metric sampling.

The edit-session rule applies to the map tools, not to this dialog: sampling can be configured even when no layer is being edited.


6. Snapping with Ctrl

Hold Ctrl when you press the mouse button to snap the first vertex, and keep it held when you release to snap the last vertex.

The plugin uses the QGIS snapping engine:

  1. it first tries the current layer (snapToCurrentLayer, vertex type);
  2. if there is no match, it tries the configured background layers (snapToMap);
  3. if there is still no match, the free pointer position is used.

Snapping respects the QGIS snapping configuration (mode, tolerance and enabled layers). If snapping is disabled or the tolerance is too small, no vertex is snapped and the stroke starts/ends at the pointer.

This is an improvement over the original plugin, which only snapped the first point.


7. Attribute form and defaults

When QGIS is configured to enter attribute values after digitizing, the attribute form opens before the feature is added.

Provider default values, expressions and constraints are applied through QgsVectorLayerUtils.createFeature, so required fields and defaults behave like the standard QGIS digitizing tools.

While the form is open, canvas clicks are ignored so a stray click cannot start a new stroke.


8. Undo, cancel and invalid geometries

Situation Result
Feature created One undo command; Ctrl+Z removes the feature.
Form cancelled No feature and no empty undo command.
Layer rejects the feature The command is destroyed and a warning is shown.
Invalid geometry A dialog asks whether to use it anyway.
Stroke cancelled with Esc The rubber band is cleared; the tool stays active.

The invalid-geometry dialog is intentional: the plugin does not silently call makeValid(). Choose No to abandon the feature and redraw the stroke.


9. CRS behaviour

The stroke is recorded with toLayerCoordinates, so the geometry is created in the layer CRS, not in the project CRS. This is safe when the layer and the project use different CRSs (on-the-fly reprojection).

The tolerance is expressed in layer units. For a geographic CRS (degrees), the spin box is disabled and 0 is used because a degree-based tolerance would be meaningless.


10. Keyboard and mouse reference

Input Action
Left button + drag Draw the stroke.
Release left button Finish and create the feature.
Release secondary/middle button Finish the stroke early (halt the drag).
Ctrl at press Snap the first vertex.
Ctrl at release Snap the last vertex.
Esc with a stroke Cancel the stroke, keep the tool active.
Esc with no stroke Deactivate the tool.

11. Troubleshooting

Symptom Cause / fix
The action is disabled The active layer is not a line/polygon layer in edit mode. Select one and start editing.
“Select the layer where you want to draw first.” No active layer. Select the target layer first.
“This tool only draws on line or polygon layers.” Point layers are not supported.
“Start editing layer ‘…’ before drawing.” Activate edit mode on the layer; the plugin no longer starts it automatically.
The tolerance spin box is disabled The layer uses a geographic CRS; tolerance is forced to 0.
The attribute form does not open QGIS is configured to skip the form, or the layer has no editable fields.
The feature is not where expected Check the layer CRS and that you used the layer, not the project, as the target.
Ctrl does not snap QGIS snapping is disabled, no target is within tolerance, or the snapping mode excludes the layer.

Technical messages are written to the QGIS message log with the Freehand Digitize tag. Open View → Panels → Log Messages to inspect them.


12. Getting help

Use the Help button in the Freehand Digitize toolbar, or Help → Plugins → Freehand Digitize user guide. QGIS opens the bundled offline guide; if it is missing, the GitHub guide opens instead.


13. Known limitations