1

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.

2

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

  • Thanks, I am aware of this possibility, yet I forgot to mention that we have thousands of features so this workflow with many additional clicks would be too time-consuming and is not practicable for us. It is however a workaround that can help others who only have few features and need them to be closed perfectly. I appreciate that with upvoting. – Pavol May 26 '15 at 11:17
1

A workaround is to digitize a temporary line starting from the final start/end vertex for creating something that you can snap to. Delete the helper line afterwards.

For a proper fix make a feature request and hope that new snapping option would be implemented sooner or later. With OpenJUMP that has succeeded http://thread.gmane.org/gmane.comp.gis.jump.devel/15903 and https://sourceforge.net/p/jump-pilot/code/4401/

Both alternatives allow snapping to vertices of the line that is edited or implementing "close line" shortcut feels about as easy to use. Allow snapping alternative would make it possible to draw also lines which self-intersect at the middle but who needs such linestrings?

  • I appreciate with upvote also this workaround and the suggestion to make a feature request since the desired functionality seems not to exist in QGIS yet. There are only workarounds to be applied after the line was digitized. – Pavol May 26 '15 at 11:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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