31
GIS TUTORIAL 1: Introduction to QGIS In this tutorial you will receive a brief introduction to QGIS and learn how to make a simple map with data downloaded from the internet. 1 QGIS Software Please make sure that you have QGIS downloaded and installed on your computer (download link here). We will be using QGIS 3, the most recent version. Do not worry which version of QGIS 3 you have (e.g. 3.4, 3.10, 3.12), the tutorials should be relevant regardless. The basic interface of QGIS is shown below as a reference – the individual components will be referred to repeatedly throughout these tutorials. 2 Changing the Language Settings (video tutorial) QGIS has been translated into a wide variety of languages including Arabic and French. If you would like to use a language other than English, follow these instructions: In the Menu click on Settings > Options Click on the General tab in the Options Window Tick “Override system locale”

GIS TUTORIAL 1: Introduction to QGIS - EAMENA

  • Upload
    others

  • View
    23

  • Download
    0

Embed Size (px)

Citation preview

Page 1: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

GIS TUTORIAL 1: Introduction to QGIS

In this tutorial you will receive a brief introduction to QGIS and learn how to make a simple map with data downloaded from the internet.

1 QGIS Software

Please make sure that you have QGIS downloaded and installed on your computer (download link here). We will be using QGIS 3, the most recent version. Do not worry which version of QGIS 3 you have (e.g. 3.4, 3.10, 3.12), the tutorials should be relevant regardless.

The basic interface of QGIS is shown below as a reference – the individual components will be referred to repeatedly throughout these tutorials.

2 Changing the Language Settings (video tutorial)

QGIS has been translated into a wide variety of languages including Arabic and French. If you would like to use a language other than English, follow these instructions:

In the Menu click on Settings > Options Click on the General tab in the Options Window Tick “Override system locale”

Page 2: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

Change “User Interface Translation” to Arabic or French and click “OK” Close and restart QGIS

However, as the tutorials have been written using the English version, we would encourage you to do the same if you can, as this will help avoid confusion. 3 Finding Help

