47

I have a polyline shapefile with about 20 kinds of roads.

I would like to know how can I create automatically a vector file for each one.

I am aware of how to do it using ArcGIS Desktop - see Exporting feature class into multiple feature classes based on field values using ArcGIS Desktop?

How do I do it using QGIS or SAGA?

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
Bobo
  • 479
  • 1
  • 4
  • 3

5 Answers5

61

In QGIS 2.8.1 there's a tool in the Vector menu that can split a dataset based on an attribute.

Look in Vector > Data Management Tools > Split Vector Layer...

split vector layer tool in QGIS 2.8.1

It's a basic tool that should work if you don't want to resort to plugins or tools in Processing; unless they offer additional functionality you need.

SaultDon
  • 10,389
  • 1
  • 43
  • 78
6

Plugin won't work on QGIS 3 and higher

QGIS has a plugin called ShapefileSplitter, which does this.

Taras
  • 32,823
  • 4
  • 66
  • 137
oeon
  • 544
  • 3
  • 9
6

Use 'Split Vector Layer' in the Vector General Toolbox

This tool will allow you to split a vector layer based on an attribute column. It splits the data into separate shapefiles for each unique attribute in the column.

jbalk
  • 7,505
  • 1
  • 17
  • 39
2

On the processing toolbox of QGIS, if you go the example scripts of the Scripts section. You'll find the script called "Split vector layer by attribute". That'll do what you need.

Ariel
  • 315
  • 2
  • 13
0

You could consider saga gis (either directly or through sextante in qgis). It contains a module that will split a shape by attribute (shapes/tools/ split table/shape by attribute).

johanvdw
  • 6,207
  • 27
  • 42