![../../_images/logo_qgis.png](../../_images/logo_qgis.png)
![../../_images/OSGeo_project.png](../../_images/OSGeo_project.png)
QGIS Quickstart¶
QGIS is a user-friendly Desktop GIS client which lets you visualize, manage, edit, analyse data and compose printable maps.
Contents
Opening QGIS for the first time¶
Learning goal:
- Open QGIS
- Identify parts of the Interface
QGIS can be opened from the ‘Desktop GIS’ folder on the OSGeoLive desktop. Follow the steps below to launch QGIS.
- Open the ‘Desktop GIS’ folder.
- Double click on the ‘QGIS’ icon.
The user will see QGIS launch with an empty project. The various parts of the QGIS Interface are listed below.
- Menu bar: Access to various QGIS features using a standard hierarchical menu.
- Toolbars: For interaction with the map, layers, attributes and selections.
- Browser Panel: A spatial file browser allowing drag and drop content into the map frame.
- Layer Panel: Controls the map layers, their order, and visibility.
- Status Bar: General information about the map and access to a universal search bar.
Starting a new project¶
Learning goal:
- Start a new QGIS project
- Add vector layers to a project
- Add raster layers to a project
- Save a project
After opening QGIS for the first time, you will be presented with an empty project that you can add layers to.
Now with an empty QGIS project we can start adding data to the project.
Let’s start by adding a vector layer to the map. Layers can be added to QGIS using the browser panel, located on the left of the screen.
- Go the browser panel on the left of the screen.
- Navigate the folder tree to ‘home/data/natural_earth2’.
- Select ‘ne_10m_admin_0_countries.shp’.
- Drag the layer from the browser panel and drop it in the map frame.
Once the layer has been dragged onto the map frame, the user will see a layer showing countries.
![QGIS vector layer](../../_images/qgis_add_vector_layer.png)
Now let’s try adding a raster layer to the project. Again we will use the browser panel.
- Go the browser panel on the left of the screen.
- Navigate the folder tree to ‘home/data/natural_earth2’.
- Select ‘HYP_50M_SR_W.tif’.
- Drag the layer from the browser panel and drop it in the map frame.
![QGIS browser add raster layer](../../_images/qgis_browser_panel_raster.png)
Once the layer has been dragged onto the map frame, the user will see a raster layer showing land cover and bathymetry.
![QGIS raster layer](../../_images/qgis_add_raster_layer.png)
Now that we have added some content to our project we can save this project so that we can come back to it at a later time.
To save the QGIS project, follow these steps:
Go to the ‘Project’ menu on the menu bar.
Select ‘Save’.
Make the location to save the project ‘/home/user/desktop’.
Call the project ‘My QGIS project’.
Then click ‘Save’.
You will know the project has been saved because there will be a project file on the desktop called ‘My QGIS project’ and the top of your project document will no longer read as ‘untitled’ but instead will read as ‘My QGIS project’.
![QGIS saved project](../../_images/qgis_saved_project.png)
Open an existing project¶
Learning goal:
- Understand what a QGIS project is
- Open an existing project
- Interact with layers
A QGIS project saves layers, styles, map extents and settings for use at a later time. This information is stored as a QGIS project file and has an extension of ‘.qgs’ or ‘.qgz’, with ‘.qgz’ being the default file format in QGIS going into the future.
Let’s open an existing QGIS project and have a look at how it works.
- Open QGIS. Note that when QGIS is opened a user will be presented with a list of recent projects to chose from. This is a quick way of entering into recent projects.
- Go to the ‘Project’ menu on the menu bar.
- Select ‘Open’.
- Navigate to ‘/home/user/qgis-example’.
- Select the project ‘QGIS-NaturalEarth-Example.qgs’.
- Then click ‘Open’.
![QGIS Open project](../../_images/qgis_project_open.png)
This will open a QGIS project with a number of Natural Earth datasets, as shown below. This project contains a number of layers in the layers panel and is displaying the spatial content in the map frame.
![QGIS Open project result](../../_images/qgis_project_open_result.png)
Layers can be turned on or off by clicking the checkbox next to the layer name in the layers panel. When a layer is turned on in the layer panel, the map frame will be updated to display the layer. A close up of the layer panel is shown below.
![QGIS layer panel](../../_images/qgis_layer_panel.png)
Let’s interact with the layer panel and change the visibility of some map layers.
- Click the checkbox next to the ‘ne_10m_populated_places’ layer to turn it on.
- Click the checkbox next to the ‘Water’ layer to turn the layer off.
Notice how the map frame has been updated to reflect the changes in the layer list. We can now see the ‘ne_10m_populated_places’ layer as points, but can no longer see the rivers and lakes which are within the ‘Waters’ layer.
![QGIS result of layer visibility changes](../../_images/qgis_layer_visibility.png)
In addition to controlling layer visibility, we can also change the order in which layers are drawn in the layer panel. This is done by selecting a layer in the layer panel and dragging it up or down the list. The order that the layers appear in the layer list is the order which they will draw on in the map frame.
To change the order of the layers:
- Left-Click on the layer ‘HYP_50M_SR_W’.
- While holding the mouse button down drag the layer to the top of the list.
Notice how the raster layer is now on top of all other layers in the layer panel. This now renders the raster layer on top of all other layers in the map frame.
![QGIS modified the order of layers](../../_images/qgis_modified_layer_order.png)
Try moving the ‘HYP_50M_SR_W’ layer to the bottom of the layer list. This would be a more appropriate position for a map layer like this.
Styling Layers¶
Learning goals:
- Access the style dock
- Modify the colour of a layer
Layers can be styled in QGIS using the style dock. The style dock is not visible by default, but easily accessible via a button at the top of the layer panel as shown below.
![QGIS style dock](../../_images/qgis_style_dock_button.png)
The above button acts as a toggle so the style dock can be easily hidden from view by clicking the same button again. When the style dock is enabled it will appear on the right-hand side of the screen ready to style the active layer highlighted in the layer panel.
With the style dock open, we can modify the appearance of the layer shown at the top of the style dock.
![QGIS style dock layer](../../_images/qgis_style_dock_layer.png)
With the style dock now open, we can modify the colour and the width of the lines in the ‘ne_10m_rivers_lakes_centrelines’ layer. Let’s try modifying the colour first.
Click on the ‘Color’ swatch shown below. This will launch a colour palette allowing you to choose a different colour.
In the ‘Select Color’ palette, move the cross-hair to your preferred colour.
Then click the back arrow to return to the symbol render preview.
The symbol preview will be updated with the new colour, and so will the layer in the map frame.
In the style dock, we can also modify the size of the map features. To modify the thickness of the lines follow these steps:
Make sure that the ‘ne_10m_rivers_lakes_centrelines’ is selected at the top of the style panel.
In the style panel enter the value ‘0.5’ in the ‘width’ input.
Notice the line in the symbol preview increase in width, and so do the lines that are in the map frame.
Things to Try¶
- Extend QGIS functionality with Plugins.
- Start manipulating data with the Processing toolbox.
- Use QGIS to view content from a PostGIS database.
- Try publishing your QGIS map to the web using QGIS Map Server. in the menu.
What Next?¶
To learn more about QGIS, a good starting point is the Documentation page on the QGIS homepage and A Gentle Introduction to GIS eBook.