7.03 Tutorials on Some GIS Operations

Ver 1.0


7.03.01 Georeferencing Tutorial

      Introduction
      Georeferencing is the first step when making analogue data digital. After Georeferencing, digitizing procedures follow so that the features of the analogue map also will be digital.

      In this tutorial you will georeference an analogue Geohazard map over Laurel. Thus, the output of this tutorial is a georeferenced map that can be used for further digitizing. However, the objective of this tutorial is only to introduce you to the steps of Georeferencing. Therefore, the exercise won’t include more than Georeferencing.

    Getting started
    1. Open ArcMap, select a new empty map. You will now save the map file. Select File > Save as… from the menu bar. Browse to the folder C:\CLUP_EXERCISE_DATA\ and type ‘Georeferencing_v1.mxd’. Click Save/OK.

    2. Add the image file, GeohazardmapLaurel.jpg to ArcMap. . Click on the add data button and browse to C:\CLUP_EXERCISE_DATA\03_EN\ and select the file. Click OK. (The image is added to the workspace, see below.)

    3. In the menu bar select View > Toolbar > Georeferencing to get the Georeferencing tool bar. The Georeferencing tool bar will appear on your screen. (See image below.) You can drag and drop the tool bar to a suitable place within the ArcMap window.

      Identification of control points
      First thing is to identify the quality of possible control points (at least four). The best thing is if your source data contains a grid with coordinates. Then you should use grid intersections as control points. If the source data doesn’t include a grid then you can choose road intersections, buildings and other obvious landmarks as control points. They have to be identifiable in other reference data (your digital datasets) because you will get the coordinates from this data.

      In our image GeohazardmapLaurel.jpg we have a grid that we will use to select control points (see image below).

    Image with four (4) control pointsImage with four (4) control points

      We will use the grid intersections 1-4 in the picture above as Control points. You find the Xmap and YMap values as LAT and LONG in degrees and minutes sign to the map grid lines at the left and at the top of the map In this case the geographic coordinates are in degree-minute-second (DMS) format and we have to convert them to decimal degrees, see table below with the coordinates for the four control points. (120°30’30’’ is computed as follows: 120+(30/60)+(30/3600) = 120.5083333).

    
Table with our control points’ coordinates
    Table with our control points’ coordinates

    Adding Control points
    4. Click on the Add control points button in the Georeferencing tool bar (see image below).

    5. Zoom extensively into control point number 1 (upper left point, refer to the image with our control points above). Place the cursor as accurately as possible on the point (see example below). Click the left mouse button once.

    6. Move the cursor a short distance in any direction, then right-click. You see a line between a green point and a red point and a menu with two alternatives appear where the cursor is. Select Input X and Y… The Enter Coordinates window will appear, see below.

    step6step6

    7. Enter the coordinates for the first control point (refer to table above). Then click OK.

    8. Repeat step 4-7 for the three remaining control points.

    9. Now you will verify that you entered the correct coordinates. To do this, click on the view link table button on the Georeferencing toolbar (see image below).

    10. The Link Table window appears (see image below). Verify that you entered the correct coordinates. If you have made a mistake it’s easy to correct the coordinates by clicking in the coordinate columns (X Map or Y Map). You can also delete a control point by selecting the appropriate row in the Link Table window and pressing either Delete key on your keyboard or the Delete button, see second image below. If you do so, you have to repeat step 5-7 for the point that you’ve deleted.

    11. Check the Total RMS Error, which is found right above the OK button in the Link Table window. If this value is much higher than --- you have done something wrong with one or more control points. The point(s) with a high value in the Residuals column must be deleted and then re-added following step 4-7 again. If the Total RMS Error is acceptable click on OK to close the link table.

      In the steps above you encountered a green and a red point when adding each control point. The green point (the one placed on the control point) is referred to as the ‘source’. The red point (placed on a small distance away) is referred to as the ‘target’. In our example this is somewhat theoretical, since we don’t have to bother about the position of the red target point. This is due to the fact that we already have the real-world coordinates to the control points. In step 7 we provided ArcMap with these coordinates.
      However, in other georeferncing cases we might not have a grid with coordinates. In such cases we’ll have other control points that consist of (for example) road intersections and buildings. If so, we first need to place the cursor in the same way as above, as precise as possible, on the control point. Then, we need to place the cursor (that is targeting the red point, also as precise as possible) on the corresponding road intersection/building in our reference data (which we in such cases would have added to ArcMap).
      These are two examples on how we assign real-world coordinates to our control points. ArcMap will now calculate a formula to transform the image so that it fits the best possible to the chosen (target) coordinate system. The final transformation is known as rectification.

    Rectification
    12. Select Georeferencing > Rectify… (see image below).

    13. The Save As window appears. Don’t change any of the default settings (if they are set as in the picture below). Click Save to start the rectification.

    14. Select Georeferencing > Update Display to view your results. The Georeferencing procedure is now finished.

      This exercise is now finished. An example of what you could proceed to do now is to digitize the different geohazards into different layers, and thus extend your CLUP digital dataset. For the sake of Laurel, this has already been done. Unless you don’t want to rehearse your digitizing skills, you certainly don’t have to carry on with this.

