Extracting geographic features from a larger dataset in QGIS
You may have noticed that many GIS datasets contain information about a geographic extent that is larger than your area of interest.
Example: This Statistics Canada layer (downloaded from this page), displays all census dissemination areas within Canada. Suppose you only need to work with (for example) Nova Scotia’s dissemination areas. This tutorial will demonstrate how to extract just the features you need, saving them to new files that you can then use to map and analyze your data.
Using Select by Expression
• Open QGIS and load the layer you’d like to extract a subset of features from.
• Right-click the layer name in the Layers panel and choose Open attribute table.
• Click the Select by expression button.
• Build a query to select your features of interest (more information on queries in QGIS can be found in the official documentation.). Click Select features, then click Close.
• Result: selected features will be highlighted in yellow on the map canvas, and the count of selected features will be displayed in the QGIS status bar.
• Right-click the layer name again and choose Export -> Save Selected Features As…
• Save the output to your computer as an Esri Shapefile. Click OK.
Interactive selections using the attribute table or the map
You can also hand pick individual features for export.
• Open the attribute table.
• Click the row number box to the left of your record of interest to select it (the High Park dissemination area in Toronto, in this example). The attribute table row and its corresponding map feature will be highlighted. You can Shift-click or Control-click to select multiple records.
• If you’d prefer to select features from the map rather than the attribute table, use the Select tool to do this. Shift-click or Control-click to select multiple map features.
• Once you’ve selected your feature or features of interest, right-click the layer name again and choose Export -> Save Selected Features As…
• Save the output to your computer as an Esri Shapefile. Click OK.
Techniques: Extracting data | Tools: QGIS | Data Format: Vector