Splitting all lines in layer at vertices using QGIS
Explode lines from the Processing Toolbox will split all lines at their vertices to separate lines.
Menu Processing -> Toolbox. Type "explode" into the search field to find the function. Select your line layer from the dropdown and start. This will produce a new layer.
Selecting one or more lines from the line layer will produce a splitted layer with only these features, discarding the rest.
Note: As QGIS is moving fast, all infos below are outdated already.
I think Explode lines would be the the noob-solution through the SEXTANTE toolbox.
QGIS Geoalgorithms > Vector geometry tools > Explode lines
. Unfortunately, it does not seem to work at the moment, i get an error message only.Traceback (most recent call last): File "path/.qgis//python/plugins\sextante\core\GeoAlgorithm.py", line 145, in execute self.processAlgorithm(progress) File "path/.qgis//python/plugins\sextante\algs\Explode.py", line 58, in processAlgorithm features = QGisLayers.features(layer) NameError: global name 'layer' is not defined
A working solution is the
Split Feature
-Plugin from the "contributed" repository, which does the job for me.In general I prefer sextante functions over separate plugins, cause the workflow with sextante is so much faster and produces no junk-files of intermediate steps (provided it works).
EDIT: Unfortunately, a lot of plugins were not moved to the official plugin repository yet, but are still only available through the "contributed" plugin repository: http://pyqgis.org/repo/contributed, which was removed from the default repositories list with version 1.8.
There you can download them individually and unzip them in your .qgis/python/plugins folder OR you add this address to your plugins repository list:
Plugins -> Fetch python plugins -> Tab "Repositories" -> Add ... -> enter a name and the url.
- Open/Create GRASS mapset (so you can run the tools on your data)
- Open GRASS tools / Import the shapefile you want to split into the GRASS database
- Run v.split.vert (set maximum number of vertices = 2)