Equipping Municipalities with GIS Software

Similar documents
GGR 375 QGIS Tutorial

A Practical Guide to Using QGIS

Lab 3: Digitizing in ArcGIS Pro

Geographical Information Systems Institute. Center for Geographic Analysis, Harvard University. LAB EXERCISE 1: Basic Mapping in ArcMap

City of La Crosse Online Mapping Website Help Document

Introduction to using QGIS for Archaeology and History Workshop by the Empirical Reasoning Center

Press the Plus + key to zoom in. Press the Minus - key to zoom out. Scroll the mouse wheel away from you to zoom in; towards you to zoom out.

4. If you are prompted to enable hardware acceleration to improve performance, click

All data is in Universal Transverse Mercator (UTM) Zone 6 projection, and WGS 84 datum.

Introduction to basic GIS. International Federation of Red Cross and Red Crescent Societies Information Management Team. September 2017 Version 1.

Introduction to SAGA GIS

Introduction to GIS A Journey Through Gale Crater

Mn/DOT MnCMAT Crash Analysis Application Help

Session 7 MS Word. Graphics. Inserting Clipart, and Graphics Modify graphics Position graphics

Undo Button Clicking this tool will undo the last action. Clicking on this tool multiple times will undo all subsequent changes that were made.

IntraMaps End User Manual

Fusion. CBR Fusion MLS Level 1 Core Functions. Class Handout

STUDENT PAGES GIS Tutorial Treasure in the Treasure State

StickFont Editor v1.01 User Manual. Copyright 2012 NCPlot Software LLC

INTRODUCTION TO GIS WORKSHOP EXERCISE

_Tutorials. Arcmap. Linking additional files outside from Geodata

Guide to Mapping Website (Public) December 2016 GC_236594

ArcView QuickStart Guide. Contents. The ArcView Screen. Elements of an ArcView Project. Creating an ArcView Project. Adding Themes to Views

OnCOR Silverlight Viewer Guide

Exercise 1: An Overview of ArcMap and ArcCatalog

Adobe illustrator Introduction

Welcome to MicroStation

1. Start ArcMap by going to the Start menu > All Programs > ArcGIS > ArcMap.

QGIS Tutorials Documentation

Quick Guide to MapWindow GIS Desktop Application

How to...create a Video VBOX Gauge in Inkscape. So you want to create your own gauge? How about a transparent background for those text elements?

for ArcSketch Version 1.1 ArcSketch is a sample extension to ArcGIS. It works with ArcGIS 9.1

Creating and editing vector maps

RAPIDMAP Geocortex HTML5 Viewer Manual

Greater Bridgeport Regional Council Municipal GIS Viewer Training April 2015

Tutorial 01 Quick Start Tutorial

In this lesson, you ll learn how to:

Managing Content with AutoCAD DesignCenter

Numbers Basics Website:

Map Preparation. Using QGIS

To the GeoView System Overview Online Training Course

Using Syracuse Community Geography s MapSyracuse

Greenville County Internet Mapping System User s Guide

GIS Basics for Urban Studies

ArcGIS. Desktop. A Selection of Time-Saving Tips and Shortcuts

Using Spatial Data in a Desktop GIS; QGIS 2.8 Practical 2

Introduction to Microsoft Office PowerPoint 2010

Chapter 6. Building Maps with ArcGIS Online

Building Vector Layers

Tutorial 1 Exploring ArcGIS

Lab 6: Transforming Spatial Data

Explore some of the new functionality in ArcMap 10

QUANTUM GIS GUIDE FOR WASH FACILITY DATA COLLECTORS AND -MANAGERS

Graphic Design & Digital Photography. Photoshop Basics: Working With Selection.

CHAPTER 1 COPYRIGHTED MATERIAL. Getting to Know AutoCAD. Opening a new drawing. Getting familiar with the AutoCAD and AutoCAD LT Graphics windows

In this exercise, you will convert labels into geodatabase annotation so you can edit the text features.

Development Authority of the North Country (DANC) Internet Mapping Application Instructions Public Viewer 1. Purpose. 2. Logging-in. 3.

City of Richmond Interactive Map (RIM) User Guide for the Public

Page 1 of 16 CONTENTS:

MAPLOGIC CORPORATION. GIS Software Solutions. Getting Started. With MapLogic Layout Manager

ArcGIS. for Desktop. Tips and Shortcuts 10.1

ArcGIS. ArcGIS Desktop. Tips and Shortcuts

CS Multimedia and Communications REMEMBER TO BRING YOUR MEMORY STICK TO EVERY LAB! Lab 02: Introduction to Photoshop Part 1

Quick Guide for Photoshop CC Basics April 2016 Training:

Exercise 03 Creating and Editing Shapefiles Assigned Feb. 2, 2018 Due Feb. 9, 2018

User Manual Version 1.1 January 2015

ENVI Tutorial: Introduction to ENVI

Welcome to the Surface Water Data Viewer!

Juniata County, Pennsylvania

Introduction to GIS & Mapping: ArcGIS Desktop

QUICK START GUIDE. SOLO Forest

GIS DATA SUBMISSION USER GUIDE. Innovation and Networks Executive Agency

Chapter 1 : Getting Started with Integrity... Chapter 2 : Interface Layout... Chapter 3 : Navigation... Chapter 4 : Printing...

Low Cost and Free Public Health Mapping Tools

Biodiversity GIS (BGIS) Internet Mapping User Guide

PowerPoint 2016 Building a Presentation

Exercise 2.2. Explore QGIS. GIS Techniques for Monitoring and Evaluation of HIV/AIDS and Related Programs

On the Web sun.com/aboutsun/comm_invest STAROFFICE 8 DRAW

HYPERSTUDIO TOOLS. THE GRAPHIC TOOL Use this tool to select graphics to edit. SPRAY PAINT CAN Scatter lots of tiny dots with this tool.

v Getting Started An introduction to GMS GMS Tutorials Time minutes Prerequisite Tutorials None

The Fundamentals. Document Basics

3. Map Overlay and Digitizing

Open Source Cloud Map User Guide

Each primary search has an auto-fill that will filter out results as the user continues to type.

ENVI Classic Tutorial: Introduction to ENVI Classic 2

BASICS OF MOTIONSTUDIO

ArcGIS. ArcGIS Desktop. Tips and Shortcuts

ENVI Tutorial: Map Composition

Starting the QGIS Program. Exercise 1: Exploring QGIS

SPATIAL DESIGN NETWORK ANALYSIS sdna in QGIS

for secondary school teachers & administrators

GIS Change Requests: Web Base change requests will replace MSAG Update paper form.

Using Microsoft Word. Text Editing

GSSHA WMS Basics Loading DEMs, Contour Options, Images, and Projection Systems

v Introduction to WMS WMS 11.0 Tutorial Become familiar with the WMS interface Prerequisite Tutorials None Required Components Data Map

Advanced Special Effects

The American University in Cairo. Academic Computing Services. Word prepared by. Soumaia Ahmed Al Ayyat

Let s Make a Front Panel using FrontCAD

v Annotation Tools GMS 10.4 Tutorial Use scale bars, North arrows, floating images, text boxes, lines, arrows, circles/ovals, and rectangles.

Launch QGIS. Launch QGIS from. Open window Quantum GIS (Figure 1.1 below) Start All Programs Quantum GIS. QGISIcon on the desk top

Transcription:

Equipping Municipalities with GIS Software Tutorial for QGIS 2.2 Prepared by Aylo Engineering s.a.r.l. 25/05/2014 www.ayloengineering.com

Overview Welcome to the wonderful world of Geographical Information Systems (GIS)! Quantum GIS, also known as QGIS, is an open source GIS desktop application. QGIS is FREE and has many plugins, adding different functions. The software is updated on a regular basis and it is up to the users to update their software so they can benefit from the new functionalities and tools. This tutorial is for beginner users and it was prepared to train municipality workers under the project Equipping Municipalities with GIS software USAID/BALADI PLUS. It was prepared using material from QGIS User Guide. www.ayloengineering.com 2

Part 1 www.ayloengineering.com 3

Table of Contents 1. Installation of QGIS software... 5 2. Introduction to QGIS... 8 3 Type of GIS Data... 16 4 Projection Systems in QGIS... 23 5 Measuring:... 29 6 Select and deselect features... 30 7 Attribute table... 30 8 Symbology... 32 9 Output... 36 10 Practice Exercise 1... 39 www.ayloengineering.com 4

1. Installation of QGIS software Installation of QGIS is very simple. You can get the latest software version from the QGIS website at http://download.qgis.org. Choose QGIS Standalone Installer Version 2.x (32 bit) if you have Windows 32 bit version on your computer or QGIS Standalone Installer Version 2.x (64 bit) if you have Windows 64 bit version on your computer. If in doubt about your version of Windows, please refer to your computer specialist, or ask the trainers. You can also install QGIS 2.2 from the USB provided with this tutorial. Browse to the setup file: o QGIS-OSGeo4W-2.2.0-1-Setup-x86 for Windows 32 bit o QGIS-OSGeo4W-2.2.0-1-Setup-x86_64 for Windows 64 bit Double click You will get Figure 1 Click next You will get Figure 2 Click I Agree to agree on the software license You will get Figure 3 Browse to choose the location to install the software to then click Next Choose QGIS, then click Install The Installation will start as shown in Figure 5 Once it is done Figure 6 will appear Click Finish Now the QGIS software is ready to be used and 2 shortcuts for the software are created on the desktop as shown in Figure 7 Figure 1 Setup Page 1 www.ayloengineering.com 5

Figure 2 Setup Page 2 Figure 3 Setup Page 3 www.ayloengineering.com 6

Figure 4 Setup Page 4 Figure 5 Setup Page 5 www.ayloengineering.com 7

Figure 6 Setup Page 6 Figure 7 Shortcuts of QGIS 2.2.0 2. Introduction to QGIS The state of your QGIS session is considered a project. QGIS works on one project at a time. To create a new project Project New To save a new project Project Save as To open an existing project Project Open To save an existing project Project Save 2.1 Exercise 1: Create a new project 1. Double click your QGIS Desktop shortcut to open the software 2. Choose Project Save as www.ayloengineering.com 8

3. Browse to the location where you want to save your project. In this Tutorial we will save all the Exercise result in the Tutorial folder Exercise# folder 4. Choose a name for your project. We will name it Exercise1 5. Click Save and your project will be saved 2.2 QGIS GUI When QGIS starts, you are presented with the GUI (Graphical User Interface) and it is divided into five areas as shown in Figure 8: Menu Bar (1) Tool Bar (2) Map Legend (3) Map View (4) Status Bar (5) 1 2 3 4 5 Figure 8 QGIS GUI 2.2.1 Menu Bar The menu bar provides access to various QGIS features using a standard hierarchical menu. The toplevel menus and a summary of some of the menu options are listed below, together with the associated icons as they appear on the toolbar, and keyboard shortcuts. The shortcuts presented in this section are the defaults; however, keyboard shortcuts can also be configured manually using the Configure shortcuts dialog, opened from Settings Configure - Shortcuts... www.ayloengineering.com 9

2.2.1.1 Project 2.2.1.2 Edit www.ayloengineering.com 10

2.2.1.3 View 2.2.1.4 Layer www.ayloengineering.com 11

2.2.1.5 Settings 2.2.1.6 Plugins www.ayloengineering.com 12

2.2.1.7 Vector 2.2.1.8 Raster 2.2.1.9 Processing 2.2.1.10 Help www.ayloengineering.com 13

