Typically, raw data obtained for a GIS project needs to be massaged for use in the specific application. It may need to be merged, converted to a different geometry type, saved to the coordinate reference system of the project, subset to the extent of the study area, or subset by attribute values. While QGIS provides a powerful set of tools that can handle many types of vector preparation and transformation task, this chapter will cover what we consider to be commonly used vector preparation tasks. Many of the tools covered in this chapter are found on the Vector menu in QGIS; however, others are available in the Processing Toolbox. Additional vector processing tasks will be covered in Chapter 8, The Processing Toolbox and Chapter 9, Automating Workflows with the Graphical Modeler. The topics that we will cover in this chapter are as follows:
The Merge shapefiles to one tool merges (that is, combines) multiple input shapefiles into a new shapefile. The input shapefiles must be in a common coordinate reference system and should contain common attributes. For example, vector data is often provided in tiles or by political jurisdiction such as counties or states. In these cases, the data may need to be merged to form a seamless layer covering the study area. The Merge shapefiles to one tool that can be found by navigating to Vector | Data Management Tools will combine them:
In the Merge shapefiles dialog, you have the option to choose whether you wish to merge all shapefiles in a folder or pick individual shapefiles to merge: