QGIS – Loading Your Layers
Import your data layers
- From the
Layer
menu, go down toAdd Layer
.- Click
Add Raster Layer... (Ctrl-Shift-R)
for raster data (e.g. elevation data). - Click
Add Vector Layer... (Ctrl-Shift-V)
for vector data (trails, Google Earth files, et cetera).
- Click
- Leave
File
as theSource Type
. - Click the
...
button to the right of theVector Dataset(s)
/Raster Dataset(s)
text box in theSource
section. - Choose the file containing your data and click
Open
. - Click the
Add
button to add the dataset to your QGIS session.- Some file types, e.g. Google Earth .kml files, may be read as multiple layers. See “Importing vector files with multiple layers” for advice.
- If you have more of the same type of data, continue from step 3.
- To add data layers of the other type, choose
Vector
/Raster
from the left side of theData Source Manager
window and continue from step 2. - When you have loaded all your data layers, click
Close
.
Importing vector files with multiple layers
Some vector files you import may have multiple layers. You can just select them all, import everything, and just click around in the Layers
box to filter through the results, but that is often not the best approach. For example, a Google Earth .kml file with trails and waypoints may be imported as one layer for each LineString
(i.e. path) plus one layer for each folder of waypoints. You will almost certainly want to combine all the trails into one layer containing them all, but you cannot combine “line” layers with “point” layers. To make life easier on yourself, for each file:
- In the
Select Vector Layers to Add...
popup, click theGeometry type
header to sort by geometry type. - Select all the layers of one geometry type.
- Leave
Add layers to a group
checked. - Click
OK
. - From the
Vector
menu, go toData Management Tools
and clickMerge Vector Layers...
- Click the
...
button to the right of theInput layers
box. - Select all the layers you want to merge (usually the ones you’ve just imported).
- Click
OK
. - If you want to keep the merged layer permanently, click the
...
button to the right of theMerged
box and chooseSave to file...
- Give your new file a name, and feel free to leave the type as GeoPackage (*.gpkg) unless you have reason to choose otherwise.
- Leave
Open output file after running algorithm
checked. - Click the
Run
button. The process will run. - Click the
Close
button to close theMerge Vector Layers
window. - In the
Layers
box (bottom left, usually), rename your new merged layer. - If your new merged layer is inside the group of your source layers, drag it down and drop it out of the group.
- Right-click the source layers (or the group containing the source layers) and remove (so you won’t have a jumble to look through later).
Merging multiple raster layers
If you required multiple elevation data files to cover your entire area of interest, you will want to merge them into a single layer.
- From the
Raster
menu, go toMiscellaneous
and clickMerge...
- Click the
...
button to the right of theInput layers
box. - Select the raster data layers you want to merge.
- If you want to keep the merged layer permanently, click the
...
button to the right of theMerged
box and chooseSave to file...
- Give the file a name, and select
IMG files (*.img)
from theSave as type:
drop-down menu. (You could alternately choose another type, but IMG files, i.e. Erdas Imagine Image files, are self-contained and convenient.)
- Give the file a name, and select
- Leave
Open output file after running algorithm
checked. - Click the
Run
button. The process will run. - Click the
Close
button to close theMerge Vector Layers
window. - In the
Layers
box (bottom left, usually), rename your new merged layer. - Right-click the source layers and remove (so you won’t have a jumble to look through later).