2.2.2 Toolbar The toolbar provides access to most of the same functions as the menus, plus additional tools for interacting with the map. Each toolbar item has pop-up help available. Hold your mouse over the item and a short description of the tool s purpose will be displayed. Every menu bar can be moved around according to your needs. Additionally, every menu bar can be switched off using your right mouse button context menu, holding the mouse over the toolbars. 2.2.3 Map Legend The map legend area lists all the layers in the project. The checkbox in each legend entry can be used to show or hide the layer. A layer can be selected and dragged up or down in the legend to change the Z- ordering. Z-ordering means that layers listed nearer the top of the legend are drawn over layers listed lower down in the legend. 2.2.4 Map View The map displayed in this window will depend on the vector and raster layers you have chosen to load. The map view can be panned, shifting the focus of the map display to another region, and it can be zoomed in and out. Various other operations can be performed on the map as described in the toolbar description above. The map view and the legend are tightly bound to each other; the maps in view reflect changes you make in the legend area. 2.2.5 Status Bar The status bar shows you, your current position in map coordinates (e.g., meters or decimal degrees) as the mouse pointer is moved across the map view. To the left of the coordinate display in the status bar is a small button that will toggle between showing coordinate position or the view extents of the map view as you pan and zoom in and out. Next to the coordinate display you will find the scale display. It shows the scale of the map view. If you zoom in or out, QGIS shows you the current scale. There is a scale selector, which allows you to choose between predefined scales from 1:500 to 1:1000000. A progress bar in the status bar shows the progress of rendering as each layer is drawn to the map view. In some cases, such as the gathering of statistics in raster layers, the progress bar will be used to show the status of lengthy operations. To the right of the render functions, you find the EPSG code of the current project CRS and a projector icon. 2.3 Zoom Zooming the Map with the Mouse Wheel: You can use the mouse wheel to zoom in and out on the map. Place the mouse cursor inside the map area and roll the wheel forward (away from www.ayloengineering.com 14

you) to zoom in and backwards (towards you) to zoom out. The zoom is centered on the mouse cursor position. Zoom Full : Use this icon from the toolbar to zoom to all layer or View Zoom Full or Ctrl+Shift+F Zoom in: Use this icon from the toolbar to zoom in or View Zoom in or Ctrl ++ Zoom out: Use this icon from the toolbar to zoom out or View Zoom out or Ctrl+- 2.4 Pan Panning the Map with the Arrow Keys and Space Bar: You can use the arrow keys to pan the map. Place the mouse cursor inside the map area and click on the right arrow key to pan east, left arrow key to pan west, up arrow key to pan north and down arrow key to pan south. You can also pan the map using the space bar or by clicking on the mouse wheel: just move the mouse while holding down the space bar or click on the mouse wheel. Pan Map: Use this icon from the toolbar to pan or View Pan map 2.5 Identify Feature The Identify tool allows you to interact with the map canvas and get information on features in a pop-up window. To identify features, use View Identify features or press Ctrl + Shift + I, or click on the Identify features icon in the toolbar. Figure 9 Identify Feature Tool 2.6 Exercise 2: Look around! 1. Open the project demo.qgs from the folder Exercise_2 by using Project Open 2. You can see an example of a project with vector data www.ayloengineering.com 15

3. Try to pan the map using the mouse wheel 4. Try to zoom to the map using the mouse wheel 5. Try to pan the map using View Pan map 6. you can use the hand from toolbar to pan 7. you can use Zoom in & Zoom out to zoom to the map 8. you can use Zoom Full from the toolbar to expand to all the layers or from the menu bar View Zoom Full 9. Try to move the mouse inside the map view and look down right of the status bar. You can see the coordinate changing, the scale of your zoom, and at the right of the toolbar the coordinate system 10. Change the scale of the map to 1/10000 by using the status bar 11. Use the identify feature tool to get information about any parcel. Use View Identify Features or the identify features icon from the toolbar. 3 Type of GIS Data GIS data are divided to spatial and non-spatial data. There are two types of GIS spatial data (Vector and Raster). 3.1 Vector Data Vector data uses the point (vertex) as the base geometry. There are 3 types of vectors: A point is defined by its position in X and Y (and Z when available)(see Figure 10) A line is a sequence of points (vertices) linked together (See Figure 11) A polygon is a sequence of linked lines where the first and last points are the same (See Figure 12) Figure 10 Point Figure 11 Line www.ayloengineering.com 16

Example of feature that can be represented by a vector: Figure 12 Polygon Point: Electrical Pole, Billboard, Line: Road, Sewage Network, Polygon: Parcel, Building, 3.1.1 Add Vector data To load a vector data, click on window showing in Figure13. toolbar button, or simply press Ctrl+Shift+V. This will bring up a new Figure 13 Add Vector Layer Dialog From the available options check File. Click on [Browse] button. This will bring up a standard open file dialog shown in Figure 14, which allows you to navigate the file system and load a shapefile or other supported data source. So the shapefile should be selected on the open file dialog and by clicking [Open] button on the two dialogs the file will be loaded on the QGIS map view. www.ayloengineering.com 17

Figure 14 Open File Dialog When you add a layer to the map, it is assigned a random color. When adding more than one layer at a time, different colors are assigned to each layer. 3.1.2 Single Symbol Renderer The Single Symbol Renderer is used to render all features of the layer using a single user-defined symbol. The properties, which can be reached by right clicking any layer then clicking Style menu, depend partially on the type of layer, but all types share the following dialog structure. In the top-left part of the menu, there is a preview of the current symbol to be rendered. The style menu is shown in Figure 15. On the right part of the menu, there is a list of symbols already defined for the current style, prepared to be used by selecting them from the list. The current symbol can be modified using the menu on the right side. If you click on the first level in the Symbol layers dialog on the left side, it s possible to define basic parameters like Size, Transparency, Color and Rotation. www.ayloengineering.com 18

Figure 15 Single Symbol Properties More detailed settings can be made when clicking on the second level in the Symbol layers dialog. You can define Symbol layers that are combined afterwards. A symbol can consist of several Symbol layers. The following settings are possible: Point layers: Symbol layer type: You have the option to use Ellipse markers, Font markers, Simple markers, SVG markers and Vector Field markers. Colors Size Outline style Outline width Line layers: Symbol layer type: Here you can use Simple Lines and Marker Lines. Color Pen width Offset Pen style.. Polygon Layers: Symbol layer type: It s possible to use Centroid Fill, Gradient Fill, Line Pattern Fill, Point Pattern Fill, SVG Fill, Simple Fill and two Outlines (Marker line and Simple line). Colors Fill style Border style Border width www.ayloengineering.com 19

.. 3.1.3 Exercise 3: Vector Data 1. Create a new QGIS project and save it in the folder Exercise_3 under the name Exercise_3 2. Use this icon to add vector data 3. Browse to the location of tutorial folder/exercise_3 4. Choose parcel_demo.shp 5. Click [Open] button from the open file dialog 6. Click [Open] button from Add vector layer dialog 7. Repeat steps 2 to 6 to load road_demo.shp 8. Repeat steps 2 to 6 to load lp_demo.shp 9. Use identify tool on those layers 10. Change the symbology of the 3 layers to match Figure 16 11. Caution: You can drag up the lp_demo to change the layers order. Also you can turn on and off layers by clicking the X before the layer name in the map legend 12. Save your project Figure 16 Result of Exercise 3 3.2 Raster Data Raster is an image Raster data is a grid of equally sized cells or pixels (picture element) A raster dataset is characterized by the cell size, also called raster resolution Each pixel in a raster dataset holds a data value Example of raster data: Satellite image Aerial photo DEM (Digital Elevation model) www.ayloengineering.com 20

3.2.1 Load Raster Data Raster layers are loaded either by clicking on the Add Raster Layer icon or by selecting the Layer Add Raster Layer menu option or Ctrl+Shift+R. More than one layer can be loaded at the same time by holding down the Ctrl or Shift key and clicking on multiple items in the Open a GDAL Supported Raster Data Source dialog. Once a raster layer is loaded in the map legend, you can click on the layer name with the right mouse button to select and activate layer-specific features or to open a dialog to set raster properties for the layer. Right mouse button menu for raster layers Zoom to Layer Extent Zoom to Best Scale (100%) Stretch Using Current Extent Show in Overview Remove Duplicate. 3.2.2 General The General menu displays basic information about the selected raster, including the layer source path, the display name in the legend (which can be modified), and the number of columns, rows and no-data values of the raster. Right click the raster name from the map legend and choose properties to open the layer properties menu. Figure 17 Layer Properties (General tab) www.ayloengineering.com 21

3.2.3 Raster Style The Brightness, the Saturation and the Contrast can be modified in the style menu. You can also use a Grayscale option, where you can choose between By lightness, By luminosity and By average. For one hue in the color table, you can modify the Strength. Figure 18 Layer Properties (Style tab) QGIS has the ability to display each raster layer at a different transparency level. Click on the Transparency tab on the left side of the window then use the transparency slider to indicate to what extent the underlying layers (if any) should be visible though the current raster layer. This is very useful if you like to overlay more than one raster layer. 3.2.4 Exercise 4: Raster Data 1. Open the project Exercise3.qgs from the folder Exercise_3 by using Project Open 2. Use this icon to add raster data or Layer Add Raster Layer or Ctrl+Shift+R 3. Browse to the location of tutorial folder/exercise_4 4. Choose raster_demo.tif 5. Click [Open] button from the open file dialog 6. Click [Open] button from Add vector layer dialog 7. Zoom to layer extent 8. Change the symbology of the layer parcel_demo by choosing Fill style: No Brush 9. Caution: Always change the order of layers so they can be visible 10. Right click on raster_demo.tif and choose properties 11. Change the Brightness from the Style tab 12. Change the global transparency from the transparency tab www.ayloengineering.com 22

13. Save your project 4 Projection Systems in QGIS A Coordinate Reference System (CRS) combines the definition of the projection, its parameters and the parameters defining the shape of the earth (ellipsoid). In Lebanon, we use a CRS combining the stereographic projection and the Clarke 1880 ellipsoid while other countries use different CRSs. GPS devices define a position by providing Latitude and Longitude referred to an ellipsoid called WGS84. WGS84 is different than Clarke 1880. When creating a new project in QGIS, the default CRS (Coordinate Reference System) is assigned to this project. The default CRS after installing QGIS is WGS84, a geographic coordinate system using Latitude and Longitude for positions. Exercise 5 1. In Exercise1, we created a QGIS project. Open this project and look to the bottom right of the screen (Figure 19). Figure 19 Status Bar 2. You see EPSG:4326. This is the CRS set for this project. 3. Click on the globe icon. You will see the Project Properties CRS window. Next to Selected CRS, you will see WGS84 (Figure 20) Figure 20 Project Properties www.ayloengineering.com 23

4. Now open the demo.qgs file used in Exercise2 and look at the bottom of the screen (Figure 21) Figure 21 Status Bar 5. We see EPSG:22780 which is different from what we saw in the previous example. Click on the globe icon (Figure 22). Figure 22 Project Properties 6. Next to Selected CRS you will see Deir ez Zor / Levant Stereographic. 7. What we saw are two QGIS project files using two different CRSs. When you mix your data (cadastral, roads, buildings ) with data from other sources (mainly GPS), the features should line up. In order to ensure they do, we have created a CRS for your municipal area. Exercise 6 In this exercise, we will set the default CRS for new projects and layers that are loaded or created. We will use the CRS specifically defined for your municipality. 1. Make sure the QGIS software is open. 2. Click on Settings on the menu bar, then on Options. 3. You will see the Options window (Figure 23). www.ayloengineering.com 24

4. Click on CRS on the left side of the window Figure 23 Options/General Figure 24 Options/CRS www.ayloengineering.com 25

5. Under "Default CRS for new projects", click the "Select..." button. 6. Type in the "Filter" box "lebanon". You will see under "Coordinate reference systems of the world" a list of CRSs with the word Lebanon in them. One of the CRSs is called "Lebanon xxxxx Stereographic". (Replace xxxxx with the name of your area) 7. Select "Lebanon xxxxx Stereographic" and click "OK" button. 8. We have now set the Default CRS for new projects 9. Now under "CRS for new layers" click the "Select..." button. 10. Repeat steps 6 & 7 11. Make sure the settings are as in the image. Note that the number in the CRS name might be different on your computer. 12. Press OK. Figure 25 Options/CRS To better understand the effects of a wrong CRS definition in a dataset, we will do the following exercise 7. Exercise 7 1. Go to the folder Exercise_5 and open CRS_demo.qgs 2. You will see the parcels and road data we saw in the previous exercises. 3. Now we will add a Shapefile to the QGIS project. Click on add vector layer icon in the toolbar www.ayloengineering.com 26

4. Browse to the Exercise_5 folder and select CRS_demo.shp and click OK, then click OK on the next dialog. 5. You see that nothing happened. In the layers window, right-click on CRS_demo (Figure 26). Figure 26 Layers 6. You will see the layer properties dialog. Look at the Coordinate Reference System (Figure 27). What does it show? Figure 27 Layer Properties/crs_demo 7. We need to change the CRS of this file to match that of the other data in the QGIS project. Click on Specify and select Deir Ez Zor/Levant Stereographic. Then click OK and then OK again. You see that the points now are exactly where they should be. You can see now that the problem was a wrong CRS definition for this shapefile. But every time you add this Shapefile to a QGIS project, you will have to go through the same steps to change the CRS. Close QGIS now without saving the file. www.ayloengineering.com 27

8. In order to define the correct CRS for the crs_demo.shp file and make this definition permanent, we will use QGIS Browser. On your desktop, click on the QGIS Browser icon. Figure 28 QGIS Browser 9. Navigate to the folder where the exercise data is located and go to Exercise_5. Click on crs_demo.shp. You will see on the right side some textual information about the shapefile. 10. Scroll to the bottom of the right side of the browser window and look under Layer Spatial Reference System. 11. Click on Set layer CRS 12. Select from the list Deir Ez Zor/Levant Stereographic and click OK. 13. Click on any other file and click again on crs_demo.shp and look again at right side of the browser window under Layer Spatial Reference System. You will see that the text has changed. (Don t worry about the significance of what is written here). 14. Now repeat steps 1 to 4 and you will see that the points will fall exactly where they should be thanks to the permanent change we ve made to the crs_demo.shp www.ayloengineering.com 28

