19

I'm unable to snap 2 polygons in QGIS 3.0. I tried snapping 2 polygons from the same layer and also 2 polygons from different layers.

I ensured that snapping is enabled in the Settings>>Options>>Digitizing tab, and increased the snapping distance.

I could not locate any 'snapping settings' at the layer level. Layers are projected.

2
  • Did you just create either polygon layer?
    – whyzar
    Commented Apr 5, 2018 at 13:51
  • Be aware that QGIS 3.0 is still in early testing. As such, it's buggy and not well documented. If you're learning to use QGIS, if might be easier to learn on 2.18, which is a more stable version and better documented.
    – csk
    Commented Apr 5, 2018 at 18:52

2 Answers 2

32

In QGIS 3.0, the snapping settings are accessed through the snapping toolbar.

This is a change from previous versions. In QGIS 2.x they were accessed through Options menu > Snapping Options...

Enable the snapping toolbar through the menu accessed by right-clicking on any toolbar. The snapping toolbar is not available through the View menu in the current version of QGIS (3.0.1); this is a bug that I'm sure will be fixed by the next long term release.

enter image description here

Click the magnet button to enable snapping. Use the other tools on the toolbar to configure your snapping settings. Be sure to set a non-zero value for the snapping radius; a snapping radius of zero effectively turns off snapping.


For layer-specific snapping settings, click the second button in the snapping toolbar. This brings up a menu with these snapping options:

  • All layers - snapping is enabled for all layers
  • Active layer - snapping is enabled only for the active layer
  • Advanced configuration - snapping is enabled for a customizable set of layers
  • Open snapping options...

enter image description here

Selecting the option, "Open snapping options...," brings you to a menu, where you can customize snapping settings for each layer.

enter image description here

2
  • Did you find the layer-based snapping options? I need some information layers which should not be snapped to, but cannot find the lyer-based options to de-select them in QGIS 3.0.2
    – aae
    Commented Jun 7, 2018 at 16:03
  • 1
    @WilliamBligh I edited my answer to include instructions for layer-based snapping.
    – csk
    Commented Jun 7, 2018 at 17:52
5

Based on documentation on QGIS for snapping, you need to have these settings established.

enter image description here

Snapping tolerance is the distance QGIS uses to search for the closest vertex and/or segment you are trying to connect to when you set a new vertex or move an existing vertex. If you aren’t within the snapping tolerance, QGIS will leave the vertex where you release the mouse button, instead of snapping it to an existing vertex and/or segment. The snapping tolerance setting affects all tools that work with tolerance.

A general, project-wide snapping tolerance can be defined by choosing Settings ‣ options Options..., Digitizing tab. You can select between ‘To vertex’, ‘To segment’ or ‘To vertex and segment’ as default snap mode. You can also define a default snapping tolerance and a search radius for vertex edits. The tolerance can be set either in map units or in pixels. The advantage of choosing pixels is that the snapping tolerance doesn’t have to be changed after zoom operations. In our small digitizing project (working with the Alaska dataset), we define the snapping units in feet. Your results may vary, but something on the order of 300 ft at a scale of 1:10000 should be a reasonable setting.

A layer-based snapping tolerance that overrides the global snapping options can be defined by choosing Settings ‣ Snapping options. It enables and adjusts snapping mode and tolerance on a layer basis (see figure_edit_snapping ). This dialog offers three different modes to select the layer(s) to snap to: Current layer: only the active layer is used, a convenient way to ensure topology within the layer being edited All layers: a quick and simple setting for all visible layers in the project so that the pointer snaps to all vertices and/or segments. In most cases it is sufficient to use this snapping mode. Advanced: if you need to edit a layer and snap its vertices to another layer, ensure the target layer is checked and increase the snapping tolerance to a greater value.

Furthermore, snapping will never occur to a layer that is not checked in the snapping options dialog, regardless of the global snapping tolerance. So be sure to mark the checkbox for those layers that you need to snap to.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.