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?


4 Answers 4


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.


Plugin won't work on QGIS 3 and higher

QGIS has a plugin called ShapefileSplitter, which does this.


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.


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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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