5 Measuring: Measuring works within projected coordinate systems (e.g., Stereographic, UTM) and unprojected data. If the loaded map is defined with a geographic coordinate system (latitude/longitude), the results from line or area measurements will be incorrect. To fix this, you need to set an appropriate map coordinate system. This is useful, if you want to measure along lines or areas in vector layers. To select a measuring tool, click on the black down arrow and select the tool you want to use: : QGIS is able to measure real distances between given points according to a defined ellipsoid. To configure this, choose menu option Settings Options, click on the Map tools tab and select the appropriate ellipsoid. There, you can also define a rubberband color and your preferred measurement units (meters or feet) and angle units (degrees, radians and gon). The tool then allows you to click points on the map. Each segment length, as well as the total, shows up in the measure window. To stop measuring, click your right mouse button. : Areas can also be measured. In the measure window, the accumulated area size appears. In addition, the measuring tool will snap to the currently selected layer, provided that layer has its snapping tolerance set. So, if you want to measure exactly along a line feature, or around a polygon feature, first set its snapping tolerance then select the layer. Now, when using the measuring tools, each mouse click (within the tolerance setting) will snap to that layer. : You can also measure angles. The cursor becomes cross-shaped. Click to draw the first segment of the angle you wish to measure, then move the cursor to draw the desired angle. The measure is displayed in a pop-up dialog. Figure 29 Measure Window www.ayloengineering.com 29

6 Select and deselect features The QGIS toolbar provides several tools to select features in the map canvas. To select one or several features, just click on and select your tool: Select Single Feature Select Features by Rectangle Select Features by Polygon Select Features by Freehand Select Features by Radius To deselect all selected features click on Deselect features from all layers 7 Attribute table The attribute table displays features of a selected layer. Each row in the table represents one map feature, and each column contains a particular piece of information about the feature. Features in the table can be searched, selected, moved or even edited. To open the attribute table for a vector layer, make the layer active by clicking on it in the map legend area. Then, from the main Layer menu, choose Open Attribute Table. It is also possible to right click on the layer and choose Open Attribute Table from the drop-down menu, and to click on the toolbar. Open Attribute Table button in the Attributes Attributes are text or numerical data (non-spatial) that describe a geographic feature Attributes allow the map to become alive with colors and symbols Without attribute data, the map would give very little information Attributes for a vector feature are stored in a table Field Each column in the table is called a field Each row in the table is a record Record Figure 30 Attribute Table www.ayloengineering.com 30

7.1 Attribute data types: Nominal : attributes serve to identify or distinguish a feature from another: parcel number, street name Ordinal: attributes are used for comparison Interval: attributes are used when the difference between values makes sense Ratio: is used when arithmetic functions can be performed on values 7.2 Selecting Features in an Attribute Table Each selected row in the attribute table displays the attributes of a selected feature in the layer. If the set of features selected in the main window is changed, the selection is also updated in the attribute table. Likewise, if the set of rows selected in the attribute table is changed, the set of features selected in the main window will be updated. Rows can be selected by clicking on the row number on the left side of the row. Multiple rows can be marked by holding the Ctrl key. A continuous selection can be made by holding the Shift key and clicking on several row headers on the left side of the rows. All rows between the current cursor position and the clicked row are selected. Moving the cursor position in the attribute table, by clicking a cell in the table, does not change the row selection. Changing the selection in the main canvas does not move the cursor position in the attribute table. The table can be sorted by any column, by clicking on the column header. A small arrow indicates the sort order (downward pointing means descending values from the top row down, upward pointing means ascending values from the top row down). For a simple search by attributes on only one column, choose the Column filter from the menu in the bottom left corner. Select the field (column) on which the search should be performed from the dropdown menu, and hit the [Apply] button. Then, only the matching features are shown in the attribute table. To make a selection, you have to use the Select feature using an expression icon on top of the attribute table. You can also use the Function list Recent (Selection) to make a selection that you used before. The expression builder remembers the last 20 used expressions. Exercise 8: 1. Open demo.qgs from the folder Exercise_2 2. Open the attribute table by right clicking the layer name in the map legend 3. Select the parcel number 32 by clicking on the number near the record of parcel 32 4. Use zoom maps to zoom to the selected record www.ayloengineering.com 31

5. Use measure area from the toolbar to measure the area of the parcel number 32 6. Now use to deselect features from all the layer 7. Use the select feature using an expression to select the entire feature in zone A. The select by expression should look like Figure 31. 8. Expand the Fields and Values tab and select zone. 9. Click [all unique] button from the right side 10. Pick A from the field values Figure 31 Select By Expression 8 Symbology 8.1 Categorized Renderer The Categorized Renderer is used to render all features from a layer, using a single user-defined symbol whose color reflects the value of a selected feature s attribute. The Style menu allows you to select: The attribute (using the Column listbox or the Set column expression function) The symbol (using the Symbol dialog) The colors (using the Color Ramp listbox) The [Advanced] button in the lower-right corner of the dialog allows you to set the fields containing rotation and size scale information. For convenience, the center of the menu lists the values of all currently selected attributes together, including the symbols that will be rendered. You can create a custom color ramp choosing New color ramp... from the Color ramp drop-down menu. A dialog will prompt for the ramp type: Gradient, Random, ColorBrewer, or cpt-city. www.ayloengineering.com 32

Figure 32 Layer Properties-Categorized Style 8.2 Graduated Renderer The Graduated Renderer is used to render all the features from a layer, using a single user-defined symbol whose color reflects the assignment of a selected feature s attribute to a class. Like the Categorized Renderer, the Graduated Renderer allows you to define rotation and size scale from specified columns. Also, analogous to the Categorized Renderer, the Style tab allows you to select: The attribute (using the Column listbox or the Set column expression function) The symbol (using the Symbol Properties button) The colors (using the Color Ramp list) Additionally, you can specify the number of classes and also the mode for classifying features within the classes (using the Mode list). The available modes are: Equal Interval Quantile Natural Breaks (Jenks) Standard Deviation Pretty Breaks www.ayloengineering.com 33

Figure 33 Layer Properties-Graduated Style 8.3 Rule-based rendering The Rule-based Renderer is used to render all the features from a layer, using rule based symbols whose color reflects the assignment of a selected feature s attribute to a class. The rules are based on SQL statements. The dialog allows rule grouping by filter or scale, and you can decide if you want to enable symbol levels or use only the first-matched rule. To create a rule, activate an existing row by doubleclicking on it, or click on + and click on the new rule. Figure 34 Layer Properties-Rule-based www.ayloengineering.com 34

Rule properties dialog, you can define a label for the rule. Press the button to open the expression string builder. In the Function List, click on Fields and Values to view all attributes of the attribute table to be searched. To add an attribute to the field calculator Expression field, double click its name in the Fields and Values list. Generally, you can use the various fields, values and functions to construct the calculation expression. You can create a new rule by copying and pasting an existing rule with the right mouse button. Figure 35 Rule Properties Figure 36 Expression string builder www.ayloengineering.com 35

8.4 Point displacement The Point Displacement Renderer works to visualize all features of a point layer, even if they have the same location. To do this, the symbols of the points are placed on a displacement circle around a center symbol. 8.5 Exercise 9 1. Open demo.qgs from the folder Exercise_2 2. Open the layer properties by right clicking on the layer parcel_demo 3. Go to style tab 4. Choose Categorized from the drop down menu in place of Single Symbol 5. Choose from the drop down menu Zone 6. Click [Classify] button 7. You can change the color of each class or the color ramp 8. Save your file 9 Output There are several ways to generate output from your QGIS session. We have discussed one already in section Projects, saving as a project file. Here is a sampling of other ways to produce output files: Menu option Project Save as Image opens a file dialog where you select the name, path and type of image (PNG or JPG format). Menu option Project New Print Composer opens a dialog where you can layout and print the current map canvas (We will explain it later on). Also you can add decorations to your map view. 9.1 Grid allows you to add a coordinate grid and coordinate annotations to the map canvas Select from menu View Decorations Grid. The dialog starts (Figure 37) Activate the Enable grid checkbox and set grid definitions according to the layers loaded in the map canvas Activate the Draw annotations checkbox and set annotation definitions according to the layers loaded in the map canvas Click [Apply] to verify that it looks as expected Click [OK] to close the dialog www.ayloengineering.com 36

Figure 37 Grid Dialog 9.2 Copyright Label Copyright label adds a copyright label using the text you prefer to the map. Select from menu View Decorations Copyright Label. The dialog starts (Figure 38) Enter the text you want to place on the map (type to display ) Choose the placement of the label from the Placement combo box Make sure the Enable Copyright Label checkbox is checked Click [OK] Figure 38 Copyright label decoration www.ayloengineering.com 37

9.3 North Arrow places a simple north arrow on the map canvas. There is only one style available. You can adjust the angle of the arrow or let QGIS set the direction automatically. If you choose to let QGIS determine the direction, it makes its best guess as to how the arrow should be oriented. For placement of the arrow, you have four options, corresponding to the four corners of the map canvas. Select from menu View Decorations North Arrow. The dialog starts (Figure 39) Select Placement Make sure the Enable North Arrow checkbox is checked Click [OK] 9.4 Scale Bar Figure 39 North Arrow Decoration adds a simple scale bar to the map canvas. You can control the style and placement, as well as the labeling of the bar. QGIS only supports displaying the scale in the same units as your map frame. So if the units of your layers are in meters, you can t create a scale bar in feet. Likewise, if you are using decimal degrees, you can t create a scale bar to display distance in meters. To add a scale bar: Select from menu View Decorations Scale Bar. The dialog starts (Figure 40) Choose the placement from the Placement combo box Choose the style from the Scale bar style combo box Select the color for the bar Color of bar or use the default black color Set the size of the bar and its label Size of bar Make sure the Enable scale bar checkbox is checked Optionally, check Automatically snap to round number on resize Click [OK] www.ayloengineering.com 38

Figure 40 When you save a.qgs project, any changes you have made to Grid, North Arrow, Scale Bar and Copyright will be saved in the project and restored the next time you load the project. 9.5 Exercise 10 1. Open Exercise2.qgs from folder Exercise_2 2. Create a map with scale bar, north arrow, name of the municipality and grid 3. Save your map as image in the same folder 10 Practice Exercise 1 1. For this Exercise use the folder Practice_Exercise1 to save all your results 2. Open a new project and name it PracticeExercise1 3. Use the data in the folder Practice_Exercise1 to add the data of your municipality to your project 4. Create a map with decorations that show the parcels and roads of your municipality area 5. Create a map with decorations that show all the parcel with a surface greater than 5000 m 2 6. Create a map that classifies parcels by intervals of 1000 m 2 of surface 7. Create a map that has the satellite image as background (Caution: be careful about the projection) www.ayloengineering.com 39

Part 2 www.ayloengineering.com 40

Table of Contents 11 Creating vector data files... 42 12 Snapping tolerance... 45 13 Digitizing an existing layer... 46 44 Editing... 48 15 Field Calculation... 53 16 Practice Exercise 2:... 61 www.ayloengineering.com 41

11 Creating vector data files Vector data are stored in shapefiles. A shapefile consists of several files having the same name but with differing extensions. In the following figure, you see several files with parcel_demo as the name (the part highlighted in yellow). The last three characters are the file extension. All these files form the shapefile. In this figure, we see the Add vector layer in QGIS. We see three files with different names. Each of these three files is a shapefile but we only see the file with shp extension. The data that you use has to come from somewhere. For most common applications, the data exists already; but if the data is not already available, you ll need to create your own new data. Before you create new data, you need a data container for it, a vector dataset. We ll create next a new vector dataset in the form of a shapefile. Exercise 11: Create a new shapefile 1. Click on the menu Layer New New Shapefile Layer. You can also click on the icon 2. You ll see the following dialog: www.ayloengineering.com 42

Note: It s important to decide which kind of dataset you want at this stage: point, line polygon. Once you ve created the layer, you can t change its type. 3. For this exercise, we re going to be creating new features which describe zoning areas. For such features, you ll need to create a polygon dataset. Click on the Polygon radio button: 4. Verify that the specified CRS corresponds to the one used in your municipal area. 5. Next there is a collection of fields grouped under "New attribute". By default, a new layer has only one attribute, the id field. However, in order for the data you create to be useful, you actually need to say something about the features you ll be creating in this new layer. We will create a field called Zone_name. The field will be of the Text data type. In the Width field, type 3. This means that the Zone_name field can take a maximum of three characters. Make sure the dialog box looks like the one below and press Add to attributes list. We need to remember that once a field is created, it cannot be changed. So careful consideration should be taken before choosing the name, the data type and the width and precision for decimal numbers. www.ayloengineering.com 43

