../../../../_images/image710.png

Mudule 3: Les bases de QGIS

Objectifs d’apprentissage

  • Download QGIS
  • Installer QGIS

  • Ouvrir un projet QGIS préexistant

  • Understand the layers panel
  • Access basic tools through the toolbar
  • Ranger la barre d’outils

  • Show a map in the map window
  • Get information on an active map through the status bar

In this module we begin using QGIS. We’ll see how to install the software and understand the layout, interface and core functions of the software. By the end of this module, you’ll be on your way to becoming a competent GIS user!

Note that if you have previously installed QGIS, feel free to skip ahead to section three. Otherwise, let’s start here and get QGIS installed.

1. Getting QGIS

  1. Open your web browser and in the address bar at the top of the window, type qgis.org. Press Enter.
../../../../_images/image910.png

Le sit de QGIS doit ressembler à ça:

../../../../_images/image1010.png
  1. Click Download Now.
../../../../_images/image1110.png
  1. If you are using Windows click QGIS Standalone Installer Version 2.8 (32 bit). Your exact version number may be different.
../../../../_images/image1210.png
  1. If you are not using Windows, select your operating system from the menu. Follow the installation instructions.
../../../../_images/image1310.png
  1. à la fin du téléchargement, lancez l’installateur et suivez les instructions pour installer QGIS.

2. Installing QGIS

  1. Ouvrez le répertoire dans lequel vous avez téléchargé le fichier d’installation QGIS.

../../../../_images/image141.png
  1. Run the installation file. If you are installing QGIS version 2.x, it should look like this:
../../../../_images/image151.png
  1. Clickez Suivant.

  2. Click I Agree to agree with the conditions in the licence agreement.
../../../../_images/image161.png
  1. The next window asks where you would like to install QGIS. In most cases, the default should be fine. Click Next.
../../../../_images/image171.png
  1. Dans la fenêtre suivante, clickez Installer sans cocher les case à cocher.

../../../../_images/image181.png

QGIS will begin to install. It may take a few minutes to complete.

../../../../_images/image191.png
  1. Click Finish to complete the installation. Your computer will automatically reboot.
../../../../_images/image201.png
  1. Now open QGIS from the Start Menu.
../../../../_images/image211.png

QGIS doit ressembler à ceci:

../../../../_images/image221.png

3. Terminology of Geographic Information Systems (GIS)

Next we will open up a QGIS project, and take a look at the different pieces of the QGIS interface. If you installed InaSAFE previously, make sure it is closed by clicking on the X in the upper right corner of the InaSAFE panel. If it isn’t open or you haven’t installed it yet, carry on. We will come back to this later.

  1. Click on the folder icon on the upper toolbar or go to Project ‣ Open...
../../../../_images/image231.png
  1. naviguez jusq’aux fichiers de tutoriel et allez dans le répertoire qgis/. Ouvrez le fichier nommé sleman_2_2.qgs.

QGIS should now look something like the following image. Let’s pause for a moment and go over the various components of the QGIS interface.

../../../../_images/image241.png

Fond de carte

This is the window where the map is shown. Our project has two different files open, one which shows districts of the Sleman regency, and another that shows the railway line running through the area. Both of these files are drawn together in the map canvas.

Layers panel

On the left side of QGIS is the layers panel. This lists the layers, or files, that are loaded into our QGIS project. In this project, we have two layers, Kecamatan_Sleman and railway_Sleman_OSM.

The layers panel not only shows all the files that are currently open, it also determines the order that they will be drawn on the map canvas. A layer that is at the bottom of the list will be drawn first, and any layers above it will be drawn on top.

  1. Click on the layer railway_Sleman_OSM and drag it below the layer named Kecamatan_Sleman.
../../../../_images/image251.png

