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 for Desktop - see Exporting feature class into multiple feature classes based on field values using ArcGIS for Desktop?

How do I do it using QGIS, GDAL, SAGA, etc?


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.

  • Unlike the other vector tools this one does not add the files to the project, and you should select an output folder with Browse to find them afterwards. – AndreJ Oct 29 '17 at 9:24

Quantum GIS has a plugin called ShapefileSplitter, which does this.


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).


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.

  • 1
    is this different from the plugin suggested by @oeon? – matt wilkie Mar 12 '15 at 21:00
  • @mattwilkie its an algorithm that comes natively with QGIS. No need to install a Plug in for that! – Stophface Sep 26 '17 at 15:04

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.