6. Next, we ll create an attribute for the surface exploitation. Under New attribute, type surface_ex. Select Whole number from Type and key in 2 in Width and press Add to attributes list. A whole number is a number without decimals. We chose for the width 2 characters as the surface exploitation is expressed in percent, with a maximum of 99 percent. Note: a field name can take a maximum of ten characters. 7. In the last field we will add is the number of allowed floors. Type Max_floors, choose Whole numbers and type 4 in the Width field. 8. Verify that all the fields are added with the correct names, data types and width. When satisfied, press OK. You will be presented with the Save As dialogue box. Navigate to your Tutorial folder, choose Exercise_6 folder, and type in the File name field Zoning. There is no need to add the extension as QGIS will handle this. Press OK. The Zoning file will be created and a Zoning layer added to the legend and consequently to the map. 9. Right click on the Zoning layer in the legend and choose properties. When the properties dialog box opens, click on Fields on the left hand side of the window. You should see the following: You can see the fields you created with the data type and the length. Double click in the Alias field on line 2 and type Surface Exploitation. An alias is used to overcome the limitation in the number of characters that define a field name. It gives a more understandable field name when filling in attributes, using the identify button or viewing the attribute table. The alias does not change the field name in the shapefile. 10. Close the dialog box. 11. Open the attribute table of the Zoning layer and look at the field names. What do you see? 12. Close the dialog box. 13. Now you need to create a shapefile and choose the right geometry (point, line or polygon) and the appropriate data type for the fields. Use the information provided below: www.ayloengineering.com 44

The file should be named new_building, and it should have the following fields: parcel_nr : this will hold the parcel number where the building is located floor_nbrs : this will hold the total number of floors of the building appart_nbr : this will hold the total number of apartments in the building. Change the alias of the 3 fields to something more descriptive. 12 Snapping tolerance Snapping tolerance is the distance QGIS uses to search for the closest vertex and/or segment you are trying to connect to when you set a new vertex or move an existing vertex. If you aren t within the snapping tolerance, QGIS will leave the vertex where you release the mouse button, instead of snapping it to an existing vertex and/or segment. The snapping tolerance setting affects all tools that work with tolerance. 1. A general, project-wide snapping tolerance can be defined by choosing Settings Options. In the Digitizing tab, you can select between to vertex, to segment or to vertex and segment as default snap mode. You can also define a default snapping tolerance and a search radius for vertex edits. The tolerance can be set either in map units or in pixels. The advantage of choosing pixels is that the snapping tolerance doesn t have to be changed after zoom operations. 2. A layer-based snapping tolerance can be defined by choosing Settings Snapping options... to enable and adjust snapping mode and tolerance on a layer basis (see the following figure). Note that this layer-based snapping overrides the global snapping option set in the Digitizing tab. So, if you need to edit one layer and snap its vertices to another layer, then enable snapping only on the snap to layer, then decrease the global snapping tolerance to a smaller value. Furthermore, snapping will never occur to a layer that is not checked in the snapping options dialog, regardless of the global snapping tolerance. So be sure to mark the checkbox for those layers that you need to snap to. 12.1 Search radius Search radius is the distance QGIS uses to search for the closest vertex you are trying to move when you click on the map. If you aren t within the search radius, QGIS won t find and select any vertex for editing, and it will pop up an annoying warning to that effect. Snap tolerance and search radius are set in map units or pixels, so you may find you need to experiment to get them set right. If you specify too big of a tolerance, QGIS may snap to the wrong vertex, especially if you are dealing with a www.ayloengineering.com 45

large number of vertices in close proximity. Set search radius too small, and it won t find anything to move. The search radius for vertex edits in layer units can be defined in the Digitizing tab under Settings Options. This is the same place where you define the general, project- wide snapping tolerance. 12.2 Topological editing Besides layer-based snapping options, you can also define topological functionalities in the Snapping options... dialog in the Settings menu. Here, you can define Enable topological editing, and/or for polygon layers, you can activate the column Avoid Int., which avoids intersection of new polygons. 13 Digitizing an existing layer By default, QGIS loads layers read-only. This is a safeguard to avoid accidentally editing a layer if there is a slip of the mouse. However, you can choose to edit any layer as long as the data provider supports it, and the underlying data source is writable (i.e., its files are not read-only). In general, tools for editing vector layers are divided into a digitizing and an advanced digitizing toolbar. You can select and unselect both under Settings Toolbars. Using the basic digitizing tools, you can perform the following functions: All editing sessions start by choosing the Toggle editing option. This can be found in the context menu after right clicking on the legend entry for a given layer. Alternatively, you can use the Toggle Editing Toggle editing button from the digitizing toolbar to start or stop the editing mode. Once the layer is in edit mode, markers will appear at the vertices, and additional tool buttons on the editing toolbar will become available. Caution: Save Regularly. Remember to Save Layer Edits regularly. This will also check that your data source can accept all the changes. 13.1 Adding Features You can use the,, icons on the toolbar to put the QGIS cursor into digitizing mode. www.ayloengineering.com 46

For each feature, you first digitize the geometry, and then enter its attributes. To digitize the geometry, left-click on the map area to create the first point of your new feature. For lines and polygons, keep on left-clicking for each additional point you wish to capture. When you have finished adding points, right-click anywhere on the map area to confirm you have finished entering the geometry of that feature. The attribute window will appear, allowing you to enter the information for the new feature. In the Digitizing menu under the Settings Options menu, you can also activate Suppress attributes popup windows after each created feature and Reuse last entered attribute values. With the Move Feature(s) icon on the toolbar, you can move existing features. Tip: Attribute Value Types For editing, the attribute types are validated during entry. Because of this, it is not possible to enter a text into a number column in the dialog Enter Attribute Values. 13.2 Current Edits This new feature allows the digitization of multiple layers. Choose Save for Selected Layers to save all changes you made in multiple layers. You also have the opportunity to Rollback for Selected Layers, so that the digitization may be withdrawn for all selected layers. If you want to stop editing the selected layers, Cancel for Selected Layer(s) is an easy way. The same functions are available for editing all layers of the project. Exercise 12: Digitizing In this exercise, we will use a satellite image to trace some features. 1. Start by loading the satellite image of your area. It should be in the folder Practice_Exercise_1. 2. Make sure the new_building layer is loaded in your project. 3. In order to begin digitizing, you ll need to enter edit mode. GIS software commonly requires this to prevent you from accidentally editing or deleting important data. Edit mode is switched on or off individually for each layer. 4. To enter edit mode for the new_building layer: Click on the layer new_building in the Layer list to select it. Make sure that the correct layer is selected; otherwise, you ll be editing the wrong layer. Click on the Toggle Editing button. If you can t find this button, check that the Digitizing toolbar is enabled. There should be a check mark next to the View Toolbars Digitizing menu entry. As soon as you are in edit mode, you ll see the digitizing tools are now active: From left to right, they are: Add feature: start digitizing a new feature. www.ayloengineering.com 47

Move Feature(s): move an entire feature around. Node Tool: move only one part of a feature. 5. Click on the Add feature button to begin digitizing some buildings. You ll notice that your mouse cursor has become a crosshair. This allows you to more accurately place the points you ll be digitizing. Remember that even as you re using the digitizing tool, you can zoom in and out on your map by rolling the mouse wheel, and you can pan around by holding down the mouse wheel and dragging around in the map. 6. Look around on the satellite image and locate some buildings. 7. Start digitizing by clicking on a point near a corner of the building. Place more points by clicking on the other corners of the building. If you make a mistake while digitizing, press the Backspace button on your keyboard to delete the last vertex you added. Pressing Backspace another time will delete the points you created in the reverse order they were created, one by one. After placing the last point, right-click to finish drawing the polygon. This will finalize the feature and show you the Attributes dialog. (Note: if you used Alias, your field names might look different). 8. Type the values for the attributes and click OK to store the values. Note: Remember to click on Save Edits regularly while editing. 9. Practice with digitizing more building features and once you re done, click on the Toggle Editing button to turn off editing mode. 14 Editing Exercise13: Editing existing features 1. Create an empty QGIS project and add the vector layer parcel_demo.shp from the folder Exercise3. 2. Enable Editing on the parcel_demo layer. You will see that all the vertices have turned into crosses. www.ayloengineering.com 48

3. Click the move tool. You will notice that the cursor has turned into a cross. 4. Place the mouse cursor over a polygon, click and drag it then release the left mouse button. You will see that the polygon moved on the map. Press Ctrl+Z. This will undo the last edit and bring back the polygon to its original location. 5. Now click the node tool. You will notice that the cursor has turned into a cross. 6. Click on any vertex of the large parcel on the top left of the map. You will see that all the vertices of this polygon turned into squares. 7. Click on the vertex indicated by the arrow in the previous figure and drag. You will see that the vertex changed its position and consequently, the shape of the polygon has changed. 8. Your map should look a bit like the following. www.ayloengineering.com 49

9. Next we will see the effect of the different snapping settings on editing and creating new features. Go to Settings Snapping Options and make sure that the checkbox next to parcel_demo is turned off. Then press OK. 10. Make sure that Editing is still turned on and click on the Add Feature button. 11. Create a parcel next to the one we just edited and avoid leaving gaps between the two polygons. You can see that you have to zoom in very close to every vertex of the existing polygon in order to avoid having gaps. This is not very practical and the results are not good as you will still have some gaps. 12. Click on Select Single Feature from the toolbar and select the parcel you just created. It will turn yellow. 13. Press the delete key on your keyboard. This will have the effect of deleting the selected parcel. 14. Go back to the snapping settings (Step 9) and turn on the checkbox next to parcel_demo. In the tolerance column, type 0.5. We have just enabled snapping on the parcel_demo layer with a tolerance of 0.5m. This means that when your cursor is within 0.5m of either a vertex or a line of a parcel, it will snap to the vertex or the line. 15. Click on Add Feature and repeat Step 11. You will see that when your cursor gets close to an existing parcel s border or vertex, a purple cross appears on the screen. Place your cursor next to a vertex and make sure you see the purple cross and click. Follow the outline of the existing parcel by clicking on the existing vertices and create the new parcel. When done, right click your mouse and fill in the fields on the Attributes dialog box. The new polygon was created with its vertices being exactly at the same position as the ones of the existing parcel. www.ayloengineering.com 50

You might end up with something like the following. BALADI PLUS 16. Now click on the Node tool, click on a vertex shared by the two polygons and drag the cursor. 17. You will see that the shape of one parcel has changed and a gap now exists between the two parcels. 18. Press Ctrl+Z to undo the last edit and go to the Snapping Options. 19. Enable the checkbox next Enable topological editing and click OK. 20. Repeat Step 16. You will see that the vertex has moved but no gaps were created. The two parcels are still adjacent and share the same vertices. www.ayloengineering.com 51

21. Click on Add Feature and move your mouse to the map area. Create a polygon that resembles the one in the following figure. 22. Change the layer style in a way to turn off the fill and have just the polygon borders. 23. Select the polygon you have just created then the one to the right of it. You can see that the two polygons are overlapping. This is not possible in a cadastral map as two parcels cannot overlap. www.ayloengineering.com 52

24. Press Ctrl+Z to undo the last edit and go to Snapping options. Turn on the Avoid Int. checkbox. 25. Repeat Step 21and Step 23. You can see that there is no more overlap between the two parcels. 26. Click on the node tool and click on one of the vertices of the right polygon. You can see that there are two new vertices that were not present before. QGIS handled the creation of these vertices in order avoid gaps and overlaps between the two polygons. 15 Field Calculation The Field Calculator button in the attribute table allows you to perform calculations on the basis of existing attribute values or defined functions, for instance, to calculate length or area of geometry features. The results can be written to a new attribute column, or they can be used to update values in an existing column. You will need to bring the vector layer into editing mode, before you can click on the field calculator icon to open the dialog (see the below figure). In the dialog, you first must select whether you want to only update selected features, create a new attribute field where the results of the calculation will be added or update an existing field. www.ayloengineering.com 53

If you choose to add a new field, you need to enter a field name, a field type (integer, real or string), the total field width, and the field precision. For example, if you choose a field width of 10 and a field precision of 3, it means you have 6 digits before the dot, then the dot and another 3 digits for the precision. The Function List contains functions as well as fields and values. View the help function in the Selected Function Help. In Expression you see the calculation expressions you create with the Function List. For the most commonly used operators, see Operators. In the Function List, click on Fields and Values to view all attributes of the attribute table to be searched. To add an attribute to the Field calculator Expression field, double click its name in the Fields and Values list. Generally, you can use the various fields, values and functions to construct the calculation expression or you can just type it into the box. To display the values of a field, you just right click on the appropriate field. You can choose between Load top 10 unique values and Load all unique values. On the right side, the Field Values list opens with the unique values. To add a value to the Field calculator Expression box, double click its name in the Field Values list. The Operators, Math, Conversions, String, Geometry and Record groups provide several functions. In Operators, you find mathematical operators. Look in Math for mathematical functions. The Conversions group contains functions that convert one data type to another. The String group provides functions for data strings. In the Geometry group, you find functions for geometry objects. With Record group functions, you can add a numeration to your data set. To add a function to the Field calculator Expression box, click on the + and then double click the function. Some of the available functions are listed below: www.ayloengineering.com 54

