Hello everyone, welcome to another QGIS Tutorial. In this article, we will learn how to split a vector file or layer using its attribute data. QGIS has a special tool called Split vector layer that allows us to generate layers from the existing layer based on a specific column or field. This tool will find a unique value in the selected field and then use the information to generate new layers.
We can use this feature to split any vector layer regardless of the geometry. In the other words, we can split point layer, polyline, or polygon. In this example, I will split a contour layer based on the elevation data. It will produce several shapefiles depend on how many elevations in this contour file.
As you can see above, I will use the ELEV (elevation) field as the unique field to split. Now we are ready to split the table/layer.
Steps to Split Vector Layer Based on Attribute in QGIS
Open the vector layer in the QGIS canvas. And then double-click the Split vector layer from the QGIS Toolbox under Vector General. From the Split vector layer window, select the Input layer and then the Unique ID field. In this example, I use the ELEV field.
Select the output file type. QGIS supports many file types that you can choose from. Lastly, specify the output directory. You may use the temporary directory or select your own directory. Click Run to start the process. Once the process completes, you will have a set of new files.