Many useful QGIS resources and tutorials exist online. If you need help with a problem, a simple Google search can often quickly provide the answer. Otherwise the official QGIS User Guide is a good place to start (https://docs.qgis.org/3.10/en/docs/user_manual/index.html). It has been translated into French (https://docs.qgis.org/3.10/fr/docs/user_manual/index.html), but unfortunately not yet Arabic.

4 Making a Simple Map (video tutorial playlist)

We are going to make a simple map using a combination of data available through QGIS itself, data downloaded from the internet, and data imported from the EAMENA database.

4.1 Add a XYZ tiles basemap (video tutorial)

We are going to add a basemap to our QGIS map.

In the Browser Panel find and expand “XYZ Tiles” Double-click on OpenStreetMap

This will add the OpenStreetMap basemap layer to the Layers Panel and the Map View. This is an open-source dataset that is similar to Google Maps.

Page 3: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

As well as OpenStreetMaps we can add other basemaps depending on what sort of imagery we want to show. This is especially useful for countries where Google Earth imagery is poor.

Right-click on “XYZ Tiles” and select “New connection…” Browse the list below, choose the basemap you want, and copy and paste the “Name”

and “URL” details into the XYZ Connection Window and click OK

Google Maps: https://mt1.google.com/vt/lyrs=m&x=%7Bx%7D&y=%7By%7D&z=%7Bz%7D

Google Satellite: https://mt1.google.com/vt/lyrs=s&x=%7Bx%7D&y=%7By%7D&z=%7Bz%7D

Google Terrain: https://mt1.google.com/vt/lyrs=t&x=%7Bx%7D&y=%7By%7D&z=%7Bz%7D

Google Terrain Hybrid: https://mt1.google.com/vt/lyrs=p&x=%7Bx%7D&y=%7By%7D&z=%7Bz%7D

Google Satellite Hybrid: https://mt1.google.com/vt/lyrs=y&x=%7Bx%7D&y=%7By%7D&z=%7Bz%7D

Esri Satellite: https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/%7Bz%7D/%7By%7D/%7Bx%7D

Esri Standard: https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/%7Bz%7D/%7By%7D/%7Bx%7D

Esri Terrain: https://server.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer/tile/%7Bz%7D/%7By%7D/%7Bx%7D

Esri Transportation: https://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Transportation/MapServer/tile/%7Bz%7D/%7By%7D/%7Bx%7D

Esri Topo World: http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/%7Bz%7D/%7By%7D/%7Bx%7D

OpenTopoMap: https://tile.opentopomap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png

Bing VirtualEarth: http://ecn.t3.tiles.virtualearth.net/tiles/a{q}.jpeg?g=1

Expand “XYZ Tiles” in the Browser Panel and double-click on your new basemap to add it to the Map View Window as above.

Save your work by clicking the “Save” button on the Toolbar, giving it a suitable name and saving in your GIS folder

Page 4: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

4.2 Download and add vector country data (video tutorial)

We are now going to find, download and add shapefiles of country borders and other geographic data to our map.

On your web browser (e.g. Chrome) go to http://www.naturalearthdata.com Click on the “Downloads” tab

There are now different options: we can download data at large, medium and small scale. We will download the highest quality large scale data. We can also choose to download Cultural vector data (country borders, cities etc), physical vector data (land, sea, rivers etc), or raster (image) versions of this data. We are going to start with Cultural data.

Under “Large scale data” click “Cultural”

Page 5: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

As we want country border data, under “Admin 0 – Countries” click “Download countries”

In your GIS folder (create one if you do not have one, either on the Desktop or in My Documents), create a new folder and name it “NaturalEarth”

Page 6: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

Find the downloaded zip file, probably in Downloads, and move it to the NaturalEarth folder

Right-click the zip file and extract it. o Many computers will have 7-Zip pre-installed. o Go to 7-Zip > Extract Here o If you do not have 7-Zip you can download and install it here https://www.7-

zip.org/

Page 7: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

Go back to QGIS and click the Data Source Manager button on the Toolbar Click on the Vector tab and press the browse […] button Navigate to your new NaturalEarth folder Change the file type to “ESRI Shapefile” Click on the “ne_10m_admin_0_countries.shp” file and Open Click Add and Close

Page 8: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

You should now have a shapefile of all the world’s countries overlying your basemap, if you cannot see it drag it above the basemap in the Layers Panel so that it is on top.

Page 9: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

We want to see the imagery beneath the country data, so we must change the appearance of the shapefile.

Right-click the countries shapefile in the Layers Panel and click “Properties” Click on the Symbology tab and in the gallery click “outline red” Click Apply and OK

If you do not like this style of line, you can go back to Properties and change the colour and thickness of the line.

Page 10: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

Click on “Simple line” Click on the black arrow next to “Color” and chose a different colour Change “Stroke width” from 0.96 to 0.4mm Click Apply and OK Save your work by clicking the “Save” button on the Toolbar

Page 11: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

PRACTICE: download cities (Cultural > Populated places) and rivers (Physical > Rivers + lake centerlines) from NaturalEarth and change the symbology to match the map below.

4.3 Query, download and add OpenStreetMap data (video tutorial)

As well as adding OpenStreetMap as a basemap layer we can also download it as vector data to make maps.

Page 12: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

A lot of useful information is contained within OpenStreetMap, including archaeological and heritage data. We are going to learn how to query, download and add this to QGIS.

In your web browser go to https://overpass-turbo.eu/ Use your mouse to zoom into your area of interest Click the “Wizard” button, type “village” and click “Build and Run Query”

You will see all of the villages added to the map as circles – this data is a lot more detailed than NaturalEarth.

Page 13: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

Click on the “Data” tab and you will see the coordinates, names and details of all these different villages

Return to the Map tab and try searching for “road” and “restaurant” separately

Page 14: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

OpenStreetMap also has data of interest to archaeologists.

Click “Wizard”, type “historic site” and click “Build and Run Query” To export this data: click the “Export” button, click “Data” and click “download/copy as

GeoJSON”

Create an “OpenStreetMap” folder in your GIS folder and move the “export.geojson” file from Downloads to this folder

Rename the file as something more useful e.g. “historic_sites_Rustaq.geojson”

Page 15: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

Return to QGIS and click the Data Source Manager button on the Toolbar Click on the Vector tab and press the browse […] button Navigate to your new OpenStreetMap folder Change the filetype to “GeoJSON” Click on the historic sites geojson file and Open

Page 16: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

Click Add and in the new window click Select All, OK and then Close

Page 17: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

A number of new layers will have been added to the Layers Panel and the Map View Window

Right-click one of these in the Layers Panel and click “Open Attribute Table” to show the name, category and other details of each historic site

The Attribute Table may appear as a separate window. If you would rather have it in the same window as your map, then click the “Dock Attribute Table” button in the Attribute Table to embed it below the Map View Window

Page 18: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

We can display the different categories of historic sites in different colours and add their names to the map as labels.

Right-click the historic site point layer in the Layers Panel and click on “Properties” Click on the Symbology tab In the dropdown at the top change “Single Symbol” to “Categorized” In the dropdown beneath this, change “Value” to “historic” and click the “Classify” button To make all the points a bit bigger click the point next to “Symbol”, change the size to

3.0, click OK, then Apply and OK

Page 19: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

All of the different categories of historic site will now have their own colour.

Page 20: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

We can add labels to the map to show the names of the sites.

Right-click the historic sites point layer in the Layers Panel and click on “Properties” Click on the Labels tab Change “No labels” to “Single labels” Select “name” for “Value” Click on “Buffer” and tick “Draw text buffer”, click Apply and OK

Page 21: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

The historic sites are now labelled with their names.

Save your work by clicking the “Save” button on the Toolbar

Page 22: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

PRACTICE: religious buildings are often not included in OpenStreetMap historic sites, but many of them are old and are of interest to archaeologists – download, add to QGIS and label any mosques or churches in your area of interest (“place of worship” in the Wizard).

4.4 Importing data from the EAMENA database into QGIS (video tutorial)

There is a new way of adding data from the EAMENA database to QGIS.

[TO BE ADDED]

Page 23: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

4.5 Making and exporting a map (video tutorial)

This final part of the tutorial recaps how to make and export a map from QGIS.

Once you are happy with the contents, symbology and labels in your Map View Window, you can then create and export a map from QGIS as an image file that can be opened or used in a different program.

On the Menu click Project > New Print Layout Give your map a short name and click OK

Page 24: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

This will open the Print Layout Window and show a blank page. This is where we can create our map.

First click the Add Map button and click and drag a box across the page to the same size that you want your map

Page 25: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

Click the Move Item Content to move around inside your map, you can use the mouse wheel to zoom in and out, holding the Ctrl key to zoom in smaller increments

You can also adjust the zoom by manually adjusting “Scale” in the Item Properties Panel

Click the Add North Arrow button and click and drag to create a north arrow for your map

Page 26: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

Click the Add Scale Bar button and click and drag to create a scale bar

You can adjust the scale bar in the Item Properties panel – you can change the units, add extra segments and change the length of the segments, as well as changing the formatting.

Page 27: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

Click the Add Legend button and click and drag to create a legend

Page 28: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

By default this will contain a lot of layers and information that we do not want so we will have to edit it in the Item Properties Panel.

A title (e.g. Legend) can be added in the Title box To remove unwanted items untick “Auto update”, click on unwanted items and click the

red [–] button The order of items can be changed be clicking on each and pressing the blue arrow

buttons Text labels can be changed by double-clicking, typing it in and pressing OK

Page 29: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

If desired, a title can be added by using the Add New Label button

The title’s text is changed in the Item Properties Panel by typing in the large Main Properties box

The font and text size can be changed by pressing the Font button The horizontal and vertical alignment of the text can be changed by clicking on the

preferred options

Page 30: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

Once you are happy with the map, export it by clicking Layout > Export as Image on the Menu

Navigate to the folder you want and choose an appropriate name and filetype (e.g. jpeg) and click Save

Change the DPI to 200 (for a medium quality image) and tick “Crop to content” and click Save

Click the green shortcut to open the folder in which you have saved the map

Page 31: GIS TUTORIAL 1: Introduction to QGIS - EAMENA

Double-click the map to open it

Save your work by clicking the “Save” button on the Toolbar

ACTIVITY: Create and export a map of archaeological sites in your area of interest using QGIS