Operators BALADI PLUS This group contains operators (e.g., +, -, *). a + b a - b a * b a / b a plus b a minus b a multiplied by b a divided by b a % b a modulo b (for example, 7 % 2 = 1, or 2 fits into 7 three times with remainder 1) a ^ b a = b a > b a < b a power b (for example, 2^2=4 or 2^3=8) a and b are equal a is larger than b a is smaller than b a <> b a and b are not equal a!= b a and b are not equal a <= b a is less than or equal to b a >= b a is larger than or equal to b Geometry Functions This group contains functions that operate on geometry objects (e.g., length, area). $area $length $perimeter returns the area size of the current feature returns the length size of the current feature returns the perimeter length of the current feature Fields and Values Contains a list of fields from the layer. Sample values can also be accessed via right-click. Select the field name from the list, then right-click to access a context menu with options to load sample values from the selected field. Exercise 14: Field calculations In this exercise, we will use the field calculator to create new fields and fill them with values. 1. Create a new empty QGIS project and add to it parcel_demo.shp and road_demo.shp. 2. Click on road_demo and enable editing. www.ayloengineering.com 55

3. Click on the field calculator icon. If the button is not enabled, check that you have the correct layer selected and that editing is enabled. You will see the following dialog box. 4. In the Output field name, type Length. Note that the Output field type is set to Whole number (integer) and Output field width is set to 40 and Precision is disabled. 5. Click the + sign next to Geometry and scroll down. 6. Double click on $length. You should see $length in the Expression field. 7. Click OK. 8. Turn off editing and save the changes. www.ayloengineering.com 56

9. Now open the attribute table of road_demo. You will see a new field was created and values were filled in. This is the length of each road segment. Note that this field is not automatically updated. If you create a new line or edit an existing one, the length will not be updated. You need to repeat the calculation to keep values updated. 10. Close the attribute table of road_demo and enable editing for parcel_demo. 11. Click on the field calculator icon. 12. Create a new field called Area and from Geometry double click $area. Make sure $area is in Expression and press OK. Note: always make sure that Only update selected features is turned off before performing field calculations, unless you specifically selected features that you need to update. Attribute data editing We have seen so far data with attribute fields already filled in. But what if those attributes have changed and we want to edit them to keep our data current? Think of the Built attribute of the parcel layer. A parcel that was not built has a new house on it now. We need to edit the attribute data to reflect the change. Exercise 15: Edit attributes 1. Create a new empty QGIS project and load the demo vector data, parcel_demo, road_demo and lp_demo. 2. Enable editing for parcel_demo. www.ayloengineering.com 57

3. Select the identify tool 4. Click on the parcel whose attributes you want to modify. You will get the Identify Results dialog with the attributes of the selected parcel. 5. Click the + next to (Actions). You will see the following. 6. Click the pen under (Actions). You will see the following window pop up with the different attribute fields. 7. You can now change the Built attribute of this parcel. Type 4 instead of 0 and press OK. Now the value is updated. 8. Right click parcel_demo in the legend and click the Fields tab. 9. On the Built line, click the button Line edit. You will see the following dialog. www.ayloengineering.com 58

10. Click on Checkbox on the left side of the dialog. Click OK to close the dialog and then OK to close the Properties window. 11. Use the Identify tool to click on a parcel. 12. Click the + next to (Actions) and then the pen. You can see that the Built attribute has a checkbox now. Compare it to the TaxPaid field. If we look at the dialog in Step 10, we will see the following two lines: www.ayloengineering.com 59

This means that when the checkbox is checked, the corresponding field will be filled with a value 4. When the checkbox is unchecked, the field will be filled with a value 0. 13. Repeat Step 8, 9 and 10 for the TaxPaid field. 14. Use the identify tool on parcels, click on the + next to (Actions) and click the pen. You should see the following. 15. When you change the state of the checkbox, the corresponding attribute value will be changed accordingly. To check that, open the attribute table of parcel_demo and compare between the checkbox state of a parcel and its attributes in the table. 16. We will now change the way we input data for the layer lp_demo. Open the layer s properties. 17. Select Fields and on MaintDate row, click the Line edit button. 18. From the list on the left, choose Calendar. 19. In the Date format field, type dd/mm/yyyy. dd is for day, example: 08 MM is for the month, example: 11 yyyy is for the year, example: 2014 20. Click OK to close the dialog and OK to close the Properties window. 21. Enable editing for lp_demo and using the identify tool, click on a point feature. www.ayloengineering.com 60

22. Click the pen to open the attributes form. 23. Click on the button indicated by the arrow in the previous figure. You will see a regular calendar. 24. Choose the proper date and click OK. You will see that the date is now in the MaintDate field. 25. Click OK to validate the data entry. The date is now in the attribute table with the correct format. 16 Practice Exercise 2: 1. Create a new shapefile and call it zoning. Create a field called zone_name. Choose the right data type and field size. 2. Digitize an area around a group of parcels to create a polygon representing a zone. Repeat this operation to create several zones. Remember to type in the zone name and use the right snapping settings to avoid having a parcel split between two zones or have two overlapping zones. 3. Select the parcels that fall within one zone and use the field calculator to create a field called zone and fill it with the proper zone name. Make sure to have Only update selected features on. 4. The previous method for selecting the parcels that fall within one zone might feel long. We will now use a tool called spatial query to select parcels that are within one zone. www.ayloengineering.com 61

From the Vector menu, select Spatial Query Spatial Query or click the icon on the toolbar. 5. You will be presented with the following dialog box. 6. Under Select source features from, click the down arrow and select the parcel layer. 7. Under Where the feature, click the down arrow and select Within. This will select all the parcel features that fall within the selected zone feature. 8. Under Reference features of, select the zoning layer. 9. Without closing the Spatial Query box, use the select tool to select one zone feature. You will see that the text under zoning shows the following: 10. Click Apply. You will see that the dialog has expanded to show the following (the number that you see as a result of your query will certainly be different from the ones you see in the figure). www.ayloengineering.com 62

11. Now you can use the field calculator to fill in the zone_name field for the selected features. 12. Repeat Steps 9 to 11 to fill the fields of the remaining parcels. 13. Now we will calculate the maximum surface that can be built in square meters based on the zoning. 14. Use Select by expression to select all parcels that are in the same zone. 15. Using the field calculator, create a new field max_surfac and in the expression field multiply the parcel area by the proper surface coefficient. Note: The coefficients are normally expressed as percentage, e.g. 30%. For the multiplication you should use 0.30. 16. Repeat Steps 14 and 15 for the remaining zones. 17. Open the Spatial Query tool and make sure no features are selected. 18. Under Select source features from select your parcel layer. 19. Under Where feature select Intersects. 20. Under Reference features of select your building layer. 21. Click Apply. This will select all the parcels that intersect a building feature. This means that even if a parcel contains part of a building, it will be selected. 22. Now you can use the field calculator to create and fill a field called Built with the proper attribute for the parcels that contain a building. 23. As a result of the previous step, you will have parcels with a Built attribute set to 4 and the remaining parcels will have a Built attribute set to Null. Use Select by expression to select the parcels with a Null built attribute and fill the field with the proper attribute value. www.ayloengineering.com 63

Part 3 www.ayloengineering.com 64

Table of Contents 17 Review... 66 18 Parcel... 66 19 Zoning... 69 20 Building... 69 21 Road... 71 22 Utilities... 73 23 Land Use... 75 24 Water Stream... 77 25 Parking... 77 26 Point Of Interest or POI... 78 www.ayloengineering.com 65

17 Review GIS data: BALADI PLUS 1. Vector data: a. Polygon b. Line c. Point 2. Raster data Attribute table: 1. Field data type: a. Text data: Letter and numbers b. Whole Number: a number that is written without a fractional component c. Decimal Number: a number that is written with a fractional component d. Date: date 2. Width: The number of letters or numbers one field can hold 3. Precision: number of digits after the decimal point The following paragraphs will explain about shapefiles that can be created and used in municipality work. The tables explain the field description and their properties. Others shapefiles can also be added depending on the municipality needs. 18 Parcel This shapefile will represent the parcels of each municipality area. The geometry type of this shapefile should be polygon. Name: Parcel Type: Polygon # Field Name Type Width Precision 1 ID Whole Number 10-2 Parcel_Num Whole Number 5-3 Local_Name Text data 10-4 Area Decimal number 10 2 5 Legal_Area Decimal number 10 2 6 Perimeter Decimal number 10 2 7 Zone Text data 3-8 PriceBym2 Decimal number 10 2 9 Tot_Price Decimal number 10 2 10 Ownership Text data 15-11 Juridical Text data 20-12 Built Whole Number 1-13 Explo_Tot Decimal number 8 2 14 Explo_Sur Decimal number 7 2 15 Photo Text data 80-1. ID: id of the feature www.ayloengineering.com 66

2. Parcel_Num: This field holds the parcel number as shown on the cadastral maps. 3. Local_Name: This field contains information about the local area name of a lot. The name should be entered as value map. 4. Area: This field shows the area of the parcel according to the system generated value. The field calculator can be used to fill this field. 5. Legal_Area: This field shows the area of the parcel as shown on land records. It is to be noted that the legal area of a parcel can be different from its geometric area, shown in the field Area. 6. Perimeter: This field shows the perimeter of the parcel according to the system generated value. The field calculator can be used to fill this field. 7. Zone: indicating the urban zone where the parcel is located according to the classification of the DGU (Direction Générale de l Urbanisme). A value map should be created containing a list of the zones in the area. The following table shows a list of zoning examples: Code A A1 A2 A3 B1 B2 C D1 E1 E2a E2b F1 H M AR P P1 G CM Description A-Historic city-habitation-tourism-commerce A1-Habitation-Commerce-Close to archaeology A2-Habitation-Commerce A3-Commerce B1-Habitation B2-Habitation-Commerce C-Commerce D1-Govt property- Habitation-Commerce E1-Tourism (1 st class)-beaches E2a-Tourism (2 nd class)- Govt property-tourism complex E2b-Tourism (2 nd class)- Habitation-Tourism F1-Industrial H-Agricultural M-Military AR-Archaeology P-Beaches-Maritime public domain P1-Environmental reserve-maritime reserve G-Gardens-Public places CM-Cemetery 8. PriceBym2: The approximate price of 1 m 2. 9. Tot_Price: The approximate total price. The field calculator can be used to fill this field (Tot_Price = PriceBym2 * Area) 10. Ownership: Type of ownership. Value map should be used. Type Public Private Religious Waqf Family Waqf Mshaa Municipal Description when the parcel is owned by any public institution when the parcel belongs to a private owner when the parcel is owned by any of the religious communities when a family owns a parcel and it is registered in the sole family name with no specific owner usually used to design the municipality or the village ownership When the parcel belongs to the municipality www.ayloengineering.com 67

11. Juridical: Represent the juridical state of each land parcel. Value map should be used. Clear Status Expropriated Expropriation in Progress Project to expropriation Freezed Lien Description when the parcel has no juridical problems when the parcel had an owner before it was expropriated When an expropriation decree is issued and the parcel is under expropriation procedures When an expropriation decree is under preparation when a parcel is freezed for any legal reason when a parcel is subject to legal encumbrance such as mortgage 12. Built: if the parcel is built or not. A checkbox should be created. 13. Expo_Tot: The sum of legal total exploitation. The field calculator can be used to fill this field after joining the table with the zoning table. 14. Explo_Sur: The total areal legal surface of exploitation. The field calculator can be used to fill this field after joining this layer with the zoning layer. 15. Photo: Include a hyperlink to a photo. Related tables: Owners Table: Parcel Owners information is in a separate data table Owner. This table will be linked with Parcel shapefile using the field Parcel_Num as the foreign key. If a parcel has several owners, then a separate record will be created for each owner using the same parcel number. # Field name Type Width Precision 1 ID Whole number 10-2 Parcel_Num Text data 5-3 Owner Text data 40-4 Shares Whole number 4-5 Percentage Decimal Number 5 2 6 Address Text data 50-7 Phone Whole number 8-8 Notes Text data 40-1. ID: id of the feature 2. Parcel_Num: This field holds the parcel number as shown on the cadastral maps. 3. Owner: Name of the parcel owner 4. Shares: The number of shares of each owner in one parcel (max=2400) 5. Percentage: Percentage of ownership in the parcel 6. Address: The address of the owner 7. Phone: Phone number of the owner 8. Notes: Any description that should be added www.ayloengineering.com 68

19 Zoning The Zoning shapefile will contain polygons representing zones as classified by the DGU. Each polygon will have an attribute describing its properties. Name: Zoning Type: Polygon # Field name Type Width Precision 1 ID Whole number 10-2 Name Text data 5-3 Explo_Tot Text data 30-4 Explo_Sur Whole number 4-5 Area Decimal Number 10 2 6 Description Text data 30-1. ID: id of the feature. 2. Name: Name of zone. 3. Exec_Tot: The percentage of total exploitation in the respective zone. 4. Exec_sur: The percentage of areal exploitation. 5. Area: The area of the respective zone. Field calculator can be used to fill this field. 6. Description: Any additional information can be added. 20 Building This polygon shapefile contains all information related to the buildings. Each polygon will represent the construction rooftop. Name: Building Type: Polygon # Field name Type Width Precision 1 ID Whole number 10-2 Parcel_Num Whole number 5-3 Bldg_Name Text data 30-4 Bldg_Type Text data 20-5 Use_Type Text data 20-6 Roof_Type Text data 10-7 Floors_Num Whole number 2-8 Const_Date Date 10-9 Area Decimal Number 10 2 10 Description Text data 30-1. ID: id of the feature. 2. Parcel _Num: This is a text field holding the parcel number on which the construction is built as shown on the cadastral maps. 3. Bldg_Name: This is a text field holding the name of the building or the construction as identified in the land records or as locally known. www.ayloengineering.com 69