Ver 1.0


7.03.02 How To Create Shapefiles

    In this exercise we will create a new shapefile from scratch. This new shapefile will be joined with attribute data in tutorial 7.03.03

Getting started

  1. Start ArcMap. A window with three alternatives appears. (See image below.) Choose A new empty map. Click OK.

  2. Start ArcCatalog by clicking on the ArcCatalog button in the toolbar. The ArcCatalog window appears.

  3. Navigate to the C:\CLUP_EXERCISE_DATA\01_SE\ folder in the catalog tree.

    Creating New Shapefile

  4. From the ArcCatalog menu bar, select File > New > Shapefile… (see image below).

  5. The Create New Shapefile window appears (see image below). In the Name field type ‘SE20_SchCap08’. Choose Point in the Feature Type dropdown list .

  6. Click Edit to define the shapefile’s coordinate system. The Properties for Spatial Reference window opens.

  7. Click Select. The Browse for Coordinate System window appears. Navigate to the Geographic Coordinate System/Asia/ folder. Select Luzon 1911.prj, click Add. Back in the Properties for Spatial Reference window, click Apply, then OK.

    When the Properties for Spatial Reference window first opened, three alternatives were given: Select; Import; New. A smooth way to set the coordinate systems is to use the Import alternative. You will browse to an already existing shape-file and copy its spatial properties to the new shapefile. In the best case scenario a CLUP dataset collection will only consist of dataset in the same coordinate system and the Import alternative will be very easy. In other cases you must of course be aware of and choose a shapefile with the correct spatial settings.

  8. Click OK. The new shapefile is created.

    Adding Field to the Shapefile

  9. We will later join attribute data to this shapefile. In order to prepare for this we need to create an index column – or field - that corresponds to the template found in Chapter 5. Right-click on the shapefile in the catalog tree, then select Properties. The Shapefile Properties window appears.

  10. Go to the Fields tab, see image below. Click on an empty row in the Field Name column and type ‘SCH_ID’ as the name of the new field. Select Long Integer from the Data Type drop list. In the Length field under Field Properties type 10. Now click Apply and then OK.

    You are done with this exercise.


Ver 1.0


7.03.03 Create Attribute Table in Excel and Join in the GIS Software

In this exercise we will build up an attribute table for a planning subject and make necessary arrangements so the data can be linked to the features of the subject on the map in the GIS software.

ARRANGING THE DATA

Keywords: Excel, dBASE

Software: Excel, ArcGIS 8/9.x

Preconditions: Folder directories for the CLUP has been created previously; see 3.04.02 Data Preparation for more information. The data to be encoded has been gathered from the field. Spatial layers needed have been prepared beforehand.

The building up of the attribute data will be done in Excel.

The ‘Instructions’ sheet in Quick Look gives you information what to consider at data gathering and where to find the templates you need for the specific table.

From these instructions this table IS01 is defined as a Key table meaning that all LGU’s should prepare it for analysis purposes in the CLUP. However, some of the columns (“A”) might have a light yellow colored background (meaning the data is “Optional”) as opposed to the light green colored columns (it is a “Required” data). In the example below which describes segments in a road network, the data for ‘width’ (of the road) column may not be required if it is very hard to get. Each column has corresponding codes (“B”) for the Field Names.

