GIS Exercise

20 may 2003

Thomas Gumbricht

T.Gumbricht@CGIAR.ORG

 

 

Introduction to Data Capture with GPS

 

Requirements

This exercise requires a handheld (Garmin) GPS and PC interface cord, a (laptop) PC with Windows 95/98/2000, Windows NT, or later and the freewares DIVA-GIS 2.5 and DNRGarmin. To download and install ArcExplorer and DNRGarmin GPS see appendix 1. The necessary data are available on the RELMA_GIS1.0 CD. Sources of internet available data is given in appendix 2.

 

Recommended prerequisites

It is recommended that you do the exercise GIS and satellite image data analysis – Lake Nakuru, Kenya before doing this exercise.

 

Objectives

This exercise will give an introduction to data capture, editing and importing, and data quality . The objective of the exercise is that the students should understand how data is entered into GIS, and how attribute and vector data are related. After completing the exercise students should be able to use GPS for capturing data to a GIS.

 

Task

To pass the exercise a map showing field sites visited in the Nakuru area should be handed in.

 

Prepare your GPS

 

This exercise is written for an eTrex Venture of the Garmin personal navigator series. If you do have another GPS receiver you need to consult your instruction book. If you do not have a Garmin handheld GPS it is unlikely that the computer interface will work.

 

In this exercise we are working with geographical coordinates (latitude and longitude), and the WGS 84 datum. The default format for storing geographical coordinates in most GIS is as decimal degrees (i.e. full degrees, and minutes and seconds as ratios) rather than as degrees, minutes and seconds.

 

Start your handheld GPS. Go to the Main menu of the GPS and then to the Setup, in the Setup menu select Units. Make sure the Position Format is decimal degrees (e.g. hddd.dddddo ). In the Setup menu also check that the Interface is GARMIN. 

 

When travelling in the field it is often useful to track the movements, and hence you need to clear the set up the track log (and empty it if you have too much data in it). Go back to the Main menu and select Tracks. If you have Saved Tracks or data in the Track Log it is better if you can Clear these data. For the travel to out field area, use the Setup Track Log to set an Interval of 200 m. This will later give us a nice road map (which you will use for evaluating the accuracy of the road networks captured from Digital Chart of the World, or elsewhere). Make sure the Track Log is active (i.e. the On button appears pressed down in Tracks menu). Put the GPS inside the front screen of the car.

 

If your GPS can not hold large amounts of data, you can use a laptop computer for real time capture of GPS data (demands ArcView though). For long trips the battery capacity of most laptop computers is, however not sufficient. A good thing to have when doing field work involving computers is to have a 12 to 220 volt converter that plugs in to the cigarette lighter of the car.

 

Move the Nakuru database to your harddrive

 

In this exercise you will download data from the GPS and create several new map layers. Hence the database must be in a directory where you can not only read the data, but also write data. The database is on the RELMA_GIS1.0 CD in the directory …data/spatial/nakuru. To have access to the whole database it is recommended that you copy the data directory on the  RELMA_GIS1.0 CD (…data/) to your harddrive. By doing so you will also preserve the directory tree structure as it is given throughout this exercise.

 

Interfacing the GPS to a computer (after reaching the field area)

 

Connect the PC Interface Cable to the GPS and to the computer. Start the computer. To be able to read and write data from the GPS you must install a software in your computer. The RELMA_GIS1.0 CD contains 2 free softwares for interfacing with Garmin handheld GPS units. DnrGarmin (…software/) interfaces directly with ArcView (e.g. can be run inside ArcView for real time tracking on a MapView in ArcView). It has no limitations in data capture or transfer, and you can both download and upload data. For displaying tracks and waypoints DnrGarmin, however demands an additional software (for example ArcView, ArcExplorer or DIVA-GIS).

 

This exercise will rely on DnrGarmin, and the use of DIVA-GIS for capturing and displaying data tracks and waypoints from the handheld GPS. If you have not already installed DnrGarmin you must do that now.

 

Make sure the handheld GPS is connected and the Interface is set to GARMIN (see above), and then start the program DnrGarmin,  from the desktop. If the DnrGarmin icon is not on the desktop you must locate the source program, and start it from there. The program automatically searches for a connected GPS unit.

You can see the status of the search in the lower left corner of the DNRGarmin program interface. It should say Connected if successful.

 

Choose Track from the Dnr Garmin Menu and then Download. In the bottom centre of the interface you can see how data is transferred to the memory of the computer.

 

