COWASH Training QGIS 1 QGIS GUIDE FOR WASH FACILITY basics.pdf · QGIS GUIDE FOR WASH FACILITY DATA…

  • Published on
    30-Nov-2018

  • View
    212

  • Download
    0

Embed Size (px)

Transcript

<ul><li><p>COWASH Training QGIS 1 </p><p>Kimmo Koivumki kimmo.koivumaki@gmail.com MoWIE / COWASH GIS Expert +251 939 175 931 Addis Abeba </p><p>QGIS GUIDE FOR WASH FACILITY DATA </p><p>COLLECTORS AND -MANAGERS QGIS (previously known as Quantum GIS) is widely used open source GIS software. Usage is very similar to market </p><p>leader ArcGIS. This guide teaches the basics of QGIS and demonstrates how to check if the collected WASH facility </p><p>points are correctly positioned inside the target woreda/kebele boundaries. </p><p>Training is conducted using the Amhara regions Yilmana Densa woredas database as an example. Data is originally </p><p>downloaded from National WASH-inventory database (NWI M&amp;E MIS) and it has then been prepared for GIS-use in a </p><p>way which is learned in OpenOffice CALC- and Excel trainings. </p><p>CONTENTS </p><p>Frequently used terms ................................................................................................................................................ 2 Requirements ............................................................................................................................................................. 2 Installing QGIS ............................................................................................................................................................ 2 Preparations ............................................................................................................................................................... 3 </p><p>How to organize the tools ............................................................................................................................................... 3 Selecting the correct coordinate system for your project .............................................................................................. 4 Adding new vector data .................................................................................................................................................. 5 </p><p>Basic operations ......................................................................................................................................................... 7 Zooming the view and moving the map ......................................................................................................................... 7 </p><p>Exercise 1 .................................................................................................................................................................... 7 </p><p>Attribute table ................................................................................................................................................................ 7 Creating a new shapefile from selection ........................................................................................................................ 8 </p><p>Exercise 2 .................................................................................................................................................................. 10 </p><p>Clipping data ................................................................................................................................................................. 11 Exercise 3 .................................................................................................................................................................. 12 </p><p>Importing the Comma Separated File (CSV) to QGIS ..................................................................................................12 Finalizing the map .....................................................................................................................................................14 </p><p>Changing the name of the layer.................................................................................................................................... 14 Adjusting layers colors ................................................................................................................................................. 14 Labelling the layer ......................................................................................................................................................... 15 </p><p>Exercise 4 .................................................................................................................................................................. 15 </p><p>Changing label text style ............................................................................................................................................... 16 Adjusting the symbol for the map item ........................................................................................................................ 16 Using saved styles ......................................................................................................................................................... 17 </p><p>EXTRA: Classifying the road-file .................................................................................................................................18 Excercise 5 ................................................................................................................................................................ 18 </p><p>Preparing the map for printing ..................................................................................................................................19 Print composer preparations ........................................................................................................................................ 19 Adding the map in print composer ............................................................................................................................... 20 Adding the scale bar and north arrow in print composer ............................................................................................ 21 </p><p>Exercise 6 .................................................................................................................................................................. 21 </p><p>Adding the legend in print composer ........................................................................................................................... 22 Exercise 7 .................................................................................................................................................................. 23 </p><p>EXTRA 1: Installing QGIS plugins (basic knowledge on computers is needed) ............................................................24 EXTRA 2: Creating and using KML-file in Google Earth and -Maps .............................................................................26 EXTRA 3: Creating relief from digital elevation model (DEM) ....................................................................................27 EXTRA 4: Check how many points are outside woreda borders (Spatial Query) .........................................................29 </p></li><li><p>COWASH Training QGIS 2 </p><p>Kimmo Koivumki kimmo.koivumaki@gmail.com MoWIE / COWASH GIS Expert +251 939 175 931 Addis Abeba </p><p>FREQUENTLY USED TERMS </p><p>Vector-file Scalable, computer generated data type </p><p>Raster-file Data type for images like aerial photographs, scanned maps, satellite images etc </p><p>Shapefile Format of saved vector file. Generally used in GIS software. Either point-, line- or polygon type. </p><p>Layer When the data is imported to GIS-software, it is referred as layer in TOC </p><p>Attribute table Layers information in table-format </p><p>TOC Table of Content. This is the Layers toolset which is normally on the left side of the screen showing all the layers used on the map </p><p>REQUIREMENTS </p><p>- Minimum system requirements: Computer with Windows XP or newer, 1GB of RAM, 1.6GHz processor. </p><p>- Database-file prepared for QGIS (Instructions to do the preparations can be found in OpenOffice-trainings). There is a </p><p>test-file from Yilmana Densa for training in the Original DATA-folder. </p><p>- Shapefiles of woreda- and kebele borders. Data can be found in training package. </p><p>Important! All data is governments property. Publishing of the maps without permission is prohibited. </p><p>INSTALLING QGIS </p><p>QGIS is an open source GIS-software which has an active developer base. With QGIS user can visualize, manage, edit </p><p>and analyze data as well as compose printable maps. Many of the tools in QGIS are similar to ones in ArcGIS so the </p><p>skills learned with QGIS can easily be transferred to ArcGIS and vice versa. </p><p>There is installation file for QGIS in QGIS Training-folder. It is either for 32 or 64 bit depending on your operating </p><p>system. You can check the amount of bits in your Windows as follows: </p><p> Computers running Windows XP </p><p>Click Start, right-click My Computer, and then click Properties. If "x64 Edition" is listed under System, youre </p><p>running the 64-bit version of Windows XP. If you dont see "x64 Edition" listed under System, youre running the </p><p>32-bit version of Windows XP. The edition of Windows XP you're running is displayed under System near the top </p><p>of the window. </p><p> Computers running Windows Vista or Windows 7 </p><p>Click the Start button Picture of the Start button, right-click Computer, and then click Properties. If "64-bit </p><p>Operating System" is listed next to System type, youre running the 64-bit version of Windows Vista or Windows </p><p>7. If "32-bit Operating System" is listed next to System type, youre running the 32-bit version of Windows Vista or </p><p>Windows 7. The edition of Windows Vista or Windows 7 you're running is displayed under Windows edition near </p><p>the top of the window. </p><p>Install the correct QGIS, by double clicking installing package. Follow the instructions. After the installation is finished </p><p>you can delete all the other new shortcuts from your desktop except QGIS Desktop X.X.X. </p><p>If you are creating maps, data sources has to be mentioned in the map. Data sources are: </p><p> Woreda borders, roads, towns: EMA </p><p> Kebele borders: CSA </p><p> WASH facilities: NWI, your woredas water office </p></li><li><p>COWASH Training QGIS 3 </p><p>Kimmo Koivumki kimmo.koivumaki@gmail.com MoWIE / COWASH GIS Expert +251 939 175 931 Addis Abeba </p><p>PREPARATIONS </p><p>Always save your original data separately from your work files. When you start to work, copy the needed original data </p><p>for your work. This prevents you from losing any original data in case of mistakes or errors. </p><p>There is a QGIS-Data-folder in Training-QGIS -folder. This will be the storage for all GIS-data used in training. </p><p>HOW TO ORGANIZE THE TOOLS </p><p>1. Launch QGIS by clicking QGIS Desktop -icon in your desktop. You can also find the software in Start -&gt; All </p><p>Programs -&gt; QGIS Version -&gt; QGIS Desktop X.X.X </p><p>2. Click the grey area of toolset bar with your right mouse button (Image 1) and check only toolsets marked in Image </p><p>2. You can also move the toolsets freely to where you want from the toolset handle in the top- or left side of the </p><p>toolset. </p><p>Image 2. Selecting the correct toolsets for the work </p><p>Image 1. First arrow showing the gray area and second one toolset handle </p></li><li><p>COWASH Training QGIS 4 </p><p>Kimmo Koivumki kimmo.koivumaki@gmail.com MoWIE / COWASH GIS Expert +251 939 175 931 Addis Abeba </p><p>SELECTING THE CORRECT COORDINATE SYSTEM FOR YOUR PROJECT </p><p>Coordinates are essential part of mapping. When the data is projected in GIS-software, the program has to be told </p><p>which coordinate system the data is using. If there is wrong coordinate system used the map will not project correctly. </p><p>Ethiopian Mapping Agency (EMA) is using Adindan UTM. UTM projection is divided to different zones when major part </p><p>of Ethiopia situates to zone N37 (Image 3). Numbers (36-38 in Ethiopia) run around Earth from 1 to 60. Letters in </p><p>alphabetical order (P-N in Ethiopia) indicate the vertical distance from South Pole. GPS-device recognizes correct </p><p>zones automatically. </p><p>Select the Adindan 37 N coordinate reference system (CRS) for your map </p><p>1. From the bottom right corner of the screen click the CRS status button (Image 4) </p><p>Image 3. UTM zones in Ethiopia </p><p>Image 4. Button for adjusting the coordinate system </p></li><li><p>COWASH Training QGIS 5 </p><p>Kimmo Koivumki kimmo.koivumaki@gmail.com MoWIE / COWASH GIS Expert +251 939 175 931 Addis Abeba </p><p>2. From the opening window check the Enable on the fly CRS transformation -check box. </p><p>3. Write Adindan to Filter-field to find the correct CRS and select it from the Coordinate reference systems of the </p><p>world -section (Image 5) </p><p>ADDING NEW VECTOR DATA </p><p>Maps consists of different kinds of data which are stacked upon each other as layers. In this exercise we are adding </p><p>woreda boundaries -data to the map. This file includes the areas of all the woredas in Amhara in the 2007 (CSA). </p><p>1. Click "Add Vector Layer" -tool in your "Manage Layers"-toolset (Image 6). </p><p>2. Click "Browse" button (Image 7) and locate the "Amhara_woredas.shp" -shapefile in the QGIS DATA/Shapefiles -</p><p>folder in Training QGIS-folder. </p><p>You can also use tools from the top menu bar: Layer -&gt; Add Vector Layer... </p><p>Latitude/longitude coordinates (degrees) can be converted to coordinates in meters. The mathematic formula is </p><p>not in the scope of this training course, but you can find converter for example from the webpage: </p><p>http://www.dmap.co.uk/ll2tm.htm </p><p>Image 5. How to select the coordinate system in CRS-menu </p><p>Image 6. Selecting the Add Vector Layer -tool from the Manage Layers toolset </p><p>http://www.dmap.co.uk/ll2tm.htm</p></li><li><p>COWASH Training QGIS 6 </p><p>Kimmo Koivumki kimmo.koivumaki@gmail.com MoWIE / COWASH GIS Expert +251 939 175 931 Addis Abeba </p><p>Working with GIS-software often involves lots of different file types. To make it easier to find the needed files it is </p><p>good to change the folder to show only those file types which are needed. </p><p>3. From the opening windows bottom right corner it is good to select ESRI Shapefiles (*.shp *.SHP) as a default to </p><p>help selecting only shapefiles in future. </p><p>4. Select the Amhara_woredas.shp-file (Image 8) </p><p>5. After selecting the file, click again Open-button. You will see all the woredas in Amhara according to the year </p><p>2007. </p><p>Same process is always used to add more data to the map. Raster files, like satellite images or orthophotographs </p><p>are added with Add Raster Layer button next to Add Vector Layer button. </p><p>Image 7. Click Browse to select the place for saving the file </p><p>Image 8. Changing the folder to show only shapefile (.shp) types of files </p></li><li><p>COWASH Training QGIS 7 </p><p>Kimmo Koivumki kimmo.koivumaki@gmail.com MoWIE / COWASH GIS Expert +251 939 175 931 Addis Abeba </p><p>BASIC OPERATIONS </p><p>ZOOMING THE VIEW AND MOVING THE MAP </p><p>Zoom your map using mouse roll or Zoom In-, Zoom Out-, Zoom to Selection- and Zoom Full tools (Image 9) </p><p>Get familiar with tools in Map Navigation-toolset (Image 10). Try Zoom In -tool dragging a square around desired area </p><p>with left mouse button pressed down. Try moving the map by keeping the mouse roll pressed down. If you dont have </p><p>mouse, use Pan Map-tool. Test also right clicking the layers name in TOC and selecting Zoom to Layer Extent. </p><p>You can turn the layers visible or non-visible by checking the checkbox on and off in Layers-menu (Image 11) </p><p>EXERCISE 1 </p><p>Add the Amhara_kebeles.shp file to the map using the same process which was used for Amhara_woredas-file. </p><p>ATTRIBUTE TABLE </p><p>Attribute table shows the data of the layer in table-format. For example woredas WASH-facility Excel-database will be </p><p>managed in GIS-software as an attribute table. </p><p>1. To find the woreda according to its name, right click the Amhara_woredas layer name in the Layers-menu and </p><p>from the opening menu select Open Attribute Table (Image 12). You can also use hotkeys CTRL + ENTER (or </p><p>Return). </p><p>Image 9. Different zooming-buttons </p><p>Image 10. Map Navigation toolset with "Pan Map" tool selected </p><p>Image 12. How to open the attribute table </p><p>Image 11. Changing the visibility of the layers between On and Off </p></li><li><p>COWASH Training QGIS 8 </p><p>Kimmo Koivumki kimmo.koivumaki@gmail.com MoWIE / COWASH GIS Expert +251 939 175 931 Addis Abeba </p><p>2. Click the W_NAME attribute of the first column from the top row of the attribute table. This will sort the </p><p>woredas into alphabetical order according to their names (Image 13). You might want to click it again to make the </p><p>database in reverse alphabetical order (Yilmana Densa is at the end of the alphabet). </p><p>3. Select your woreda from the list by clicking the row-number 140 on the left (Image 13). Minimize the attribute </p><p>table and see the woreda selected on the map. </p><p>CREATING A NEW SHAPEFILE FROM SELECTION </p><p>Woreda- and kebele maps are large in size which slows down the usage of the software considerably. In this exercise </p><p>we will select only the areas what we need. This allows better usability since the amount of data what computer has </p><p>to calculate is reduced. </p><p>Check that you have Amhara_woredas-layer active in your Layers-menu. If you have Amhara_kebeles-layer in the </p><p>TOC you can make it invisible by checking the checkbox on the left side of the layers-menu. </p><p>1. Select Yilmana Densa and the surrounding woredas with Select Features by area or single click tool (Image 14) </p><p>You can select multiple woredas by keeping Control (CTRL) key pressed down from your keyboard (Image 15). </p><p>Image 13. Listing the woredas alphabetically and selecting one woreda </p><p>Image 14. Selecting selection tool </p><p>Image 15. Multiple woredas selected </p></li><li><p>COWASH Training QGIS 9 </p><p>Kimmo Koivumki kimmo.koivumaki@gmail.com MoWIE / COWASH GIS Expert +251 939 175 931 Addis Abeba </p><p>After you have selected all the surrounding woredas around your study woreda you need to save the selected area. </p><p>2. Click the title of your Amhara_woredas layer in the Layers-TOC with right mouse button and from the opening </p><p>menu, select Save As (Image 16) </p><p>Give a distinctive name to your new shapefile. In this exercise woreda_selection is used. </p><p>3. Click Browse button (Image 17). Search the folder where you want to save your new shapefile. In training we use </p><p>QGIS-DATA-folder. </p><p>You can also draw a square around the woreda by keeping left mouse button pressed down with Select Feature(s) -</p><p>tool. Change the selection tool from the tools submenu by clicking the small arrow next to the tool. Try also the </p><p>other selection methods. </p><p>Image 16. Saving selected area as a new shapefile </p></li><li><p>COWASH Training QGIS 10 </p><p>Kimmo Koivumki kimmo.koivumaki@gmail.com MoWIE / COWASH GIS Expert +251 939 175 931 Addis Abeba </p><p>4. Remember to check the Save only selected features and Add saved file to map checkboxes. First assures that </p><p>you are only saving the area you selected and latter automatically adds new created layer to the map. After </p><p>clicking Ok, new shapefile is created. </p><p>5. Now you can remove the original Amhara_woredas layer from the map by right clicking the name of the layer </p><p>in TOC (Layers-menu) and selecting Remove. </p><p>6. Next remove the selection to be able to do new selection. Click Deselect Features from All Layers -tool which i