The data to be encoded for the respective road segment is (hopefully) prepared by the caretaker of the municipal road management (the Engineering Department). He/she is the custodian of the attribute data and in this case he/she has managed to get the data. On the other hand, if in case the road has no individual name, that column is blank. So the populated dataset to start from will look something like this:

The data to be encoded for the respective road segment is (hopefully) prepared by the caretaker of the municipal road management (the Engineering Department). He/she is the custodian of the attribute data and in this case he/she has managed to get the data. On the other hand, if in case the road has no individual name, that column is blank. So the populated dataset to start from will look something like this:

For example, you can see that the road segment with ID 101 is a municipal road, has a gravel surface and is in a poor condition.

The next step is to convert the file to dBase format. Unfortunately dBase is an old MS Dos format which means that the dataset must be very ‘clean and appropriate’ to be used.

In the example below the data has been encoded already digitally so there is an opportunity to start from that. If the data is still in a paper format, it is recommended to use the GIS Table to encode the data and save it in dBase format. (How to will be explained later).

Highlight and copy the cells that should be found in the dBase file:

Open a new Excel file and paste in cell A1. Save the file with a filename in the specific CLUP GIS folder as recommended in the Quick Look.

Before saving the file in dBase format, some pointers are needed to be remembered:

The field name of each column must be in a single cell dBase format. Highlight the column head and do procedures A, B and C to format the field name:

Only one sheet is allowed in dBase. Remove sheet 2 by right clicking on the flip and choosing delete. Do the same procedure with sheet 3:

Highlight the cells with the information, then from the File menu select Save As…, navigate to the CLUP directory, (1) locate the specific sector you are working on and into the GIS folder. (2) In the Save as type select dBase4 format and (3) type the name of the file preferably the same as the Excel file:

Click Save:

A Dialogue box will appear, informing you to save only the active sheet.

Click OK:

Another Dialogue box will appear asking if you want to keep the workbook in its existing format.

Click exit (1) and Yes (2)

A Dialog box will appear asking if you want to save changes you made to the file.
Click YES.

Again the Dialog box informing you that the only one to be saved is the active sheet will appear.

Click OK again.

Then a another Dialog box informing you that the file may contain features that are not compatible with DBF 4 (dBASE IV) and asking if you want to keep the workbook in that format.

Just click YES.

Please remember to have Excel closed when you work with ArcView.
If you want to revise a .dbf file you should close ArcView before you open Excel.
Now it is time to join the attribute data with the shape file you have made for the road:
Open ArcView and open the project you were working on before. Right click on the road layer and select ‘Join…’:

  1. Id’ was the column head or field name where you encoded the unique IDs for the road segments.

  2. IS01_RdYr’ is the name of the dBase table you have prepared that contains the attribute information of the road segments.

  3. RD_ID’ is the field name of the column where the unique ID has been encoded.

  4. Click OK

Let’s see how the table looks like by opening the Attribute Table.

The columns from the dbf table have been integrated into the road segment table:

To make it easier to read we need to hide some columns and give proper alias. Right click on the file name and select ‘Properties…’:

Select Field. Select name by name (A), un tic if it should not be visible (B), if it will be kept visible type an alias in the box (C) and click OK (D):

Ver 1.0


7.03.04 Buffering Tutorial

Disclaimer: The objective of this tutorial is to get familiar with the GIS software. The tutorial only covers some parts that are being done In a real analysis. The results that are being displayed in the tutorial can’t be compared with the results a real analysis would generate.

Introduction

The objectives of this exercise are to arrange layers properly and to use the buffer wizard to create a buffer. The scenario is to prepare an analysis based on right of way for existing and planned electrical transmission lines and try to identify eventual conflicts to existing land-use, urban areas in particular.

1 Getting started
1.1 Open ArcMap. Select the A New empty map option.
1.2Click on to add the IS17_Tl2007 (transmission lines) layer to the work space. It is found in C:/ CLUP_EXERCISE_DATA/02_IS/ folder. Click Add.