4. Bldg_Type: specify the type of construction for each built feature. A value map should be used. Building Type House Building Light Structure Cistern Other Description when the construction is a small structure made up of one floor, forming a single habitation unit when the construction is a structure made up of two floors or more, forming more than one habitation unit construction made up of steel, wood or other light material all man-made structures used for water storage and distribution All others type 5. Use_Type: The type of use of a building. A value map should be used. Use Type Commercial Residential Hotel Restaurant Public School Offices Industrial Healthcare Agricultural Mixed Description when the construction is used for commercial purposes as shops, showrooms, banks, etc when the construction is used for habitation when the construction is used as a hotel or hostel when the construction is used for any restaurant activity when the construction is used by any public institution or authority, as municipality, telecom center, serail, etc when the construction is used by schools, universities or any other educational institution when the construction is used by business establishments when the construction is used for industrial purposes when the construction is used by healthcare institutions, whether hospitals, dispensaries, etc When the construction is used in agriculture, such as greenhouses when the construction does not have a single use 6. Roof_Type: The type of roof of a building. A value map should be used. The following values can be used: a. Tiles b. Concrete c. Others 7. Floors_Num: The number of floors of the building. 8. Const_Date: The construction date of a building. A calendar should be used. 9. Area: The area of the respective building. Field calculator can be used to fill this field. 10. Description: Any additional information can be added. Related table: Owners Table: Building Owners information is in a separate data table BldgOwner. This table will be linked with Building shapefile using the field Parcel_Num as the foreign key. # Field name Type Width Precision 1 ID Whole number 10-2 Parcel_Num Whole number 5-3 Owner Text data 40 - www.ayloengineering.com 70

4 Shares Whole number 4-5 Sectn_Num Whole number 3-6 Address Text data 50-7 Phone Whole number 8-8 Notes Text data 40 - BALADI PLUS 1. ID: id of the feature. 2. Parcel_Num: This field holds the parcel number as shown on the cadastral maps. 3. Owner: Name of the parcel owner. 4. Shares: The number of shares of each owner in one parcel (max=2400). 5. Sectn_Num: The section number in the building as listed in land records and in the tax database. 6. Address: The address of the owner. 7. Phone: Phone number of the owner. 8. Notes: Any description that should be added. Tax: This table will include all the information about the tax. This table is exported from the tax database. 21 Road 21.1 Existing road This polygon shapefile contains information related to the existing roads (Existing_Road). Name: Existing_Road Type: Polygon # Field name Type Width Precision 1 ID Whole number 10-2 RoadType Text data 10-3 RoadName Text data 30-4 SurfaceTyp Text data 10-5 Status Text data 20-6 Area Decimal Number 10 2 1. ID: id of the feature. 2. RoadType: represent the type of road. A value map should be used. The following value can be used: a. Highway b. Primary c. Secondary d. Bridge e. Private f. Path g. Footpath 3. RoadName: This field holds the road name. www.ayloengineering.com 71

4. SurfaceTyp: This field specifies the road surface type. A value map should be used. The following value can be used: a. Asphalt b. Concrete c. Earth 5. Status: This field represents the condition of a road. If it needs maintenance or not. A value map should be used. The following value can be used: a. Good b. Fair c. Bad d. Under Construction 6. Area: The area of the respective road. Field calculator can be used to fill this field. 21.2 Planned road This polygon shapefile will hold the information extracted from the DGU maps according to the new road design (Planned_Road). Name: Planned_Road Type: Polygon # Field name Type Width Precision 1 ID Whole number 10-2 RoadType Text data 5-3 Decree Text data 16-4 Area Decimal Number 10 2 1, 2, and 4 are the same field used in ExistingRoad shapefiles. 3. Decree: This field contains the decree number and date 21.3 Road Feature In addition to the shapefile representing the road, others sahpefiles can be created to represent road feature such as: a. Sidewalk b. Roundabout c. Pedestrian bridge d. Plant e. Park meter www.ayloengineering.com 72

22 Utilities 22.1 Electricity BALADI PLUS This point shapefile contains information about electricity pole. Name: Electricity_Pole Type: Point # Field name Type Width Precision 1 ID Whole number 10-2 Type Text data 8-3 Use Text data 15-4 Maintenanc Date 10-1. ID: id of the feature. 2. Type: represents the type of the pole. A value map should be used. The following value can be used: a. Wood b. Steel 1 c. Steel 2 d. Steel 3 3. Use: represents the use of the pole. A value map should be used. The following value can be used: a. Electricity pole b. Lighting pole c. Electricity & lighting pole d. Telecom pole e. Pylon f. Other 4. Maintenanc: represents the last maintenance date. A calendar should be used. 22.2 Water Channel This line shapefile represents the water channels (Water_Channel). Name: Water_Channel Type: Line # Field name Type Width Precision 1 ID Whole number 10-2 Type Text data 20-3 Length Decimal Number 10 2 4 Maintenanc Date 10-1. ID: id of the feature. www.ayloengineering.com 73

2. Type: represents the water channel type. A value map should be used. The following value can be used: a. Open b. Concrete Closed c. Steel Closed d. Dirt 3. Length: The length of the respective channel. Field calculator can be used to fill this field. 4. Maintenanc: represents the last maintenance date. A calendar should be used. 22.3 Water Reservoir This polygon shapefile represents water reservoirs in the municipality area (Water_Res). Name: Water_Res Type: Polygon # Field name Type Width Precision 1 ID Whole number 10-2 Type Text data 5-3 Use Text data 12-4 Area Decimal Number 10 2 5 Volume Decimal Number 10 2 1. ID: id of the feature. 2. Type: represents the reservoir type. A value map should be used. The following values can be used: a. Private b. Public 3. Use: the usage of the water stored in the reservoir: a. Household b. Agriculture 4. Area: The area of the top of the reservoir. 5. Volume: The approximate volume of the reservoir. 22.4 Sewage Network This line shapefile represents the sewage network (Sewage_Net). Name: Sewage_Net Type: Line # Field name Type Width Precision 1 ID Whole number 10-2 Diameter Decimal Number 5 2 3 Length Decimal Number 5 2 4 Maintenanc Date 10-1. ID: id of the feature. 2. Diameter: represents the diameter of the respective segment. www.ayloengineering.com 74

3. Length: the length of the respective sewage section. Field calculator can be used to fill this field. 5. Maintenanc: represents the last maintenance date. A calendar should be used. 22.5 Sewage manhole This point shapefile represents the manhole of the sewage network (Manhole). Name: Manhole Type: Point # Field name Type Width Precision 1 ID Whole number 10-2 Maintenanc Date 10-1. ID: id of the feature. 2. Maintenanc: represents the last maintenance date. A calendar should be used. 23 Land Use This shapefile represents the land use (Land_Use). Name: Land_Use Type: Polygon # Field name Type Width Precision 1 ID Whole number 10-2 Level Whole number 3-3 Code Text data 8-4 Area Whole number 10-1. ID: id of the feature. 2. Level: represents the level of land use, in French, as defined by the Ministry of Environment. A value map should be used. Code Description 100 Territoire artificialisé 200 Territoire agricole 300 Surface boisée 400 Surface à végétation herbacée (naturelles) 600 Terrain naturel sans ou avec peu de végétation 800 Fleuve ou rivière 3. Code: represents the code of land use, in French, as defined by the Ministry of Environment. Code 111a 111b 112a Description Tissu urbain dense Tissu urbain informel dense Tissu urbain moyennement dense www.ayloengineering.com 75

112b Tissu urbain informel moyennement dense 112c Tissu urbain peu dense 112d Tissu urbain informel peu dense 112f Site archéologique 112g Grand équipement 121 Zone industrielle ou commerciale 122 Zone portuaire 131 Extraction de matériau 134 Extension urbaine et/ou chantier 141 Espace vert urbain 210/112c Mitage urbain sur culture de plein champ 211 Cultures de plein champ en grandes surfaces 211/221 Cultures de plein champ en grandes surfaces/oliviers 220/112c Mitage urbain sur vergers 221 Oliviers 221/211 Oliviers/Cultures de plein champ en grandes surfaces 221/224 Oliviers/Agrumes (citronniers, orangers ) 221/231 Oliviers/En plein champ 223 Arbres fruitiers (à pépins ou à noyaux, à feuilles caduques ; principalement pommiers, poiriers, amandiers, pêchers) 223/225 Arbres fruitiers (à pépins ou à noyaux, à feuilles caduques ; principalement pommiers, poiriers, amandiers, pêchers)/bananiers 224 Agrumes (citronniers, orangers ) 224/221 Agrumes (citronniers, orangers )/Oliviers 224/223 Agrumes (citronniers, orangers )/Arbres fruitiers (à pépins ou à noyaux, à feuilles caduques ; principalement pommiers, poiriers, amandiers, pêchers) 224/225 Agrumes (citronniers, orangers )/Bananiers 224/231 Agrumes (citronniers, orangers )/En plein champ 225 Bananiers 225/223 Bananiers/Arbres fruitiers (à pépins ou à noyaux, à feuilles caduques ; principalement pommiers, poiriers, amandiers, pêchers) 225/224 Bananiers /Agrumes (citronniers, orangers ) 225/231 Bananiers/En plein champ 230/112c Mitage urbain sur culture intensive 231 En plein champ 231/224 En plein champ/agrumes (citronniers, orangers ) 232 Sous abri 322a Forêt de chênes clairsemée 330/112c Mitage urbain sur zone arbustive 331 Végétation arbustive 332 Végétation arbustive (avec arbres dispersés) 410 Végétation herbacée moyennement dense 420 Végétation herbacée clairsemée 610 Roche nue 620 Sol nu www.ayloengineering.com 76

630 Plage 800 Fleuve ou rivière BALADI PLUS 4. Area: The area of the respective land use. The field calculator can be used to fill this field. 24 Water Stream This polygon shapefile represents the water stream (Water_Strean). Name: Water Stream Type: Polygon # Field name Type Width Precision 1 ID Whole number 10-2 Type Text data 10-3 Length Whole number 5 2 1. ID: id of the feature. 2. Type: specifying the water stream type. A value map should be used. The following value can be used: a. Seasonal b. Perennial 3. Length: the length of the respective road. Field calculator can be used to fill this field. 25 Parking This Polygon shapefile represents the parking in the area. Name: Parking Type: Polygon # Field name Type Width Precision 1 ID Whole number 10-2 Owner Text data 10-3 Area Whole number 5 2 1. ID: id of the feature. 2. Owner: specifying the owner of the parking. 3. Area: The area of the respective land use. The field calculator can be used to fill this field. www.ayloengineering.com 77

26 Point Of Interest or POI This point shapefile represents the points of interest in the area. These places can be used to develop a tourism map. Name: POI Type: Point # Field name Type Width Precision 1 ID Whole number 10-2 Type Text data 10-3 Description Text data 20-1. ID: id of the feature. 2. Type: this field represents the type of the POI. A value map should be used. The following values can be used: a. Hotel b. Restaurant c. Park d. Hospital e. Tourism f. Religious place g. Archaeological site h. Others www.ayloengineering.com 78

Part 4 www.ayloengineering.com 79 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

Table of Contents 27 The Print Composer... 81 28 Using the GroupStats Plugin... 85 29 Joins... 90 30 Relations in QGIS... 93 32 Layer definition files... 99 www.ayloengineering.com 80 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

27 The Print Composer BALADI PLUS The Print Composer provides layout and printing capabilities. It allows you to add elements such as the QGIS map canvas, text labels, images, legends, scale bars, basic shapes, arrows, attribute tables and HTML frames. You can size, group, align and position each element and adjust the properties to create your layout. The layout can be printed or exported to image formats, PostScript, or to PDF. You can save the layout as a template and load it again in another session. Open a new Print Composer Template In order to use the print composer, we will need to add layers to the map. 1. Start by adding the parcel layer, road and buildings of your municipality. If a raster image is available, load it too. 2. Adjust the style of the parcel layer in order to categorize it by parcel area. 3. In the properties window of the parcel layer, open the Labels tab. 4. Enable the checkbox Label this layer with and from the dropdown list choose the parcel number field. Click OK to close the dialog box and see the parcel labels displayed on the screen. 5. Adjust the style setting of the other layers to your liking. 6. On the Project menu, click on New Print Composer. You will be prompted to choose a title for the new Composer. Any title would do, just choose something meaningful for you. 7. You will see the Print Composer window with a blank map area. The blank map area represents the paper where your map will be printed. You can choose from the standard paper sizes in Presets or enter a custom size. For this exercise, we will use A4. 8. Click on the Add New Map button: With this tool activated, you ll be able to place a map on the page. www.ayloengineering.com 81 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