To save the downloaded tracks chose File in the DnrGarmin menu. As DnrGarmin is defaulted to connect to ArcView GIS(and not DIVA-GIS), you must Save As GPS Text File… Put the file under the …data\spatial\nakuru\GPS directory (i.e. the directory you created by copying the database from the RELMA_GIA1.0 CD on to the hard drive).

 

In this exercise we will use DIVA,  - a GIS freeware from The International Potato Center  (CIP) – see appendix 1 for instructions on how to retrieve DIVA from the internet and set it up. If the DIVA icon is not on your desktop you can find it on the Desktop via Start - Programs -  DIVA-GIS - DIVA. The source program is under C:\Program Files \DIVA-GIS\DIVA. Start DIVA.

 

The main parts of the DIVA interface are shown in the figure below. You will be presented with an empty project. The user manual for DIVA (DIVA-GIS2b.pdf) is available on the RELMA_GIS1.0 CD and also in the same folder as the program file. This manual can be read by using Adobe Acrobat reader (see appendix 1 for download of Adobe Acrobat).

 

In the interface you will notice that some menu and tool items are gray (fuzzy) that means that they are not available at the moment. Many items require that you have some themes in the view, (a theme is a maplayer in GIS jargong) and some that you have at least one theme active (this will soon be clear to you).

 

Map View

 

Legend

 

Menu bar

 

Tool bars

 

 


 

Before adding map layers you should set the default directory of the project. The data you will use is under …data/spatial/nakuru on the RELMA_GISCD1.0. Click Tools in the Menu bar and then General Options in the Pop-up menu, as shown to the right. In the Options dialogue you can set the Default Directory as shown below. Under the tabs you can set other general options.

 

Save the DIVA project,  give it a logical name. Remember to save the project frequently in case you should cause the program to crash or loose power supply.

 

To get a reference to the area you are working with you must add a backdrop image. Use the Add theme button,  and navigate to the directory Images. The Open (or Add Theme) dialogue will be empty. DIVA (like most other GIS) needs to recognize what kind of theme that is added. In the bottom center of the dialogue box you must hence select Images from the drop-down menu.

 

There are two Landsat satellite images available. Add the one from 2000.

 

Symbolizing data

 

Use Add Theme,  and navigate to the directory Infrastructure, add the theme with the road network and put it on top of the Legend by grabbing it with the leftmous button and dragging it to the top. Change the color of the roads to black. This is done from the Properties and Symbol dialogue that you open either via the Symbol tool, , by double clicking the theme in the Legend, or from the pop-up menu under Theme in menu bar.

 

There are three tabs in the Properties and Symbol dialogue. As we will use a Single symbol you only need to use the Single tab. Double click the line and set Style to DashLine,  Fill Color to black and  Size to 2 in the pop-up Symbol dialogue.

Click OK and then Apply in the Properties and Symbol dialogue.

 

Edit and import a data table

 

The text file you downloaded from the GPS must be edited in order for DIVA to understand it properly. To edit the text file either use Windows Explorer, . Navigate to the directory where you saved the text file with the downloaded GPS tracks and double click the file. If the file is small it will open in Notepad, , otherwise in Wordpad, .

You can also start any of these programs from the Start menu on the desktop and then Open the text file with the downloaded GPS track.

 

The downloaded text file is comma delimited, as shown below. The rows in the text file correspond to data records, and the ‘columns’ to data fields. Each row or record represents one downloaded GPS track point. In the example below each record contains 11 attributes or data fields. The fields either contain text, integer or real (decimal) values.

 

 

Using tabulated and positioned data as the downloaded GPS track is a common way to capture data to GIS. You could edit any part of the database to change or update it. But doing it from Notepad or Wordpad would be rather tedious and difficult. It is better to use a database program or excel. Here you only need to change one thing; the name of the 5th ‘column’ is new_seg – which DIVA can not understand (this is a bug in the program but it allowed for a pedagogic example of data editing and entry). Just delete the underscore ”_” so that it reads newseg instead of new_seg. Then save the text file again (it must be simple text file with the extension .txt or DIVA will not understand).

 

To import the downloaded and edited text file you must first convert it to a Dbase database (the database format of the Shape vector data model). In the drop-down menu under Data in the DIVA-GIS menu select Text to DBF.

 

In the Create dbf file from text file dialogue, select Input File and give an Output File. Choose Comma as the delimiter that separates your fields. Click the Check Box of First Row Contains Field Names. In order for DIVA to understand the content of the fields you must define the Data Type of each field (default is text). The lat and long fields are of decimal types. You must also scroll to the fields of altitude, depth and color, and set them to INTEGER. You will later use the altitude to evaluate the accuracy of the raster DEM over Nakuru. Click Apply to create the dbf file.

 