Also add some base map features from the C:/ CLUP_EXERCISE_DATA/00_BM/ folder such as barangays_bndry, Lake and Roads. To identify conflicts with residential/urban areas we need to add a land use layer. Add the LM01_ExiLu2007 layer from the /04_LM/ folder.

1.3 Rename the IS17_TI2007 layer to Transmission Lines. To do this, right-click on the layer in the table of content, select Properties. The Layer Properties window opens. Go to the General tab and type the new name in the Layer name field. (See image below.) Click OK. (You can also click on the layer in the table of content and type the new layer in the table of content without opening the Layer Properties window.)

1.4 Also rename LM01_ExiLu2007 to ‘Land use’ and barangays_bndry to ‘Barangay boundaries’. (Repeat step 1.3 on these layers.)
1.5In the menu bar click File > Save As… to save a map document as buffering_v1 in /CLUP_EXERCISE_DATA/06_Workfolder/. Don’t forget to save your progress now and then throughout the exercise.
2 Applying Symbology
2.1First of all arrange the layers in the following order (from top to bottom): Transmission lines, Roads, Barangay boundaries, Land use and Lake. Simply drag the layers in the table of content so that they are positioned in the correct order.
2.2Open the Layer Properties window (refer to step 1.3 if you forgot how to do this) and go to the Symbology tab for the Transmission Lines layer.
See image below. At the left, click on Categories and click Unique values, many fields. Then choose TL_VOLT from the first Value Fields list menu and TL_NAME from the second Value Fields list menu. Click the Add All Values button.

2.3Uncheck the symbol for . Place the cursor over the words TL_VOLT, TL_NM in the Label-column. Click once. You can now edit the label to ‘Voltage (kV):’. In the same way rename the label for 230, Planned 2008 to ‘230 (planned’). Delete the comma after 69, 230 and 500. Click Apply.
2.4Now right-click on 500 (in the Value column), select Properties for selected Symbol(s). The Symbol Selector window will open. (see image below). Click More symbols and select Forestry. To the left, search and select the T23 Pipeline 2 symbol. Choose width 9,00. Click OK.

2.5(Back in the Layer Properties window, click Apply if you want to update the map.) Repeat step 2.4 on the other categories (other voltage). Use the same symbol but the size ‘7,00’ for 230 and 230 (Planned) and size ‘5,00’ for 69. Click Apply.
2.6To be able to separate the planned distribution lines from the already existing ones, open the Symbol Selector window for 230 (Planned) once more. Click Properties. The Symbol Property Editor window appears. In the Layers box at bottom-left, select the line symbol (see image below).

2.7Select Simple Line Symbol from the Type list menu. The settings in the window changes to Simple line. From the Style list menu, select Dotted, as seen in the image below.

2.8Click OK and OK again.
2.9Now go to the Symbology tab in the Layer Properties window for the Land Use layer. Click Import. The Import Symbology window opens. Select the first option "…from a layer file” and browse for landUse.lyr (found in /LM_04/ folder and click Add. Click OK in the Import Symbology window. The Import Symbology Matching Dialog window opens. Select ELU_TP from the Value Field list menu. Click OK.

If this worked well the Symbology tab should now look like in the image below. If it didn’t work out, follow the procedure as in step 2.2 but select only Unique values and assign symbols based on the ELU_TP field (refer to 4.21.03 for proper color coding).