9. Click and drag a box on the blank page: You will see a box being drawn on the page. As you release the mouse button, you will see the map appear on the page. 10. You can now drag the map box around the page and place it where you see fit. You can also resize the map box by clicking and dragging the boxes in the corners. 11. Use the to zoom to the extents of the page, zoom in or out. 12. If you re satisfied with the position of the map box on the page, right click on it. You will see a padlock icon appear on the left top corner of the map. The position of the map box is locked on the page and cannot be moved unless you turn the lock off by right clicking on it. 13. Click Move item content to move the map layers inside the map box using the left mouse button. You can also use the mouse wheel to zoom in or out. 14. While using the Move item content tool, look to the right of your screen and watch the map scale and extents change. 15. Let s experiment with map scales and see how our area fits on an A4 paper. Type each of the following scale numbers in the Scale field and see the extent of the covered area reflected in the map box after typing each number: 50000 20000 10000 www.ayloengineering.com 82 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

5000 2000 1000 500 You might want to look around the map after changing the scale. See how changing the scale reflects on the display of the parcel numbers. 16. Set the scale to 1/2000. 17. Now we are going to add a map title to our layout. A title is important to tell the map reader/user what the map is about. Click on this button: 18. Click on the page, above the map, and a label will appear at the top of the map. 19. Click on Item properties on the right of your screen, then click in the box under Main properties and change the map title to your area s name. 20. Click on Font and change the font size to 20. For an A4 paper, a title font size of 20 may be good, but for larger papers, the font size may have to be enlarged. 21. Under Alignment, choose Center for vertical and horizontal alignments. 22. Resize the title box and place it in the top center of the page. It can be resized and moved in the same way that you resized and moved the map. 23. Click on the map to select it using 24. Press the Shift key on your keyboard and click on the label. Both the map and the label will be selected. 25. Click on the Align button on the toolbar and select Align Center. This will cause the title to be aligned with the middle of the map box. 26. Right click the label to lock its position. www.ayloengineering.com 83 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

27. Now we will add a legend to make the map more readable and comprehensible. Click the Add legend item button and click on the page where you want the legend to be. Adjust the position of the legend according to what suits you most. 28. If you ve added the raster layer to your map, it will appear in the legend. Delete it from the legend by looking under Legend items, selecting the raster layer and clicking. 29. We will add a scale bar and scale text to the map. Click on the Add new scalebar button. 30. Click on the page where you want your scale bar to show. You will see the scale bar displayed on the sheet. 31. Adjust the position of the scale bar so as not to hide the map box and its contents. 32. We will now a scale text to the map. Click again on the Add new scalebar button and click on the page where you want the scale text to show. 33. On the right side of the screen click on Item properties. Under Main properties click the dropdown list next to Style and choose Numeric. 34. Resize the rectangle to bring it to the size of the scale text and adjust its position. 35. We will now add a north arrow. Click on the Add image button and click on the page where you want the north arrow to show. You will see and empty square appear. 36. In the Item properties tab click Search directories, you will see a window with several symbols. Select the north symbol as shown in the following figure. 37. You will see the selected symbol appear in the empty square. 38. Adjust the position of the square with the north arrow if needed. 39. Have a final look at your map and make any adjustments to the different map elements that you see necessary. 40. Once you are satisfied with the way your map looks, save your QGIS project. This will save the project along with your map composition. 41. Now we can export the map to a format that can be printed or sent by email. Click on Export as image button. 42. You will get the save as image dialog box. Navigate to the folder of your choice and type a name for the file. 43. You can choose between several image formats. Choose jpg if you want to send the image by email and tif if you want a good image quality for printing. www.ayloengineering.com 84 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

28 Using the GroupStats Plugin BALADI PLUS Plugins allow extending the functionality of QGIS. GroupStats is a plugin that generates statistics about a vector layer or a table. We will use GroupStats to aggregate or summarize the data of the tax table. Part I and Part II of this tutorial are applicable if QGIS is able to access the tax database. If the access is not available, skip to Part III. Part I: Saving the tax table to a Comma Separated File (CSV) 1. Make sure the QGIS project file containing the tax table is open. 2. Right click the tax table and select Save As. You will see the following dialog box: 3. Select Comma Separated Value from the drop down list. 4. Click Browse and navigate to the folder where you want to save the file and choose a name. A good practice is to add the date to the name of the file. This will reveal the file creation date for any future use. 5. Enable the checkbox Add saved file to map to load the file in the project after its creation. 6. Leave all other settings as they are and click OK to create the file. Part II: Using a subset of the tax table Your tax table will likely include data for several years and several tax fee types. In order to only see data relevant to our analysis, we will use a feature subset. A feature subset uses a query similar to what we already saw in Select by expression in previous exercises. www.ayloengineering.com 85 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

1. Open the properties of the CSV tax file and make sure the General tab is open. 2. Scroll down and click the Query Builder button. You will see the Query Builder dialog open 3. In the Provide specific filter expression type the following : 'رسم على القیمة التا جیریة' = "FEETP_NAME" "TAKLEEF_YEAR" = 2013 AND 4. Press OK to close the query builder and OK to close the properties. Only data that fits the rules we set will be available and visible if we open the attributes table. The other data is still in the file and is not deleted. It is only filtered out. Part III: The GroupStats plugin 1. If QGIS doesn t have access to the tax database, you will need to use the tax demo data, otherwise skip to Step 4. www.ayloengineering.com 86 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

Click on the Add delimited text layer BALADI PLUS button. You will get the following dialog box: 2. Click Browse and navigate to the exercise folder and select the file tax_data.csv. 3. Make sure all radio buttons and checkboxes are as in the above figure and click OK. The appearance of the map will not change as no geographic features were added. The added file only contains data in a table. Open the attribute table of tax_data.csv to see the data it contains. 4. To open GroupStats, go to the Vector menu Group Stats GroupStats 5. You will see the GroupStats windown open. www.ayloengineering.com 87 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

6. From the layers list select the tax data table. You will see the relevant fields loaded under Fields. 7. Click on Ikar_Number and drag it to the Rows box. 8. Click on Paid_Status and drag it to the Columns box. 9. Click on Ikar_Section and drag it to the Value box. 10. Click on Count and drag it to the Value box. 11. Enable the use Null values checkbox. 12. Your GroupStats window should now look like the following. www.ayloengineering.com 88 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

13. Press calculate to summarize your data. Your GroupStats window will look like the following. Column 1 represents the parcel numbers. Column 2 represents the number of sections that haven t paid the taxes. Column 3 represents the number of sections that paid the taxes. 14. On the GroupStats menu click on Data Save all to CSV file. Navigate to your data folder and type tax_sum as a name for your file. The result of running GroupStats is now saved in a CSV file. 15. Open the CSV file in Notepad. You should see the following: www.ayloengineering.com 89 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

16. Edit the text file in order to see the following: BALADI PLUS 17. Save and close the file. 29 Joins The Joins menu allows you to join a loaded attribute table to a loaded vector layer. After clicking the Add vector join dialog appears. As key columns, you have to define a join layer you want to connect with the target vector layer. Then, you have to specify the join field that is common to both the join layer and the target layer. As a result of the join, all information from the join layer and the target layer are displayed in the attribute table of the target layer as joined information. Exercise The purpose of this exercise is to join a parcel shapefile with a text file containing tax information about the parcels and use rule based symbology to categorize the data. The text file we will use in this Exercise is the result of the previous exercise of using the GroupStats plugin to summarize tax data. 1. Create a new QGIS project. 2. Load parcel_sample.shp from the exercise folder. You will see the parcels appear on the map. 3. Open the attribute table of the parcel layer and have a look. 4. Click on the Add delimited text layer button then click on the Browse button and navigate to the exercise folder and select the file tax_sum.csv www.ayloengineering.com 90 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

5. Make sure all the dialog settings are as can be seen in the following and click OK. The layers tab should look like the following (except for the symbology of the parcel layer): The appearance of the map will not change as no spatial features were added. The added file only contains data in a table. 6. Select the tax_sum layer and open its attribute table. You should see something like this: The three columns you see are: www.ayloengineering.com 91 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

IKAR_NUM is the parcel number paid_yes: the number of sections that paid their taxes paid_no: the number of sections that did not pay their taxes. 7. Open the properties of parcel-sample and click on Joins to open the joins tab. 8. Click on. The Add vector join dialog will show up. 9. Set the Join layer, Join field and Target field as can be seen in the following then click OK: The properties dialog will look like the following: We are joining the taxes file to the parcel-sample shapefile using the parcel number (parcel_num) as a common value. Press OK to close the properties dialog. 10. Open the attributes table of parcel-sample now. You can see that there are two new fields: tax_sum_paid_no and tax_sum_paid_yes. www.ayloengineering.com 92 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

The new fields come from the text file and are preceded by the table name tax_sum. The attributes of both the text file and the parcel layer are joined and shown in one table. This join exists only in this project and no changes are made to either the parcel layer or the taxes text file. 11. Use the identify tool on some parcels to check their attributes. 12. Now we will create a rule based symbology to categorize the parcels according to their tax paying status. Open the parcel layer style properties and select Rule based from the drop down list. 13. An empty rule is already created. Select the empty rule and click to edit this rule. 14. Create the following rules: Label Rule All paid "tax_sum_paid_yes" > 0 and "tax_sum_paid_no" IS NULL All unpaid "tax_sum_paid_yes" IS NULL and "tax_sum_paid_no" > 0 Some paid "tax_sum_paid_yes" > 0 and "tax_sum_paid_no" > 0 Not taxable "tax_sum_paid_yes" IS NULL and "tax_sum_paid_no" IS NULL 15. Change the style of the categories if needed and examine the map features. 30 Relations in QGIS We saw in a previous example how to join a data table (in a text file) to a spatial layer. In that join example, for every row in the spatial layer there was one and only one row in the data table. We refer to this kind of relations as 1-to-1 relationships. But what if for every row in the spatial layer more than one row exist in the data table. An example is the tax data where for every parcel (one row in the parcel layer) there are several rows in the tax table representing the different sections. In such a case we call this a 1-to-many relationship. While in a 1-to-1 relationship, the fields from the joined table are added to the table of the spatial layer and as a result, the layer can be symbolized based on the added fields. In a 1-to-many relationship this is not possible. However it is possible to see the related attributes in a form when using the identify button on a feature. www.ayloengineering.com 93 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

In this exercise, we will create a relation between a parcel layer and a tax table. 1. Create a new QGIS project and add to it the parcel shapefile and the tax table. 2. Open the project properties. Project -> Project Properties. 3. Select the Relations tab. You should see the following: 4. Click on the Add Relation button. You will see a dialog box with several fields. 5. Fill the fields to match the following figure then click OK: 6. The Relations tab in project properties should look now like in the following: After verifying that your Relations tab matches the one presented here click OK to close the dialog box. 7. Make sure to select the parcel layer in the layers list and click the identify tool. 8. Click on a parcel in the map. The identify window will show on the screen. 9. Click on the + next to action to expand it and click to open the feature form. www.ayloengineering.com 94 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

10. You might need to drag the edges of the dialog to enlarge in order to see its contents. You should see something like this: 11. The first three lines are the parcel attributes. Under Taxes you can see the related attributes coming from the taxes table. 12. You can change the form view by clicking the button indicated by the arrow. The form view will change to show the following: 13. Click on Expression then select Column Preview and from the columns list select IKAR_SECTION. You will now see the parcel section numbers on the left. www.ayloengineering.com 95 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

14. Click on a parcel section number and you will see its data on the right side of the dialog. 15. Explore the functions of this form by selecting different columns from the Column Preview list and see how the data is presented. 31 Photos, documents, actions and features In this exercise we will learn how to link photos or documents to spatial features. It is possible to do that by having a field in the attribute table with the path of the photo, for example: C:\users\GISuser\pictures\house1.jpg It is important to note that once the field is filled with the path of the photos, the locations of the photos should not be changed, otherwise the links will be broken. 1. Create a new QGIS project. 2. Add parcel_demo.shp to the project. 3. Add a new field to the attribute table called photo. The data type should be text and the width 100. 4. Open the Fields tab in the properties of parcel_demo. Click on the Line edit button of the photo field and select Photo. 5. In the width type 320 and in the height type 240. This is the size in pixels of the photo view in the form. 6. Click OK to close the properties dialog. Save the edits and save the project. www.ayloengineering.com 96 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

7. Use the identify button on a parcel of your choice and open the feature form. You should see the following: 8. Click on the browse button and navigate to where the photos for this exercise are stored. 9. Select house1.jpg from the list and click OK. 10. You should now see the photo in the feature form just like the following figure: 11. Add the remaining photos in the folder to other parcels in the parcel layer. The feature form allows an easy way to select and view photos related to features. However, it does not allow zooming in on photos and seeing more details. This can be done by using an image viewing software such as the one provided with Windows. QGIS allows opening photos or documents in an external program by using feature actions. www.ayloengineering.com 97 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