Notice how the map canvas changes. The railway layer is now shown below the district layer, and part of the railway is now obscured. A map should never show railway hidden beneath district areas, so go ahead and move the layers back.

  1. Uncheck the box next to a layer’s name. It will be hidden from the map canvas.
  2. Expand collapsed items by clicking the arrow or plus symbol beside them. This will provide you with more information on the layer’s current appearance.
../../../../_images/image261.png
  1. Right-click on a layer to view a menu with extra options. You’ll be using some of them before long, so take a look around!

Barre d’outils

At the top of QGIS are a large number of tools, which are contained within various “toolbars”. For example, the File toolbar allows you to save, load, print and start a new project. We already used one of these tools when we opened this project.

../../../../_images/image271.png

By hovering your mouse over an icon, the name of the tool will appear to help you identify each tool. The number of tools (buttons) can seem a bit overwhelming at first, but you will gradually get to know them. The tools are grouped into related functions on toolbars. If you look closely you can see a vertical array of ten dots to the left of each toolbar. By grabbing these with your mouse, you can move the toolbar to a more convenient location, or separate it so that it sits on its own.

../../../../_images/image281.png

If you feel overwhelmed by the number of toolbars, you can customise the interface to see only the tools you use most often, adding or removing toolbars as necessary.

  1. To add or remove a toolbar, right-click on any of the toolbars, or go to View ‣ Toolbars.
../../../../_images/image291.png
  1. Let’s remove some of the toolbars that we will not be using in this training, to make the interface a bit cleaner. Right-click on the toolbar, and uncheck the boxes next to the following toolbars:
    1. Advanced Digitising
    2. Base de données

    3. GRASS
    4. Etiquettes

    5. Raster
    6. Vecteur

  2. Après avoir enlevé ces barres d’outils et en avoir déplacé, vous devriez avoir ce type d’aspect:

../../../../_images/image301.png

Even if they are not visible in a toolbar, all of your tools will remain accessible via the menus. For example, if you remove the File toolbar (which contains the Save button), you can still save your map by going to Project ‣ Save.

Status Bar

The status bar shows information about the current map. It allows you to adjust the map scale and see the mouse cursor’s coordinates on the map.

../../../../_images/image311.png

The coordinates of this map are the same type of coordinates that are recorded by GPS devices. The status bar shows the longitude and latitude of your mouse cursor.

This may not all be clear right now, but as you progress in your knowledge of GIS, this will make more and more sense.

4. Adding a vector layer

Nous allons maintenant ajouter une couche vecteur contenant des routes à notre projet.

  1. Clickez sur le bouton Ajouter une couche vecteur de la barre d’outils.

../../../../_images/image321.png
  1. A dialog box will open. Click the Browse button.
../../../../_images/image331.png
  1. Navigate to the file qgis/Sleman/Jalan_Sleman_OSM.shp (you may need to unzip the file Sleman.zip first). Select the file and click Open.

Note

One of the most common file formats are shapefiles, which end with the extension .shp. Shapefiles are often used to save geodata, and are commonly used with GIS applications like QGIS.

  1. You should now see your new layer appear both in the map canvas and in the layers panel. It should be drawn above both the district and railway layers.
../../../../_images/image341.png

5. Basic QGIS tools

We’ve already taken a look at the QGIS toolbar and seen the tools for opening a project and adding a new layer. Here’s a list of some other commonly used tools. Feel free to play around with them if you like. The important thing for now is to start getting familiar with QGIS.

../../../../_images/image351.png

Bascule en mode édition

Éditer un objet dans une couche

../../../../_images/image361.png

faire glisser la carte

Déplacer la carte

../../../../_images/image371.png

Zoomer

Zoom in on the map
../../../../_images/image381.png

Dézoomer

Zoom out on the map
../../../../_images/image391.png

zoomer sur l’ensemble des couches

Zoom so that all layers fit in the map window
../../../../_images/image401.png

Ouvrir la table d’attributs

ouvre la table d’attributs de la couche considérée

../../../../_images/image411.png Select Single Feature

pour sélectionner un objet dans la couche considérée