[GIS] How to close a polyline in QGIS while digitizing

digitizinglineqgis

We need to work on a line layer where some features are closed and some are open. The closed features need to be closed perfectly, so that the first and the last point of the polyline perfectly match. In Kosmo GIS this can be achieved with right-mouseclick->close trace, in GvSIG also with right-mouseclick->close polyline (or simply with a keyboard entry "C"). I could not find a comparable functionality in QGIS. E.g. snapping to itself would be OK, but it seems not to work on features that are in the process of being created. Only if a feature is already added to the dataset, it becomes "snappable". Or am I missing something obvious?

Note that to divide the features between polygon and line layers is not an option for us. We need them to be on the same layer with the geometry type = line.

Best Answer

The easiest way would be the following:

  • enable snappig on the line layer that you are using to digitize
  • digitize the line, but finish your sketch before you close it
  • digitize another line, start digitizing at the end of the previously digitized line (using snapping), finish the line at the start of the previously finished line (using snapping)
  • now select these two datasets
  • merge these two datasets using the tool from the Advanced Digitizing toolbar
  • enter attributes (if applicable) after the merging

enter image description here

Related Question