If the Text to DBF did not work it is most likely because your text file contains errors. Then you need to look at it again (i.e. in Wordpad), or start all over by downloading it from the GPS.

 

The last step to import the data is to convert the Dbase file to a Shape file. This is done from the drop-down menu under Data in the manu bar where you select Points (DBF) to Shapefile. From the pop-up dialogue select the fields that represent Longitude and Latitude. Give an Output File and then click Apply.

 

 

 

Remember that there was a positional mismatch between the satellite image and the vector data layers used in the exercise Introduction to GIS and Satellite Data Analysis – Lake Nakuru, Kenya. You should now have the answer in you Map View, as shown to the right.

 

 

 

Field data collection

 

If you captured the GPS track successfully you can now delete it from the handheld GPS. Change the Log Setup (in the Track Menu) to take a record at 20 m interval instead of 200. This will record your movements in the field area with greater precision. During the field work you should frequently save waypoints to the GPS. You can give them logical names already in the GPS (rather than just accepting the default numbering), but that might take too much time. And you can not enter a very long identifier either. Hence it is better to make use of a notebook. (I use a digital video camera to record the landscape and voice recording for waypoint numbers).

 

During the field day you should use the GPS and a note book to record positions of rivers, road crossings (as that will help in geocorrecting the captured data). But more important is to record areas with forest cover, both natural forests and plantations. If you have botanical and geological knowledge, you should also note occurring species, soil type and bedrock if you see an outcrop. As forests are ‘polygons’ in a GIS context, you must also make notes of the extension of forests, including direction from the Waypoint and, if possible width and length. If you have time the best is to use the track log and walk around the forest, by doing that you can later create a polygon directly. If you walk around the forest do not forget to take a Waypoint and so that you later can separate your forest walks from each other. A better option is to save the tracks from transport routes between field sites and tracks from forest walks as separate tracks in the GPS. In the Garmin GPS this is done by using the Save option in the Tracks menu. If you give the saved tracks logical names they will be easy to identify when you download them. It is better if you clear the Track log each time after saving it, as otherwise you will get redundant data.

 

When you have finished your fieldwork you should download both Tracks and Waypoints and import them to DIVA-GIS. Follow the steps in the section on Edit and import a data table above.

 

If you want to create separate themes for the forest walks but did not save them separately in the GPS you can cut the section representing a particular forest out of the track log and save them under a separate name. To do that you must have some identifier, which must be either time or a position. The latter of course being the preferred, and can be achieved through recorded Waypoints.

 

Your turn

 

To complete the exercise you should put your capture Tracks and Waypoints on a map layout showing the road network and the rivers on top of a satellite image. When you are satisfied Print or Export the final map (under Project in the menu bar).

 


Appendix 1: How to get DIVA-GIS from the internet

 

Use a web-browser (Netscape, Internet explorer) and navigate to the homepage of DIVA-GIS at the International Potato Centre (http://www.cipotato.org/diva). Read about DIVA-GIS and then press Download (version 2.5 is the latest at the time of writing this instruction). Download both the file diva2e.zip, also download the User Guide, DIVA-GIS2b.pdf.

 

Close all windows applications that are running on your PC and install DIVA-GIS ting the program diva2e.zip (the program that you downloaded). To be able to install DIVA-GIS you must have administrative rights on the computer you are using – if you do not have that you must ask your system administrator to help you. When you install the DIVA-GIS the default path for installation is “Program files\DIVA-GIS”. It is recommended that you accept that.

 

If you get stuck or do not understand a command, please refer to the User Guide that you downloaded (DIVA-GIS2b.pdf). This document is in pdf format, which you can read using Adobe acrobate reader. If you do not have acrobat reader on your computer you can download it from http://www.adobe.com/. Installation is done in a similar manner as the DIVA-GIS installation described above.

 

Appendix 2: Free data from the internet used in this exercise

 

For more comprehensive information on data available over the internet see the document Spatial Data and Applications for Environmental Studies in Africa. The exercise GIS Data Mining on Internet introduces using ArcExplorer for direct linking to map resources on the internet. It also includes examples of how to find and download other datasets, including Digital Chart of the World (DCW), which is a comprehensive dataset with global coverage. DCW data covering the RELMA countries (Uganda, Ethiopia, Eritrea, Tanzania, Kenya and Zambia) is available on the RELMA_GIS1.0 CD (under …data/spatial/DCW). To import the DCW to ArcExplorer you must use special software (Import71), which is also supplied on the RELMA_GIS1.0 CD. It is however not trivial to import this data, but you can find the instructions in the exercise Data Mining on Internet.