1. Open the properties of the parcel layer and select the Actions tab. You will see the following dialog: 2. Under Action properties click on the Type drop down list (where the word Generic is displayed) 3. Select Open from the list. 4. In the Name field type Open image. 5. Click on the drop down list where you can see ParcelNr and select photo then click on Insert field. 6. Click on Add to action list. 7. Your dialog should look like the following: 8. Click OK to close the dialog box. 9. On the QGIS toolbar, click on the black down arrow of the Run feature action button 10. Select Open image. The cursor will turn into a cross. 11. Now click on one of the parcels to which you added a photo link. The photo will open in the image viewer. www.ayloengineering.com 98 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

It is also possible to open other types of files using the feature action such a PDF document. The procedure is the same as we have seen for the photos. 1. Create a new text field called Document with a width of 100. 2. Open the Fields tab in the properties of the parcel layer. 3. Click on the Line edit button of the Document field and choose File name then click OK to close the dialog. 4. Use the identify tool on a parcel of your choice and open the feature form. You should see the following: 5. Click on the browse button next to Document and select a PDF document from the Doc folder and click OK to close the form. 6. On the QGIS toolbar, click on the black down arrow of the Run feature action button 7. From the list select Open document. The cursor will turn into a cross. 8. Click on a parcel to which you added a document link. The PDF document will open in the PDF viewer installed on your computer. 9. Save your layer and project. 32 Layer definition files You ve added a spatial layer to a QGIS project, you ve changed the symbology to rule based, set the colors, defined value maps for some fields and created feature actions on some other fields. Now you want to use the same layer with the same settings in a different QGIS project and you don t want to recreate the same rules and settings. The way to do that is by using layer definition files. Layer definition files allow you to save the reference to the map layer as well as any styling, field info, etc, out to a file that can be loaded easily the next time. It is possible to create a layer definition file for raster files, vector files and data tables whether stored in a text file, in an Excel file or in a database. Exercise 1. Open the QGIS project file you ve created for the photos and documents exercise. 2. From the Project menu select Project Properties and open the General tab. www.ayloengineering.com 99 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

3. Under General settings choose absolute from the Save paths drop down list. 4. Click OK to close the project properties window. 5. Select the layer Parcel_demo from the layers list. 6. From the Plugins menu select Layer definitions then select Save as layer definition file. 7. Choose the location and the name to save the layer definition file (*.qlr). 8. Create a new QGIS project. 9. From the Plugins menu select Layer definitions then select Add from layer definition file and browse to the location where you saved the file in Step 7. 10. Open the file and examine its properties in the Fields and Actions tab. You will see that the properties you set previously are still there. www.ayloengineering.com 100 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

Part 5 www.ayloengineering.com 101 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

Table of Contents 33 Using Google Earth with QGIS... 103 34 Using online image providers... 105 35 Split and merge features... 106 36 Using a smartphone or tablet to collect field point data... 112 www.ayloengineering.com 102 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

33 Using Google Earth with QGIS BALADI PLUS The GEarth plugin allows interaction with Google Earth. It is possible to view the visible QGIS map in Google Earth and to paste features loaded in Google Earth. Viewing the map in Google Earth allows you to benefit from the 3D view provided by Google Earth. In order for this plugin to function, an internet connection is needed and Google Earth needs to be installed. 1. Create a new QGIS project and load the parcel and building data. Make sure that both layers are set to use the CRS of your municipality. 2. It is better to set the symbology of both layers to no fill in order to be able to see the image in the background. 3. Zoom in on an area of your choice. 4. Click on the GEarthView button on the toolbar or from the Plugins menu select GEarthView then GEarthView. 5. Google Earth will now open and load the map view that you see in QGIS. 6. Explore the 3D view of Google Earth with your map features loaded. 7. You can leave Google Earth open and go back to QGIS, pan your map to a different area and click the GEarthView button again. When switching back to Google Earth, you will see a dialog asking you if you want to reload a file. Click Yes and the new view will be loaded in Google Earth. It is also possible to save a QGIS vector layer as a KML file. KML (Keyhole Markup Language) is a file format that can be read by Google Earth. 1. Load the parcel layer of your municipality. www.ayloengineering.com 103 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

2. Right-click the layer in the layer list and select Save As. You will see the Save vector layer as dialog open. BALADI PLUS 3. From the format list select Keyhole Markup Language [KML]. 4. Click Browse to navigate to the folder of your choice and type a name for the file. 5. Click OK to accept and save the file. 6. To see the file in Google Earth, navigate to the folder where you saved the file and double click its name. It should launch Google Earth and load the file. You can also open Google Earth, and from the menu select File->Open and choose the file that you saved. 7. Explore the area where the new layer was loaded. 8. Keep Google Earth open for the next exercise part. Notes: The file is not saved with the symbology created in QGIS. A simple symbology is used for all the features. It is possible to save a feature subset of the layer by creating a query in the General properties of the layer. You can also create features in Google Earth and paste them in QGIS. 9. Zoom in on an area in your municipal district and click on the Add polygon button on the Google Earth toolbar. www.ayloengineering.com 104 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

You will see the following dialog appear on your screen: BALADI PLUS 10. Click around the area to create a polygon. When done click OK in the dialog box to confirm the creation and close the dialog. You will see Untitled Polygon in the Places panel under Temporary Places. 11. Right click Untitled Polygon and select copy. 12. Switch to QGIS and from the plugins menu select GEarthView then Paste from GE. 13. A new layer will be created in QGIS with the name GEKml. 14. You can save this newly created layer into a shapefile by right clicking its name and selecting Save As then selecting Shapfile from the list and choosing a file name. 34 Using online image providers You can use online image tile providers such as Google or Microsoft as a background for vector layers or for digitizing map features. In order to do so, you need the OpenLayers plugin. 1. Create a new QGIS project. 2. Load any vector layer covering your municipal area (parcels, roads, etc). 3. Make sure the loaded layers are in the CRS defined for your municipal area. 4. From the plugins menu select OpenLayers plugin www.ayloengineering.com 105 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

5. You will see a list of providers BALADI PLUS Notes: 6. Select Add Google Satellite layer to add Google satellite images. 7. After the layer is loaded, the map will zoom out to show an image covering the whole earth. Right click on the loaded vector layer and select Zoom to layer extent. Now your map should show the extents of your vector layer. You can now zoom on any area of your map and examine it. Now you can digitize features like you would normally do with a raster layer loaded from your computer s hard drive. The same steps should be repeated if you want to load Microsoft Bing images. Just choose Add Bing Aerial layer. This plugin depends on internet connectivity to function. No images are cached locally. It is not possible to change transparency, contrast or brightness for these layers. You can switch between Google and Microsoft images and see which service provides better imagery for your area. However, you should remove one image layer before adding the other. Not doing so might provide unpredictable results. Small shifts might be noticeable between the raster layer and the loaded vectors. This is normal and due to the nature of the image services and their accuracy. Therefore, care should be taken if digitizing features using these image services. 35 Split and merge features If a parcel is subdivided, the existing parcel data needs to be updated to reflect this change. In this exercise, we will learn how to split a parcel by using the scanned subdivision map. Before we can use the scanned map, we need to place the image on the right coordinates. In order to do so, we will use a QGIS function called Georeferencer. This function allows you to match points from a raster image to points from your map features to georeference the image. www.ayloengineering.com 106 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

1. Create a new QGIS project. 2. Load the vector layer parcel_split.shp and change the layer style to use only a border for the polygons. 3. Enable snapping for the parcel_split layer and set the tolerance to 1m. 4. From the raster menu, select Georeferencer->Georeferencer. The Georeferencer window will open. 5. Click the Open raster button. You will see the Open raster window. Browse to the exercise folder and select the image split_map.tif. The image will be loaded in the view. You can see that the large parcel in the center of the map is subdivided. 6. Click on the Add point button on the toolbar and move your cursor to the image area. You can zoom in and zoom out using the mouse wheel just like you do in the regular QGIS window. Pressing the mouse wheel allows you to pan the view. Zoom in on the top left part of the image, to the intersection indicated by 1 on the following figure. www.ayloengineering.com 107 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

7. Click on the intersection. You will see the following dialog. Enable the checkbox Snap to background layers. This will allow us to snap to the parcel layer. 8. Now click on the From map canvas button. You will be switched to the main QGIS map view. Zoom in on the area corresponding to point 1 on the image, place the cross over the intersection and click. You will be switched back to the Georeferencer coordinates dialog and the coordinates field will be filled. www.ayloengineering.com 108 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

Click OK. 9. Repeat steps 6 to 8 for point 2, 3 and 4. 10. Your Georeference window should look like the following. www.ayloengineering.com 109 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

11. Click on the Transformation settings button. The settings dialog will open. 12. Click on the button indicated by the arrow. This will allow us to define the output raster. Browse to the exercise folder and type split_geo and click OK. 13. Click on the button indicated by the arrow. This will allow us to select the CRS for the output image. For this exercise we will choose Deir Ez Zor/Levant Stereographic. But for future work select the CRS defined for your municipal area. 14. Enable the checkbox for Load in QGIS when done and click OK to close the settings dialog. 15. Click on the Start georeferencing button to create the georeferenced image and load it in the QGIS map. 16. Close the Georeferencer and click yes to the save the points. 17. In the QGIS view, make sure that the image is placed below the vector layer. 18. Turn on editing for the parcel layer and make sure the Advanced Digitizing toolbar is visible. 19. Click the Split Features button and zoom in to the top of the large parcel. Click on the location indicated by the arrow in the following figure. You need to click outside the parcel, not on the parcel limit. Pan the map to the lower part of the parcel and click on the location indicated by the arrow in www.ayloengineering.com 110 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

the following figure. BALADI PLUS 20. Right click to confirm the split. Your map should look like the following. The line highlighted in yellow is where the split occurred. Now you have two large parcels. 21. Continue performing the split on the remaining lines of the subdivision. One you re done, your map should look like the following. The area circled in red contains two polygons. They should be converted into one. 22. Select the two polygons and then click on the Merge selected features button. The Merge feature attributes dialog shows up. This dialog shows what attributes will be given to the newly www.ayloengineering.com 111 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

created feature. Type 0 in the area and perim attribute and click OK. 23. The two polygons will be merged into one. 24. Save your edits and save your project. 36 Using a smartphone or tablet to collect field point data This exercise applies to devices running Android and equipped with a GPS receiver. The Android app OruxMaps needs to be installed on the device and is available from the PlayStore. The app requires a data connection to download online maps. This material was prepared using a 10 tablet running Android 4.2. You might see a different view on your device if it has a smaller screen. 1. Open OruxMaps on your Android device. The first time you run the app you should see a screen similar to the following. www.ayloengineering.com 112 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

2. Tap on the icon indicated by the arrow. The menu will show up. Tap on Switch map and you will see the following. Tap on Microsoft Earth to select Microsoft imagery as a background. www.ayloengineering.com 113 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

3. Tap on the icon indicated by the arrow and then Start GPS to turn GPS positioning on. Wait a few moments for the GPS to get a fix. Once you have a GPS fix you will see a red arrow at the center of the screen indicating your position and the map will pan to your location. Use the pinch gesture to zoom in on your location. www.ayloengineering.com 114 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

4. Move to the location where you want to record a point feature and tap on the pushpin icon then tap Create. You will see the Waypoint Creation dialog. Type a name for your point in the Waypoint name field and a description in the Description field. www.ayloengineering.com 115 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

Tap Accept when done. The point will be created with the name and description you typed in along with the GPS coordinates. 5. Repeat Step 4 to collect more points. 6. Once you re done collecting, you will need to transfer the data to your PC to load them in QGIS. Tap on the pushpin icon and then on Manage to open the waypoint manager. Your screen should look like the following. 7. Tap on the checkboxes next to the points you ve just collected (indicated by 1 in the above figure) then tap on the icon indicated by 2. From the option list you get select KML. A KML will be saved to the memory device of your device. It should be located in \oruxmaps\tracklogs. The www.ayloengineering.com 116 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)

filename will be like this Waypoints 20140706_1710.kml reflecting the save date and time. You need to copy the KML file to your computer. 8. Once the file is on your computer, open QGIS and click Add Vector layer. Click Browse and from the file type select Keyhole Markup Language [KML] and select the file you just copied from your device then click OK on both dialogs to load the file in QGIS. 9. Right click the KML file in the layer list and select Save As. 10. Select ESRI Shapefile from the format list. Click Browse to select the location and filename of the file to save to. For CRS choose Selected CRS then click Browse to select the CRS of your municipal area. Enable the Add saved file to map checkbox and click OK. The shapefile will be created and loaded in your map. www.ayloengineering.com 117 You created this PDF from an application that is not licensed to print to novapdf printer (http://www.novapdf.com)