Summary

This document provides a tutorial on QGIS, focusing on geospatial statistics and spatial mapping. It covers concepts such as vector and raster data, and how to create maps using QGIS. The document outlines the basic functions and features of the software.

Full Transcript

Chapter 4: Geospatial Statistics 4.1 Introduction to Spatial Statistics What is Spatial Statistics?  A very broad collection of methods and techniques of visualization, exploration and analysis applied to data with spatial structure. Why is it useful?  A lot of data contain geogr...

Chapter 4: Geospatial Statistics 4.1 Introduction to Spatial Statistics What is Spatial Statistics?  A very broad collection of methods and techniques of visualization, exploration and analysis applied to data with spatial structure. Why is it useful?  A lot of data contain geographic information.  Interest in studying response patterns over a particular region.  Ignoring the spatial structure ⇒ spurious results. Examples  Meteorology – weather patterns over a country/region  Environmental Science – pollutant concentrations over an area  Epidemiology –disease monitoring  Geology ‐ mineral deposit pattern SPATIAL ANALYSIS Spatial Autocorrelation  The simplest definition of the spatial autocorrelation concept is that it represents the relationship between nearby spatial units.  The key element to the analysis is the autocorrelation (dependency) of the observations in space. Spatially independent implies lack of spatial dependence.  The more strongly spatial data are correlated, the less “unique” information is provided by each individual observed data point How Spatial Autocorrelation: Moran's I (Spatial Statistics) works  This tool measures spatial autocorrelation (feature similarity) based on both feature locations and feature values simultaneously.  Given a set of features and an associated attribute, it evaluates whether the pattern expressed is clustered, dispersed, or random.  The tool calculates the Moran's I Index value and both a Z score and p‐value evaluating the significance of that index.  In general, a Moran's Index value near +1.0 indicates clustering while an index value near ‐1.0 indicates dispersion.  In the case of the Spatial Autocorrelation tool, the null hypothesis states that "there is no spatial clustering of the values associated with the geographic features in the study area". When the p‐value is small and the absolute value of the Z score is large enough that it falls outside of the desired confidence level, the null hypothesis can be rejected. I. 4.2 INTRODUCTION TO SPATIAL MAPPING USING QGIS OUTLINE Introduction to GIS May Layers and Legends Types of GIS Data Vector Data Raster Data Intro to QGIS Introduction to GIS  GIS applications are computer systems capable of assembling, storing, manipulating, analyzing, and displaying geographically referenced information. GIS stands for ‘Geographical Information System’.  With a GIS application you can open digital maps on your computer, create new spatial information to add to a map, create printed maps customised to your needs and perform spatial analysis.  GIS is a data visualization tool and is useful for looking at spatial relationships and patterns between objects.  You can discover and communicate meaningful patterns in your data.  There are basically two data models used in a GIS, vector and raster. Vector Data  Vector data provide a way to represent real world features within the GIS environment.  A representation of the world using points, lines, and polygons. Vector layers are useful for storing data that has discrete boundaries, such as country borders, land parcels, and streets. Point features:  When a feature’s geometry consists of only a single vertex, it is referred to as a point feature. This is most commonly longitude and latitude coordinates. Polyline features:  Where a point feature is a single vertex, a polyline has two or more vertices. The polyline is a continuous path drawn through each vertex. When two vertices are joined, a line is created. When more than two are joined, they form a ‘line of lines’, or polyline. Polygon features:  Polygon features are enclosed areas like dams, islands, country boundaries etc.  Like polyline features, polygons are created from a series of vertices that are connected with a continuous line. However because a polygon always describes an enclosed area, the first and last vertices should always be at the same place! Raster data:  While vector features use geometry (points, polylines and polygons) to represent the real world, raster data takes a different approach.  Raster data is used in a GIS application when we want to display information that is continuous across an area and cannot easily be divided into vector features.  Rasters are made up of a matrix of pixels (also called cells), each containing a value that represents the conditions for the area:  Raster data can be obtained in a number of ways. Two of the most common ways are aerial photography and satellite imagery. GIS Data: There are two key concepts to vector data, namely: geometry and attributes. The geometry of a vector feature describes its shape and position, while the attributes of a vector feature describe its properties (colour, size, age etc.). GIS applications store their data in multiple files on a computer. There are a number of different file formats for GIS data, but the most common one is probably the ‘shape file’. Layers  Layers are the mechanism used to display spatial datasets in QGIS.  Each layer relates to a specific dataset and specifies how that dataset is displayed using symbols and text labels.  Each map created in QGIS is assembled by adding a series of layers.  All the layers are stacked on top of each other to create a representation of the real world. Just like layers in a cake, only the top layer is visible. Introduction to QGIS  QGIS is a GIS platform that is available as a free web-download.  The QGIS work area has seven parts; Menu Options Toolbar Map Canvas Browser Table of Contents Tool Box Status Bar Menu Options  The Menu Options bar provides access to various QGIS features using a standard hierarchical menu (drop down menu). Most menu options have a corresponding tool in the Toolbar and Tool Box. Toolbar  The Toolbar provides access to most of the functions found in the menu options bar, plus additional tools for interacting with the map canvas Map Canvas  The Map Canvas is the main part of QGIS – this is where the maps are displayed. The map displayed in the window will depend on the vector and raster layers you have chosen to load Table of Contents  The Table of Contents area lists all the layers in your map project. Click on a check box to turn a layer on or off Exercise 1– Adding Data This exercise will familiarise you with QGIS and allow you to examine the different data types available and how to add them to the map. By completing this exercise, you will learn how to perform the following tasks: Add data to a QGIS project Open and save QGIS projects WE WILL USE THE FOLLOWING DATA FOR THIS EXERCISE: Vector Layer Data 1. C:\Users\user\Downloads\Data 1\Part 1 SA.shp 2. C:\Users\user\Downloads\Data 1\ Part 2 SA.shp 3. C:\Users\user\Downloads\Data 1\provinces2.shp Adding data to QGIS: In order to add data in QGIS, be aware of what data types you are adding, i.e. vector or raster data, or data packaged as an Esri geodatabase. There are separate buttons for various data.  Click the …. button and navigate to: C:\Users\user\Downloads\Data 1\  Click on All files (*) and filter the displayed files by selecting ESRI Shapefiles from the drop down menu  You will only see the files (*.shp) we want to use  Select Part 1 SA.shp and click Open  Click add.  Repeat the process to add Part 2 SA.shp and provinces2.shp  And once more, repeat the process to add the following vector layer to the map: C:\ Users\user\Downloads\Data 1\National roads SA.shp  The result should look something like this: Labelling Features  In addition to changing the style, another way of displaying more information on your map is to use labelling.  You can label the individual features in a layer using any of the attributes relating to that layer  In this section we are going to label the following layer: Provinces2  Right click the Provinces2 vector layer select Properties.  Open the Properties for the layer and go to the Labels tab.  Select the Label tab, in the top option select Single Labels and Label this layer box as below:  Click Text >> you can change font type, size and color of the text  Click OK Saving and Opening QGIS Projects  Once we have some vector and raster layers loaded into our map we need to save it!! Saving our project so that we can come back to it later if we need to.  Locate and press the Save Project button  Save the project as Practice 1  Close QGIS and then open it again  Locate and press the Open Project button  Navigate to the folder that you saved it  Select Practice 1.qgs file  Click Open Symbology:  The symbology of a layer is its visual appearance on the map.  When you add a layer to the map it will be loaded in a default symbology (i.e. colour, line thickness, etc.).  Modifying the default symbology of a layer is a simple task. You can change the symbology inside of QGIS to make the map look the way you want  Different types of symbology options are available in QGIS. :  To change a layer’s symbology, open its Layer Properties by right clicking on the layer Setting transparencies  Right click the Provinces2 vector layer (unselect SA part1 and part 2) >> select Properties  Select Symbology  Select Simple Symbol from the pulldown menu  Select Simple Fill  Select Transparent Fill under the Fill Option  Click OK Line Symbology (Polygon)  Right click the National roads SA vector layer >> select Properties  Select Symbology  Select Simple Symbol from the pulldown menu at the top of the dialog box  Select Simple line/fill  Select the color (i.e. red etc)  Click OK Simple Symbology  Right click the Provinces2 vector layer select Properties  Select Symbology  Select Simple Symbol from the pulldown menu  Select Simple Fill  Select Transparent Fill under the Fill Option/or select any color that you want  Click OK Category Symbology Right click the Provinces2 vector layer select Properties Select Symbology Select Categorized under value, select ’Proviences’ Select Classify Click OK Creating Maps  The following exercise will teach you how to create an output map that can be inserted into reports, posted on web pages, or used for meetings and consultation.  Before you create a map for printing (hardcopy or PDF) you will need to prepare the map layers so they look the way you want them to  The Print Composer is the tool that we use to create an output map. The map can then be used in a document, printed or emailed.  From the toolbar select New Print Composer  Name your new print layout “Output1”  Click Ok  A new window will open.  Before you begin to put anything on the map, the first thing that you need to set is the size of paper the map will be published on. Right click on the Print Canvas and then select Properties Add Map  We will now add the map to the page, keeping in mind not to put anything too close to the edges (printers have margins), and to leave yourself enough room to add all the other elements  Select Add Map tool from the toolbar on the left  Click near the top left corner of the page and drag a box to the bottom right to insert the map  The select/move item tool allows you to select and reposition any element on the Print Canvas,.  To add the title, Select Add Label from the Composer Items Toolbars  Left click on some of the white space at the top of the page and drag the cursor to create a text box  This will add a small text box to the map that you can now update using the Item Properties dialog in the Items Window. Add Legend  We will now add a legend to our map. A legend provides valuable information to help people interpret what a map is showing. Finalizing and Exporting the Map  You now have all the elements that are required for the final output map. You should inspect the map and the elements to see if they need rearranging and to check the map looks good.  Resize and move the various map elements on the page to reduce the amount of white space that is present (you may need to adjust font sizes etc. for the title and the legend)  When the map looks good and displays all the information you need in the best possible way, it is now time to export it.

Use Quizgecko on...
Browser
Browser