2.10As you can see in the map, and from the order of the layers in the table of content, the Barangay boundaries layer covers the Land use layer (the nice palette in the land use layer cannot be seen in the map). Now, assign proper symbology for the Barangay boundaries layer – that is no fill-color (select No color and Boundary, neighborhood as outline symbol (click Properties in the Symbol Selector window and Outline in the Symbol Selector Editor window).

A tip! Since you don’t need to categorize the symbology as in step 2.2-4 here, use this shortcut: Simply double-click on the symbol next to the layer’s name in the table of content, and the Symbol Selector window will appear right away. Assign the proper symbology from here.

If you add a polygon layer such as land use/coverage or built-up areas, this should be at the bottom. Then, polyline layers such as roads and rivers can be displayed atop on the polygon layer. This is also the reason why we assigned no fill-color to the Barangay boundary layer – the boundaries will now be shown atop of the other layers, whereas the barangays’ areas (or more correct: surfaces) will be completely transparent.

2.11Verify that your layers are in a correct order (so that all features are displayed properly) and also have proper symbology. To change the order, simply drag each layer up or down in the table of content. See image below.

3 Creating a Buffer

From the map we can see that the proposed new power line will cross through urban areas and it could be interesting to analyze the negative impact on existing urban settlements. The next step is therefore to do the buffering. Creating a buffer provides a visual representation on the map of the area within a certain distance of one or more features. We can also use the buffer to select features in other layers that fall within the buffered area..

3.1In the menu bar click Tools > Customize. The Customize window opens (see image below). Go to the Commands tab and select Tools in the Categories box at the left. Click the Buffer Wizard icon in the Commands box to the right. Drag the icon and drop it in the Toolbar. Click Close.

3.2Now click the Bufferd Wizard icon that you just dropped in the toolbar (). The Buffer wizard window appears (see image below). Select The features of a layer. In the list menu below, select Transmission Lines. Click Next. [/b].

3.3Refer to the image below. Select At a specified distance and type the distance. The buffer for a 500 kV transmission line is 65 m.
Select Meters from the Distance units arelist menu. Click Next.

3.4Refer to the image below: Select Yes to Dissolve barriers between.
Select In a new layer. Specify output shapefile or feature class. Click on to define the output folder /CLUP_EXERCISE_DATA/06_Workfolder/ and type the filename ‘Transmission_lines_buffer_65m’. Click SavE then Finish.

3.5Change symbology on the Transmission_lines_buffer_65m layer to a hatching symbol. You are now done with the exercise. The result will look something like this (zoomed in a bit where the planned transmission line starts):

It seems that the alignment of the will cause impact on substantial parts of the urban settlements. If an aerial photo or a cadastre dataset would have been available it would have been quite easy to point out what lots/parcels that will be affected. Maybe it is a good idea to try an alternative route for the new transmission line?

Ver 1.0


7.03.05 Tutorial on Creating Population Density Map

1. Open the file BI04.xls located at C:\CLUP_TRAINING_DATA\00_BI\02_Demography\Tables\.
Notice the three tabs located at the bottom of your worksheet. They are:

    Be sure that GIStable tab is selected when we open the file. (See above image)

    Your worksheet heading should look similar to the image below.

2. Next, open the file BrgyPop.xls located at C:\CLUP_TRAINING_DATA\00_BI\02_Demography\Tables\.

3. From this worksheet, highlight the data entries of field BRGY_ID, which is Barangay ID. Click Edit from the menu and then select Copy from dropdown menu.
(See image below)

4. Switch back to workbook BI04 by clicking the button, located at the bottom of your worksheet.
(See adjacent image)

5. Be sure to place the cursor in the second row of column B_ID, as shown in the image. Click Edit from the menu bar, then select Paste or press Enter.

6. Repeat Steps 3 and 4 to copy and paste the data entries of the following:

    BRGY NAME - B_NM
    TOTAL POPULATION - B_POP_00
    NO. OF HOUSEHOLDS - B_NO_HH
    DENSITY - B_POPDEN

    In the case of the field DENSITY in worksheet BrgyPop.xls, wherein the values are generated by formula, perform the following tasks otherwise it will display a different value in the target worksheet.


    6.1 From worksheet BrgyPop.xls, highlight the data entries of field DENSITY. Click Edit from the menu then select Copy from dropdown menu.
    (See image below)

    6.2 Repeat Step 4. Place the cursor in the second row of column B_POPDEN, as shown in the image, then right click. Select Paste Special… from dropdown menu.

    6.3 A Paste Special window will appear. Select the radio button of “Values”. Then, click OK button.

7. When you are done, save it to dbf format by highlighting the worksheet, as shown in the image. Click File from the menu then select Save As…

8. From Save As window, browse to the folder in Save in: list menu where you want to place the file, then type appropriate filename in the File name: list menu.
(e.g. BrgyPop_Dense) Select DBF 4 (dBASE IV) in the Save as type: list menu. (See image below)

    Click Save button. Then click OK and Yes respectively for the next two alert boxes that will appear.

9. Exit Excel.

10. Open ArcMap. A pop up window with three options will appear. They are:

    A new empty map
    A template
    An existing map

    By default, A new empty map is selected. Click OK.

11. Select File from the menu, then choose Save As. . . from drop down menu.

12. From Save As window, click the Save in: list menu to browse to the folder where you want to place the file. Type appropriate file name (e.g. BrgyPop_Density) in File name: list menu. Then select ArcMap Documents in the Save as type: list menu.

    Click Save button.

13. Next, click File from the menu bar, then select Add Data in dropdown menu to add the layer bndbgy_pgon located at C:\Training\PopDensity\Shapefiles.

    Or click the icon Add Data in the toolbars menu. (See image below)

14. From Add Data window, click Look in: list menu then browse to the folder where the file is located. Click the layer to select, then click Add button to add the layer in your workspace.

15. In the Table of Contents, click to highlight the layer. Right click and select Label Features.

      Then, click to highlight the same layer. This time select Convert Labels to Annotation…

16. In Convert Labels to Annotation window, just select In the map option.

    Click Convert button.

17. Repeat Steps 13 & 14 to add a dbf file (BrgyPop_Dense.dbf) in the Table of Contents located in C:\Training\PopDensity\Tables.

18. In Table of Contents, click the dbf file to select, then right click. Choose Open in the pop up menu to open the table in Arcmap.
(See image)

19. Repeat step 18 to open the attribute table of the layer file (bndbgy_pgon). This time select Open Attribute Table in pop up menu, as shown in the image,

By comparing the two tables, they have an identical column in terms of data entries which are unique to both of them. They are BRGY_ID and B_ID fields respectively which are Barangay ID. (See image below)

20. Close both the tables. In the Table of Contents, click the bndbgy_pgon to select. Right click and select Joins and Relates then Join. . . respectively.

21. A Join Data window appears. Select Join attributes from a table in the first list menu. For the other numbered list menus (1-3), select the ff:

    1. BRGY_ID
    2. BrgyPop_Dense
    3. B_ID

    Click OK.

You will notice that nothing happens after you click the OK button. But when you open the attribute table of the layer, you see a lot of strangely named columns which is difficult to interpret due to the joining process.

22. The next step is to rename the layer. In the Table of Contents, click the layer to select, then right click. Choose Properties in the dropdown menu.

23. In Layer Properties window, select General tab. Type to rename the layer
(e.g. Population Density By Barangay) under Layer Name: box, as shown in the image below.

Don’t click Apply or OK yet!

24. In the same window, select Fields tab. You will now choose which fields will be visible and assign a proper alias to them, and which fields should be hidden, by simply clicking the checked box to uncheck it.

    To assign a proper alias to the field, simply click once over the field to select. Then, type to rename it (e.g. Barangay ID). (Refer to image below)

The following fields that should be selected and assigned proper alias are:

      bndbgy_pgon.BRGY_ID - Barangay ID
      bndbgy_pgon.NAME - Barangay Name
      BrgyPop_Dense.B_POP_00 - Population
      BrgyPop_Dense.B_NO_HH - No. of Households
      BrgyPop_Dense.B_POPDEN - Population Density

    Click Apply, then OK.

After cleaning and improving the joined table, the result should like this:

25. Close or minimize the attribute table.

The next step is to change the symbol of the layer “Population Density By Barangay” for a better presentation.

26. Right click the layer in the Table of Contents, then select Properties in dropdown menu.

27. From Layer Properties window, select Symbology tab. Then, do the following selection as shown in the image below:

    a. Select Graduated colors under “Quantities”
    b. Choose Population Density from the list under “Value:”
    c. Choose 3 from the list under “Classes:”
    d. Click Classify button.

7.3.5 Step 277.3.5 Step 27

28. A Classification window will appear. Click to mark a check under “Show Mean”.
Notice the dashed gray line that will appear which is the “Mean”. Click OK.
(Refer to image below)

29. Finally, click Apply and OK button when the Layer Properties window appears.

[listIf your workspace looks similar to the image below, you have done it successfully.

Congratulations!

Don’t forget to save your effort.