You are on page 1of 50

# Spatial Analysis and Model Builder

ArcGIS Spatial Analyst provides a broad range of powerful spatial modeling and analysis
capabilities. You can create, query, map, and analyze cell-based raster data; perform integrated
raster/vector analysis; derive new information from existing data; query information across
multiple data layers; and fully integrate cell-based raster data with traditional vector data
sources.
With ArcGIS Spatial Analyst, some examples of the things you can accomplish include:
Derive new information from existing data.
Apply Spatial Analyst tools to create useful information from your source data.
Some examples of things you can do include deriving distance from points, polylines,
or polygons; calculating population density from measured quantities at certain
points; reclassifying existing data into suitability classes; or creating slope, aspect, or

## Find suitable locations.

5-1

Find areas that are the most suitable for particular objectives (for example, siting a
new building or analyzing high-risk areas for flooding or landslides) by combining
layers of information.
For example, based on a set of input criteria defining that areas of vacant land with
the least steep terrain that are nearest to roads would be most suitable for a
development project, the following graphic shows the most suitable locations in
green, medium suitability in yellow, and the least suitable locations in brown.

## Perform distance and cost-of-travel analyses.

Create Euclidean distance surfaces to understand the straight-line distance from one
location to another, or create cost-weighted distance surfaces to understand the cost
of getting from one location to another based on a set of input criteria you specify.

You can calculate the distance in a straight line from any location (cell) to the nearest
source, or you can calculate the cost of getting from any location to the nearest source.

5-2

## Identify the best path between locations.

Identify the best path or optimum corridors for roads, pipelines, or animal migration,
factoring in economic, environmental, and other criteria.

The shortest path might not be the least-costly path, and there might be several
alternative corridors that could be taken.

## Perform statistical analysis based on the local environment, small

neighborhoods, or predetermined zones.
Perform calculations on a per-cell basis between multiple rasters, such as calculating
the mean crop yield over a 10-year period. Study a neighborhood by calculating, for
example, the variety of species contained within it. Determine the mean value in each
zone, such as the mean elevation per forest zone.

5-3

## Interpolate data values for a study area based on samples.

Measures a phenomenon at strategically dispersed sample locations and predict
values for all other locations by interpolating data values. Create continuous raster
surfaces from elevation, pollution, or noise sample points. With a set of point spot
heights and vector contour data, create a hydrologically correct elevation surface.

## Clean up a variety of data for further analysis or display.

Clean up raster datasets that contain data that is either erroneous, irrelevant to the
analysis at hand, or more detailed than you need.

5-4

What is ModelBuilder?
ModelBuilder is an application you use to create, edit, and manage models. Models are
workflows that string together sequences of geoprocessing tools, feeding the output of one tool
into another tool as input. ModelBuilder can also be thought of as a visual programming
language for building workflows.

While ModelBuilder is very useful for constructing and executing simple workflows, it also
provides advanced methods for extending ArcGIS functionality by allowing you to create and
ModelBuilder can even be used to integrate ArcGIS with other applications.
The benefits of ModelBuilder can be summarized as follows:
ModelBuilder is an easy-to-use application for creating and running workflows
containing a sequence of tools.
You can create your own tools with ModelBuilder. Tools you create with ModelBuilder
can be used in Python scripting and other models.
ModelBuilder, along with scripting, is a way for you to integrate ArcGIS with other
applications.

5-5

## GIS Laboratory Exercise 5a Exploring the ArcToolbox

Objectives:
In this exercise, you will:
- Be able to orient yourself with ArcToolbox
- Locate some of the ArcInfo tools

## Exploring the Toolbox

To be an effective GIS desktop application it should have almost all the necessary tools for
processing. In ESRI ArcInfo 10, the necessary geoprocessing tools are made available to users. It
might be for 2D or 3D processing requirements. For this part of the exercise, we will locate
ArcToolbox. ArcToolbox can be accessed through ArcMap or ArcCatalog.
o Run ArcCatalog.
o On ArcCatalog toolbar, move your mouse over the ArcCatalog icon . A description
appears that signify the name of the button which is ArcToolbox window.
o Click on the ArcToolbox icon to open the ArcToolbox window. ArcToolbox window can
also be accessed by clicking Geoprocessing menu then ArcToolbox (as shown below).

A dockable window will now appear bearing the name ArcToolbox. You can dock this window to
any area within ArcCatalog.
1. Observe how ArcToolbox organized the tools. What did you observed?
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
o From the ArcToolbox window, expand Conversion Tools and expand To Geodatabase.
Right-click on Cad To Geodatabase and select Help from the pop-up menu.
2. State the capability and usage for this tool. (Hint: Base your answer from the Summary.)
_______________________________________________________________________
o Close the ArcGIS 10 Help window.
5-6

o Put your attention to the Catalog Tree docked window (this is by default located on the
left side of ArcCatalog).
The Catalog Tree dockable window shows the Folder Connections, Toolboxes, and other
hierarchical representation of ArcInfos components. This of course would depend on your
settings using the ArcCatalog Options.
o Click on the Customize menu and select ArcCatalog Options.
o If necessary, select the General tab. From the list on the General tab, make sure that
only Folder Connections (always shown) and Toolboxes are checked. If necessary,
uncheck Hide file extensions and click OK.

## Creating Personalized Toolbox

As you have observed, only the items you checked on the ArcCatalog Options General tab is
now available. Hiding the items that are not necessary for now will be more helpful in
organizing the ArcCatalog Tree.
o Using the ArcCatalog Tree expand Toolboxes. Using the knowledge of the path you
learned earlier, locate CAD to Geodatabase.
o From your Folder Connections, connect to your home directory (e.g. Z:\).
o On the ArcCatalog Tree, right-click on the home directory you have added, select New
and click on Toolbox.
o Check that on the center pane the tab is set to Contents.
On the center pane, observe that Toolbox.tbx with a type of Toolbox has been created. Using
this feature, you will be able to organize your own set of tools that you will need for your GIS
processes.
o Rename Toolbox.tbx into myToolbox.tbx. (Hint: Right-click on Toolbox.tbx and click
Rename.)
o Again using either the ArcToolbox window or the Catalog Tree, right-click on the Cad to
Geodatabase tool and click Copy.
o Right-click on your myToolbox.tbx toolbox container and select Paste.

5-7

Observe that the tool is now copied to your myToolbox container. This would give you the
comfort of locating your needed tools. Still your myToolbox can contain another type of
container inside which is call a Toolset. A Toolset is like a folder that can contain the actual
tools. Using the Toolset will allow you to segregate your tools according to their uses or by any
o Using the Catalog Tree right-click on your myToolbox, select New and click Toolset.
o Rename the Toolset into Conversion Tools.
o Right-click on the CAD to Geodatabase tool located inside your myToolbox and choose
o Right-click on your own Conversion Tools toolset and select Paste.
An error message appeared telling us that the copying of the tool was unsuccessful (as shown
below).

This is because we already have the existing tool within our myToolbox. Therefore, we have to
remove first the tool and make a copy once again, but this time specifying the toolset as the
destination.
o Right-click on the CAD to Geodatabase tool inside your myToolbox and choose Delete.
Click Yes on the Confirm Delete window.
o Once again locate CAD to Geodatabase tool from the ArcToolbox/System Toolboxes,
right-click on it and paste it to your Conversion Tools toolset within your myToolbox.
ArcInfo restricted the user to contain multiple copy of the same tool within a user toolbox. This
is an effective way to eliminate conflict of existing tools. Therefore, you have to be precise in
naming your toolset, let it be more specific but brief.
o Close ArcToolbox window and the ArcCatalog application.

5-8

## GIS Laboratory Exercise 5b Spatial Analysis

Objectives:
In this exercise, you will:
- Symbolize quantitative data
One of the processes in spatial analysis is by representing the features in terms of color. This
color application is better known as symbology. But, thats not all. Symbology also involves the
symbolic representation of every feature. For example, a polygon can be represented not just
by unique colors but also by patterns (refer to the table below).
Symbol
Represent
Cropland
Vineyard
Grassland
Reservoir

The line features can also be represented by predefined symbols (examples are shown below).

To better understand when to use a certain feature-symbology we have to discern what that
feature-class is all about (the data that it contained). Understanding your goal in creating or
developing the map is very important. When you create a map, ask what the map is all about,
how would I represent the features on the map, and what are the necessary things that I have
5-9

to show on my map. Familiarity with the content or the spatial data is very much needed in
order to present the map more effectively.

## Symbolize Quantitative Data

Feature symbology is assigned on the basis of a chosen attribute. Therefore, the appropriate
field should be known to properly represent the message that you want to convey to your
audiences. But, there are times that instead of representing our features in terms of its fixed
value (like a name), we have to make use of its quantitative data. Quantitative data are spatial
or non-spatial data that imply numerical values like count in population data, elevation as
measurement (also area and distance), average, ratio, and density for population in a given
area.
o Run ArcMap.
o Click on the File menu and select Open.
o Locate the document map CebuProvPopByBrgys.mxd on ..\LearnGIS2\Spatial Analysis
and Model Builder 1 and click on Open.
o On the Catalog window, locate the Cebu.gdb geodatabase file. (Hint: The location of the
geodatabase is in ..\LearnGIS2\Spatial Analysis and Model Builder 1 folder). Right-click
on Cebu.gdb and select Make Default Geodatabase

Note: Setting a geodatabase file to default would set the default location upon
saving a datasets or resulting datasets. These datasets may be a result from a
geoprocessing operation. But, there are file formats that are a result of
geoprocessing operations that cannot be contained within a Geodatabase file,
an example of it is the TIN (triangulated irregular network) file.

By default, ArcMap assigns a single symbol to all features in a layer. But, if you want to
emphasize on the provinces or regions you would prefer to have each to have their own color.
Symbology is based on attributes. Therefore, to give each province its own color, you need an
attribute that has unique values for each feature.
The map that you have right now contained a plain yellow color without any designated
boundaries.

5-10

Cebu_Province_Barangays layer.
o On the Symbol Selector window, set the Fill Color to Light Apple (row 2, column 7).
o Still on the Symbol Selector window, make the Outline Width to 0.50 and the Outline
Color to Gray 50% (row 6, column 1). Then click on OK.
As you have observed the map is now divided according to the polygon as it was authored, that
is, based on barangay units.
A Thematic Map is a type of map that is designed to show a particular theme connected with a
geographic area. These maps can be physical (representing the actual geographic features),
social, political, cultural, economic, etc. Thematic maps show the geographic distribution of a
variable.
o Save your map as myCebuProvPopMap.mxd to ..\myGISOutputs folder.
Attribute Table.
The field BRGYPOLS shows the name of the barangays in the province, while ENCENSUS70,
ENCENSUS80, and ENCENSUS90 contain the populations in 70s, 80s, and 90s respectively. For
this exercise, we will just focus on the 90s population.
o Sort ENCENSUS90 field in ascending order.
3. What are the most and the least populated barangays and from what
municipalities/cities (neglect the zero values)?
________________________________________________________________________
o Close or hide the attribute table.
o Open the layer properties of Cebu_Province_Barangays and if necessary click on the
Symbology tab.
o For the Show method, click Quantities.
There are four options. The default is Graduated colors.

5-11

o Set the Value drop-down list to ENCENSUS90 to base your symbology on the values for
this attribute.
Symbology based on
this attribute

by this method

Symbology
method

## Range of attribute values

divided into this many
classes.

The range of values for the chosen attribute is divided into five classes. Each class is assigned a
color on a graduated (progressive) scale. The classes are not equally broad; their ranges are
decided by an algorithm that identifies clusters and gaps in the attribute values.
o Set the color ramp to Brown Light to Dark. Hint: To see the names instead of the colors
of the color ramps in the drop-down list, right-click inside the Color Ramp field and
uncheck Graphic View.
o Click OK on the Layer Properties.
Each barangay is now shaded with the color of the class in which its population value lies.
4. Name four barangays that falls in the highest population class. Hint: Zoom-in if
necessary, click on the Identify tool and select the polygon feature that has a deep brown
color. Use the BRGYPOLS as the name of the barangay from the Identify window.
________________________________________________________________________
________________________________________________________________________
o Zoom to Full Extent.
o Open the layer properties for the Cebu_Province_Barangays layer.
o In the Classes drop-down list, change the number of classes to 3.
o Move the Layer Properties window a little bit to the right side of the screen (make sure
that the map will be more visible) and click Apply.

5-12

barangays still appeared to be the highest in the class. Other barangays fall into the middle or
the lowest classes.
The graduated color technique is not ideal for count data, such as population. The use of fill
colors invites misleading comparisons because the map reader tends to compare only the
colors and the relative sizes of the features.
o Move the Layer Properties dialog box back to a convenient location.
o Under the Show, change the Quantities option to Graduated symbols.
o Confirm the Value field to ENCENSUS90. If necessary, change the number of classes to 5.
o Change the minimum symbol size to 6 and the maximum symbol size to 32.
o Click on the Background button.
o On the Symbol Selector, click the Fill Color square and select Tzavorite Green (row 1,
column 7) on the color palette.
o Click OK on the Symbol Selector.
o Click on the Template button.
o In the Symbol Selector, click the Circle 2 symbol. Change its color to Medium Coral Light
(row 2, column 2) on the color palette.
o Click OK on the Symbol Selector.

5-13

## o Click OK on the Layer Properties dialog box.

Examine each barangay by zooming-in in order to have a better view of how the population per
one thing in one barangay and something else in another. A danger is that the map reader may
think that the symbol size directly reflects that population values. In fact, larger symbol simply
means a larger population class.

## Tips: Use graduated symbols for counts.

5-14

Note: When you use graduated or proportional symbols with polygon features,
the symbol is placed at the feature centroid a calculated center of geographic
mass that sometimes lies outside irregularly shaped or multipart features. (Santa
Rosa, Lapu-lapu City centroid is in the sea.)

## Normalize population by area

In ArcMaps layer properties-symbology tab, you have an option to normalize values in an
attribute field. Normalization is the process of dividing one numeric attribute by another.
Through this method, you can minimize differences in values based on the size of areas and the
number of features present in each area. For example, dividing a value by the area of the
feature yields a value per unit area, or simply density. A specific example for that is, normalizing
(dividing) the total population by the total area which then yields population per unit area. It
also can be applied as dividing the age bracket of the population by the total population which
will result in the percentage of that age bracket. Using normalization in the classification field
can show how your data relates to the values of another field.
o Open the layer properties for the Cebu_Province_Barangays layer. If necessary, click on
the Symbology tab.
o Set the Quantities option back to Graduated colors.
o Confirm that the Value field is set to ENCENSUS90.
o Confirm that the number of classes is 5.
o Set the Normalization field to Land_Area_SQKM (square kilometer is the unit used for
the land area of each barangay.
o If necessary, set the color ramp to Brown Light to Dark.
o Move the Layer Properties dialog box to have a clear view of the map and click Apply.
It would seem that the entire Cebu province has the same color. In order for us to know
whether its true, we have to zoom-in to areas that population density really is a concern.
o Close the Layer Properties dialog box.
o Click on Bookmarks menu and select Metro Cebu Area.
5-15

Notice that there are areas which population density is quit high. Specifically, barangay Suba in
Cebu City is obviously the densely populated barangay.
Graduated colors are appropriate for normalized data because the values have been
standardized by units of area.
o Open the Layer Properties of Cebu_Province_Barangays layer and on the Symbology
tab, click the Label heading and choose Format Labels.

o On the Number Format dialog box, keep the category setting of Numeric.
o In the Rounding group-box, choose the Number of decimal places option and change
the value to 1.
o Near the bottom of the dialog box, uncheck the box for Pad with zeros.

## o Click OK, then click OK on the layer properties.

5-16

then click it again to make it editable.
o Change the heading to People per square km.
The map is now easier to interpret.

## Tips: Use graduated colors for measurements and statistics.

With the settings youve just made, you still cannot precisely distinguish the classifications of
the population density. It is more appropriate to reclassify the map.
o Open the layer properties of the Cebu_Province_Barangays layer.
o Select Symbology tab if necessary. Click the Label heading and select Format Labels.
o On the Number Format dialog box, choose the Number of decimal places option and
change the number to 0.
o Check the Show thousands separators box. Click OK.
o Change the color ramp to Yellow to Green to Dark Blue.
o Click OK on the layer properties.
The color pattern that we are using this time makes a clearer indication of classes. But, it would
seem that most of the division falls into the lowest classes, leaving the highest classes only a
handful.
In Mandaue City, it would seem that only barangay Mantuyong is the densely populated area
while all the barangays in Lapu-lapu City are sparsely populated.
o Zoom to Metro Cebu Area bookmark.

## Change the classification method

So far, your classifications have used the default Natural Breaks method. This portion of the
exercise will allow you to explore some other methods.
5-17

## o Open the layer properties of the Cebu_Province_Barangays. If necessary, click on

Symbology tag.
o Next to the number of classes, click Classify to open the Classification dialog box.

Observe how ArcMap made a default classification of the data. On the upper left of the dialog
box is the current classification method used and its number of classes.
On the upper right are summary statistics. For example, there are 1,182 barangays with a
population density of 0 until 106,249. The mean/average population density is 2,076 (people
per square kilometer), but the median value is at 372, which mean that half of the count has a
population density of less than 372 per square km.
Below the statistics are the class breaks.
The large box is the histogram, which you will use more in the next step. The x-axis shows you
the range values and the vertical blue line mark the positions of class breaks.
o From the Method drop-down list, choose Equal Interval.
There are still five classes, but the class breaks are different. On the histogram, they are now
spaced evenly along the value range.
o Click OK on the Classification dialog box.
o Move the Layer Properties dialog box to the side in order to have a clear view of the
map and click Apply.
As you can see the map is more homogenous than before. Barangay Suba, Cebu City is much
darker than it was before.

5-18

o Click Classify.
o Change the classification method to Quantile.
On the histogram, most of the class breaks are grouped at the low end.
o Look at the numbers in the Break Values box.
o Click OK on the Classification dialog box.
o Click Apply on the Layer Properties dialog box.
Now the map is usefully differentiated, but it might be too much of a good thing. The map
reader might suppose that light green areas (second-lowest class) are much denser than yellow
areas (lowest class). In fact, the difference is just few. Dark blue areas (highest class) might be
assumed to be very dense, when they is just so little.
o Open the Classification dialog box and change the method to Geometrical Interval.
On the histogram, the class breaks are set at proportionally larger intervals. Each class is
roughly six times broader than the class below it.
o Change the number of classes to 4.
Each class is now about ten times broader than the class below it. The Geometrical Interval
method applies a constant multiplier to class size; the multiplier depends on the data and the
number of classes.
o Click OK on the Classification dialog box.
o Click Apply on the Layer Properties dialog box.
This map is still well differentiated, but only a few features fall into the highest density class.
For this data, the Geometrical Interval method strikes a good balance between the
homogenous of the Equal Interval method and the exaggerated effect on the Quantile method.
Classification is a powerful tool. With the same data, you can make maps that give very
different impressions depending on where you set the class breaks.

5-19

## Use the classification histogram

o Open the Classification dialog box.
o Set the method to Natural Breaks.
On the histogram, the x-axis shows the range of population density values (0 to 106,249). The yaxis shows the number of barangays. The gray columns represent the number of features (in
this case barangays) falling into a particular value range.
The width of the gray columns is arbitrary. When data is evenly distributed across the value
range, many thin columns give a better picture. When the data is bunched up like this, thicker
columns are more useful.
o Change the number of columns from 100 to 30.

The histogram tells you that more than 1,000 features in this feature-class have a population
density value smaller than 4,355 people per square kilometer. The number of features with
larger values drops off very rapidly after that.

Tips: You can manipulate the histogram appearance in many ways: by changing
the classification method, the number of classes, the break values, and the
column width. You can also right-click a gray column and click Zoom-In to
examine the histogram at a finer level of detail.

Examining the histogram is not an academic exercise. You have already seen that, with this
data, several classification methods lead to maps that are less than ideal. Knowing the value
distribution can help you decide where to set class breaks to make an informative map.
o Click Cancel on the Classification dialog box and on the Layer Properties dialog box.
5-20

o Update your map. (Hint: Click on File menu and select Save)
o Close ArcMap.

5-21

## GIS Laboratory Exercise 5c Spatial Analysis

Objectives:
In this exercise, you will:
- Inquire through attributes
- Work with spatial (location) queries
- Extract features using the Clip tool
In doing spatial analysis, you have to orient yourself more on your objectives. To make yourself
more productive and be able to achieve your goal, it would be appropriate to have a guidelines
or path as to where you are going, what to do in order to get there, and in what ways do you
have to observe in order to arrive their safely and effectively.
Start here

## End here or ask a

new question

Acquire/prepare
data

Act upon
knowledge

Explore data

Analyze data

Analysis is a systematic process used to solve a problem. The graphic above illustrates the
analysis process used to solve a problem using GIS.

Spatial analysis
In a GIS, you work with information that is associated with locations. Therefore, the type of
analysis you perform is called spatial analysis the process of examining locations, attributes,
and relationships of features in spatial data.
Spatial analysis is performed using a variety of analytical operations. The common analysis
operations are:

## Selecting features based on attribute values

Selecting features based on spatial relationships
5-22

## Extracting data from layers

Buffering features (proximity analysis)
Overlaying layers (union, intersect)

Geoprocessing
Some of the analysis operations you will perform result in the creation of new data, also
referred to as geoprocessing operations. Geoprocessing refers to any GIS operation in which
new data is derived from existing data. When geoprocessing operations are used for analysis,
they create new data that you can use to answer geographic inquiries. Geoprocessing tools
used for analysis typically fall into three categories:

Data extraction
Overlay
Proximity

For the following steps we are going to investigate landslide prone areas. In order not to
congest the processing operation, we will select the barangays within Cebu City, Mandaue City,
Talisay City and the Municipality of Consolacion.
o Run ArcMap.
o If necessary close the opening dialog box.
o Click on the Geoprocessing menu and select Geoprocessing Options.
o On the Geoprocessing Options window, be sure to check Overwrite the outputs of
geoprocessing operations. Uncheck Enable under the Background Processing group
box.
o Check the Add results of geoprocessing operations to the display and uncheck Results
are temporary by default. Click on OK to close the Geoprocessing Options window.
o Click on File menu and select Open.
o Locate and select CebuGeoHazardMap.mxd map document in ..\LearnGIS2\Spatial
Analysis and Model Builder 2 folder then click Open.
o Set the default geodatabase to CebuSelGeoHazard.gdb located at ..\LearnGIS2\Spatial
Analysis and Model Builder 2 folder. Hint: Click on the Catalog window and expand
5-23

## Spatial Analysis and Model Builder 2 folder. Right-click on the CebuSelGeoHazard.gdb

geodatabase and select Make Default Geodatabase.
o From the Catalog window, drag-drop to your data frame wrp_topography feature-class
located in CebuSelGeoHazard.gdb. (Note: When the Unknown Spatial Reference dialog
box appears, just click OK.)
o Save your map as myCebuGeoHazardMap.mxd and save it to your ..\myGISOutputs
folder.
You might have observed that it would take time for ArcMap to draw the line features of
wrp_topography feature-class. The reason for that is the number of records contained within
the feature-class. You can verify it be opening the attribute table of wrp_topography.

## o Again from the Catalog window, drag-drop hydrogeo_units123 feature-class.

5. When you placed the hydrogeo_units123 feature-class on the map, is it clearly visible?
Why?
________________________________________________________________________
________________________________________________________________________
wrp_typography layer.
6. Do the layers belong to the same source path? State their individual source paths.
________________________________________________________________________
________________________________________________________________________
hydrogeo_units123 layer back below wrp_topography.
o Change the symbol color of hydrogeo_units123 layer to Purple Heart (row 6, column
12).
o Hide the wrp_topography and hydrogeo_units123 layer. (Hint: Uncheck the visibility
check box beside the layer name.)
5-24

## Create a feature-class for selected LGUs (Local Government Units)

You wanted to investigate only some selected areas namely the cities of Mandaue, Cebu, and
Talisay and the Municipality of Consolacion. The feature-class available to us contained
barangays with their affiliated cities or municipalities. Using this information, we will derive the
features in terms of the cities/municipalities condition for the study areas.
o Click on the Bookmarks menu and select Central Cebu.
o Click on the Selection menu and click Select By Attributes.
o On the Select By Attributes dialog box, set the Layer to Cebu_Province_Barangays. From
the listbox double-click MUNIPOLS and click on the = button. Click the Get Unique
Values button; locate and double-click Cebu City item. Click the Or button and repeat
this step by double-clicking MUNIPOLS then click on the = button, but this time locate
and double-click the Consolacion item from the listbox and click on the Or button
again. Repeat the same procedure for Mandaue and Talisay City omitting the Or button
after Talisay City. Verify that your SELECT * box is: "MUNIPOLS" = 'Cebu City' OR
"MUNIPOLS" = 'Consolacion' OR "MUNIPOLS" = 'Mandaue City' OR "MUNIPOLS"
= 'Talisay City'.

## o Click on Verify then click OK.

o Click the Selection menu and select Zoom To Selected Features.
As you can see, the barangays within the cities/municipalities you have specified are all
selected. We will create a new feature-class by copying the selected features.
o Click on the Search docked window. (If the Search dockable window is not visible, just
click on the Windows menu and select Search. Dock the window if necessary.)
o Click on the Tools hyperlink-text and type Copy Features on the textbox. Whenever the
hint text appear that contained Copy Features (Data Management), click on it.

5-25

o Move your mouse above the Copy Features (Data Management) search returned item.
7. What is the usage of the Copy Features (Data Management) tool?
________________________________________________________________________
________________________________________________________________________
Observe that the result list contained the title of the found items, its brief description, and the
path or location of the items.
o Click on the path of Copy Features (Data Management).
Automatically, the Catalog window appears which selected the Copy Features tool.
o Right-click on the Copy Features tool and select Copy from the popup menu.
o Using the Catalog window locate the toolbox you have created using the ArcCatalog
application (that is, myToolbox).
o Expand your myToolbox, right-click on it and select New -> Toolset.
o Rename the toolset as Data Management then press ENTER.
o Right-click on Data Management toolset and click Paste.
o Expand the Data Management toolset located in myToolbox.
You now have a copy of Copy Features tool and have placed it inside your Data Management
o While the selections are still active, double-click on the Copy Features tool.
o If the Show Help >> is visible click on it.
As you clicked the Show Help >> button, the window is extended showing the complete
descriptions of the tool.
o On the Copy Features window, set the Input Features as Cebu_Province_Barangays.
Observe that the path of the Output Feature Class by default is the CebuSelGeoHazard.gdb
geodatabase, this happened because you set this geodatabase as the default geodatabase.
Though ArcMap provided a filename but you have to rename to make it more recognizable.

5-26

## o Locate CebuSelGeoHazard.gdb geodatabase and double-click on it. (Location:

..\LearnGIS2\Spatial Analysis and Model Builder 2.)
o On the Output Feature Class, set the Name to StudyArea. Verify your inputs with the
following image then click OK.

## o Wait for the Copy Features to be Completed then click Close.

and by examining the Catalog it is also been added to CebuSelGeoHazard.gdb geodatabase.
o Click on the Clear Selected Features button

## o Remove the Cebu_Province_Barangays layer. (Hint: Right-click on the

Cebu_Province_Barangays layer and select Remove.)
o Open the attribute table of the StudyArea layer.
Examine that the content of the StudyArea layers attribute table is much the same as the
Cebu_Province_Barangays layer except that only those selected features are contained.
o Show the Cities and a Municipal in their unique colors. (Hint: Make use of the MUNIPOLS
field and then add all unique values.)
o Make use of the Pastels Blue to Red color palette. Uncheck the <all other values> and
click OK. Your map will be more likely as the following image.

5-27

## o Relocate the hydrogeo_units123 above the StudyArea layer.

o Show the hydrogeo_units123 layer on the data frame.

## Using the Clip geoprocessing tool

ArcMap contains a tool that will allow you to trim
selected areas. This tool is called Clip. Clip creates a new
coverage by overlaying two sets of features. The
polygons of the Clip Coverage define the clipping region.
Clip uses the clipping region as a cookie cutter; only those
input coverage features that are within the clipping region
are stored in the output coverage.
Input coverage features can be polygons, lines, or points. Clip
Coverage features must be polygons. Output coverage
features are of the same class as the input coverage
features. They are clipped to the outer boundary of the
Clip Coverage, and topology is rebuilt for the output
coverage.
The current hydrogeo_units123 features extend beyond your study area. You need to trim
hydrogeo_units123, so that only the features that are within our study area will be available.
o Click on Geoprocessing menu and select Clip.
8. What does the Clip tool do?
5-28

________________________________________________________________________
________________________________________________________________________
o On the Clip window Input Features, click on down-pointing arrow
available layers and select hydrogeo_units123.

to reveal the

The hydrogeo_units123 layer will stand as our input layer for the Clip tool.
o Click the down-point arrow for the Clip Features and select StudyArea.
The idea for the inputs on the Clip tools is that you are creating a feature-class of features in
hydrogeo_units123 that are within StudyArea layer.
o Click on the browse button

## o Set the Name as HydrogeoInStudyArea and click Save.

o Verify your inputs with the following image then click OK.

## o Click Close after the process has been completed.

The polygon type feature-class is being added to your CebuSelGeoHazard.gdb geodatabase and
Using what you have learned in clipping layers, perform the same steps in clipping
wrp_topography layer to the StudyArea layer and name it as TopographInStudyArea. Refer to
the following image for verification of your inputs.

5-29

Showing all the layers for your spatial analysis, your data frame will likely be as the image
below.

## Setting the symbology of the contour lines

To show the elevation differences of the contour lines, we have to change the symbology of the
TopographInStudyArea.
o Open the layer properties of the TopographInStudyArea layer.
o On the Layer Properties window, set the symbology to the following:
o Show: Quantities -> Graduated Colors
o Fields: Values ISO_VALUE
o Classes: 10
o Color Ramp: Elevation #2
o Click OK
5-30

## Your map will look like:

Based on the color classification you set, the white colored lines are the highest elevation while
light-blue color is the lowest.

## Setting the symbology of the geological features

This time you have to set the symbology of your HydrogeoInStudyArea, to reveal the
classifications of the soil in this area.
o Open the layer properties of HydrogeoInStudyArea and supply the following symbology
parameters:
o Show: Categories -> Unique Values
o Value Field: LAYER
o Color Ramp: Prediction
o Click on Add All Values
o Uncheck the <all other values> and click OK.
o Hide TopographInStudyArea layer.

5-31

## For verification refer to the image below.

The map is now colored according to the type of soil that the area contained thru the attribute
table.
o Close ArcMap.

## GIS Laboratory Exercise 5d Spatial Analysis

Objectives:
In this exercise, you will:
- Use the buffering features
- Perform overlay analysis
- Intersect features

## Creating TIN (Triangulated Irregular Network)

Some ArcMap tools required another spatial data
structure in order to perform their required
operations. It may be a vector or raster type of data
structure. The difference between them is the way the
data is being formatted and represented. Vector type
spatial data has an accompanying attribute table to
store its data, while raster type spatial data represent it through the color of its individual pixel.
5-32

Another GIS data structure is the TIN or Triangulated Irregular Network. The TIN is the
representation of a surface. It is implemented through a vector-based format of representation.
That would mean, that whenever you change the zoom value as you view the TIN it will not be
distorted. TIN is very useful in viewing a surface in using a 3-dimensional view. A TIN file cannot
be placed inside a geodatabase container, instead it is a stand-alone file.
o Run ArcMap.
o Click on File menu and select Open.
o Locate and select the previously saved myCebuGeoHazardMap.mxd map document
from your ..\myGISOutputs folder then click Open.
o Click on Full Extent

## o Unhide TopographInStudyArea layer.

o Click on the Search window and click the Tools hyperlink-text.
o On the textbox, type Create TIN to search for the Create TIN tool. (As soon as the hint
box appears that contained create tin (3d analyst), click on it.)
o From the Search Result items, locate and select the path for the tool that has a
description of Creates an Empty TIN.
o On the catalog window, right-click on the highlighted tool and select Copy.
o Locate your personal myToolbox (which is at Z:\ under your Folder Connections),
expand and right-click on it, select New then Toolset.
o Name the new toolset as TIN Management. Right-click on it and select Paste.
o Double-click on the copied tool.

5-33

A dialog box will appear. (Do not worry if this window will not show. If in case it does not
appear, just skip the next 5 steps.)

This dialog will appear if you have not yet enable some of the necessary extensions in ArcGIS.
These extensions are optionally be added to ArcGIS if licenses are acquired.
o Click OK.
o Click on the Customize menu and select Extensions.
o On the Extensions window, click on the box beside 3D Analyst and Spatial Analyst as
shown below.

o Click Close.
o Click on the Catalog window, and double-click on the Create TIN tool located in your TIN
Management toolset.
o On the Create TIN window, click on the browse button

5-34

## for the Output TIN.

o On the Output TIN dialog box, click on the Look in dropdown-box and locate your
..\myGISOutputs folder.
o Type on the Name textbox SurfaceOfStudyArea and click on Save.
o For the Input Feature Class (optional) field, click on the dropdown-box and select
TopographInStudyArea.
o Verify your inputs with the following image and then click OK. (Wait while the Create TIN
tool executes the operation. As soon as it is completed, click on Close.)

## o Hide all layers except SurfaceOfStudyArea.

o Open the layer properties of SurfaceOfStudyArea and click on the Symbology tab.
o On the listbox, highlight the value of 2 (Hard Edge) with the blue line, click on Remove
Values, and click OK.

5-35

## The Surface Slope tool

A tool is available in ArcInfo that can derive and show the slope of a TIN file. This tool will
create a polygon feature-class that can be saved within a geodatabase. It classifies an input TIN
or terrain dataset by slope. The slope is the angle of inclination between the surface and a
horizontal plane, which may be analyzed in degrees or percent. Slope in degrees is given by
calculating the arctangent of the ratio of the change in height (Z) to the change in horizontal
distance (S), or

## height divided by the change in horizontal distance multiplied by 100, or

The slope_field that can be found in the attribute table is used to record the polygon aspect
codes. Its default value is SlopeCode. Each triangle is classified into a slope class. Contiguous
triangles belonging to the same class are merged during the formation of output polygons. The
units parameter can be set to use PERCENT or DEGREES. The default is PERCENT. The default
percent slope class breaks are: 1.00, 2.15, 4.64, 10.00, 21.50, 46.40, 100.00, 1000.00. The
default degree slope class breaks are: 0.57, 1.43, 2.66, 5.71, 12.13, 24.89, 45.0, 90.0.
For this portion of the exercise, we are going to use the Surface Slope tool to derive the
information in terms of slope from our topographic data.
o Using the knowledge you have learned in searching a geoprocessing tool, search the
tool named Surface Slope (3d analyst).
9. In what toolbox does Surface Slope is located and what is the name of its toolset?
________________________________________________________________________
5-36

o On the Catalog windows, right-click on Surface Slope tool and select Copy.
o Create a toolset within your personal toolbox and name it Terrain and TIN Surface.
o Paste the copied tool to the newly created toolset.
o From your personal toolbox, double-click on the Surface Slope tool.
o On the Surface Slope window, click the Input Surface dropdown-box and select
SurfaceOfStudyArea.
o Select the browse icon for the Output Feature Class parameter.
o Make sure that the current geodatabase selected is CebuSelGeoHazard.gdb which is
located in your working folder, otherwise locate it and double-click on it.
o On the Output Feature Class window, type on the Name textbox SlopesInStudyArea
then click on Save.
o Set the Slope Units (optional) to DEGREE by clicking on the dropdown-box.
o Make sure that the Slope Field (optional) is SlopeCode (which is the default value).
o Verify your inputs with the following image. If everything is the same, click on OK.

5-37

## o Click Close on the completed Surface Slope process.

o Hide SurfaceOfStudyArea layer.
o Right-click on the added SlopesInStudyArea layer and select Properties.
o If necessary, click on the Symbology tab.
10. What is in the Show: settings? _______________________________________________
11. From the Symbols list, write down the values and its corresponding SlopeCode labels.
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
o Close the Layer Properties window.
o Using the Select By Attributes tool, select all features from SlopesInStudyArea that are
450 and above. (Hint: Use the codes you have just noted in #11.)
12. Show the SELECT SQL statement that you have provided on the Select By Attributes
window.
________________________________________________________________________
13. How many features in SlopesInStudyArea layer have been selected? ________________
The selected features are those that we have to assume as qualified areas for landslide. Though
there are many factors aside from the slope of the area that would qualify it as a landslide
prone. One factor is the type of soil and the other is the frequency and the amount of rainfall.
For this exercise, we will just going to utilize only two parameters of a landslide prone area: the
slope and its geological characteristic. We already have the slope values of our study area, what
we lack is the geological feature for those initially qualified areas through their slope values.
o Make sure that the selected features are still active, use the Copy Features tool that you
have saved in your personal toolbox by double-clicking on it.
o On the Copy Features window, set the Input Features to SlopesInStudyArea.

5-38

o Browse for the Output Feature Class and make sure that the destination geodatabase is
your CebuSelGeoHazard.gdb. Name the feature-class as QualifiedSlopes then click Save.
o Click OK on the Copy Features window to begin the copy process.
o Click Close on the completed process window.
o Clear all selected features.
o Hide the SlopesInStudyArea layer.
o Unhide the HydrogeoInStudyArea layer.
o Zoom-in to some of the areas in order to clearly view the QualifiedSlopes features.

## The Intersect tool

As you may have observed, there are patches of shapes that
represents your QualifiedSlopes. These features will be used
to intersect with our geological data in order to come up
with the areas that would be geologically hazardous. In
order to perform this procedure you need the tool made
available through ArcMap, the Intersect tool.
The Intersect tool performs by intersecting two or more feature-classes. It creates a new
coverage by overlaying the features from the input coverage and intersect polygon coverage.
The output coverage contains the input features or
portions of the input features that overlap features in
the intersect coverage. The output features have the
attribute from the original feature from the input
coverage and the feature in the intersect coverage,
which they intersect.
Intersect is one of several Overlay tools available. The tool most similar to Intersect is Clip,
which does not transfer any attribute from the overlay feature class to the output.
Input Coverage features can be polygons, lines, or points. The intersect coverage must have
polygon topology. Output coverage features resulting from the overlay are of the same type as
5-39

the input coverage features. They are split when they intersect with the polygons of the
intersect coverage. Topology is built for the output coverage.
You are going to perform the Intersect tool operation in order for you to have each qualified
slopes geological makeup.
o Click on the Geoprocessing menu and select Intersect.
o If the Show Help >> button is visible, click on it.
o Click on the Input Features dropdown-box.
The right portion of the Intersect window automatically displays the description of the Input
Features field.
14. Write down the descriptions of the Input Features field.
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
15. Identify the:
a. Input layer
b. Intersect layer -

______________________
______________________

## o From the Input Features dropdown-box, select QualifiedSlopes.

o Click on the Input Features dropdown-box again and select HydrogeoInStudyArea.
o Click on the browse

## button for the Output Feature Class.

o On the Output Feature Class dialog box, make sure that you are within
CebuSelGeoHazard.gdb geodatabase and type on the Name textbox
GeoInQualifiedSlopes then click on Save.

5-40

o Verify your inputs with the following image. If everything are the same, click OK.

## o Open the attribute table of GeoInQualifiedSlopes layer.

As you have noticed, the attribute table of GeoInQualifiedSlopes layer contained the fields and
records of spatial data from HydrogeoInStudyArea layer including the data from
QualifiedSlopes.
o Close the attribute table.
o Hide QualifiedSlopes and HydrogeoInStudyArea layers.
o Set the symbology for GeoInQualifiedSlopes layer to Categories: Unique Values.
o Set the Value field to LAYER and change the Ramp Color to Condition Number.
o Add all values, uncheck the <all other values> then click OK.
o Set the scale to 1:20,000 and pan on the data frame to view the color differences of
each polygon.

5-41

## Setting the Geological Qualifications

By examining the attribute table for GeoInQualifiedSlopes, you will be able to view the
categories or classifications of soil in certain areas. To be more precise in applying the
classification of the soils, we have to implement a field that will contain the numeric values for
its corresponding layer types. With it, we can easily classify each geological feature by their
values.
layer.

## beside the TopographInStudyArea

o Observe how the content on the LAYER field for your GeoInQualifiedSlopes are named
through their unique values.
o View the GeoInQualifiedSlopes attribute table.
o Click on the Table Options

## o Provide the following parameters:

o Name: LayerClass
o Type: Short Integer
o Click OK.
o Scroll the horizontal scroll bar to the right until you reach the last field or you will see
o Right-click on the LayerClass field label and select Field Calculator from the popupmenu.
o On the Field Calculator window, be sure that under the Parser group-box VB Script is
chosen.
o Check on the Show Codeblock checkbox by clicking on the white-box on its right side.
At this point, you will have to code a VB script in order to derive the categories of the geological
formations you have in your spatial data. Without closing the Field Calculator window, you may
values are named, the categories from the symbol is separated by a _ (underscore) for
5-42

example BA_ANDESITE (BA = symbol, ANDESITE = category). It will be appropriate to derive the
geological formations by their categories. In order to perform this, the most effective way is to
use a programming script to perform it automatically.
The geological features are categorized accordingly from the weakest to the strongest type. The
following table shows these rough estimates in order to simplify this exercise.
Rank
0
1
2
3
4
5
6
7
8
9

Type
Basalt
Diorite
Andesite
Peridotite
Shale/Mudstone
Conglomerate
Limestone
Pyroclastics
Alluvium
Schist

Remarks
Strongest

Weakest

Again observe the Field Calculator window, notice that on the second half of the window
appears the Pre-Logic Script Code: and the LayerClass =. The Pre-Logic Script Code area is the
location where you must place your VBScript code while the LayerClass portion will be the value
or variable that contained the result of your script.
Performing the VBScript
o Click on the Load button and locate the LayerClassFieldCalc.cal which can be found in
..\LearnGIS2\Spatial Analysis and Model Builder 2 folder and click on Open.
Observe that the Pre-Logic Script Code area is being filled with the following script.
Dim intA, lngA, strTemp, intResult
lngA = InStr( [LAYER] , "_")
strTemp = Mid( [LAYER] , lngA + 1, Len( [LAYER] ))
Select Case strTemp
Case "BASALT": intResult = 0
Case "DIORITE": intResult = 1
Case "ANDESITE": intResult = 2
Case "PERIDOTITE": intResult = 3
Case "SHALE/MUDSTONE": intResult = 4
Case "CONGLOMERATE": intResult = 5
Case "LIMESTONE": intResult = 6
Case "PYROCLASTICS": intResult = 7
Case "ALLUVIUM": intResult = 8

5-43

## Case "SCHIST": intResult = 9

Case Else: intResult = 0
End Select

## o If necessary, on the LayerClass = area type in intResult.

o Click OK on the Field Calculator.
o If everything is fine, examine the LayerClass field contents.
Creating the weak geological formations feature-class
Using the table of geological categories, check whether the data under the LayerClass field
correctly correspond with the name and its value.
o Be sure that there are no selected features. (Click on the Clear Selected Features button
until it will no longer be clickable.)
o Using the Select By Attributes tool, select all features from GeoInQualifiedSlopes layer
that has a LayerClass of 7 and above.
16. What is the SQL Select statement you need to provide to execute the previous step?
________________________________________________________________________
o Use your Copy Features tool to copy the selected features from GeoInQualifiedSlopes
layer, save it in ..\LearnGIS2\Spatial Analysis and Model Builder
2\CebuSelGeoHazard.gdb and name the result feature-class as CriticalAreas.
o Clear all selected features.
o Hide the GeoInQualifiedSlopes layer.
o Open the layer properties of the CriticalArea layer and if necessary view the Symbology
tab.
o Set the Show to Categories: Unique Values.
o Change the Value Field to LayerClass and if necessary set the Color Ramp to Condition
Number.

5-44

o Click the Add All Values button, uncheck <all other values>, and under the Label heading
set the values to the following:
o 7 Less Critical
o 8 Critical
o 9 Highly Critical
o Click OK to apply the settings and close the layer properties.
o Set your scale to 1:20,000 and pan your map to view most of the features.

## Using the Buffer tool

As you have noticed, the features for the CriticalAreas layer are small and just within the area of
the qualified slopes. In order to declare some distances from the critical areas, we have to set
some buffer zones. These are the extended distances from the actual locations that we can
assume will be affected whenever a landslide would occur.
In ArcInfo, a tool is available that
allows us to create the buffer
zone. The tool is called Buffer.
Buffer creates a new coverage of
buffer polygons around specified
input coverage features. Features
can be polygons, lines, points, or
nodes.
You can use the Buffer tool to identify or define an area within a specified distance around a
feature. For example, you may create a buffer to define an area around a river to identify land
that cant be developed, or you may want to create a buffer to select features within a specified
distance of a feature.
o Click on the Geoprocessing menu and select Buffer.
o On the Buffer window, set the following parameters:
o Input Features: CriticalAreas
o Output Feature Class:
Path: ..\LearnGIS2\Spatial Analysis and Model Builder
2\CebuSelGeoHazard.gdb
Name: CriticalAreasBufferZone
o Linear unit: 100 <in Meters>
5-45

## o Dissolve Type (Optional): LIST

o Dissolve Field(s) (Optional): Check SlopeCode and LayerClass
o Click OK on the Buffer window.
o After the Buffer process is completed, click Close.
o Set the symbology according to the CriticalAreas layer symbology and labeling.
o Hide the CriticalAreas layer and zoom to full extent.
o Show the StudyArea layer and open its layer properties.
o Select the Labels tab if necessary and check the Label features in this layer.
o Under the Text String groupbox, set the Label Field to BRGYPOLS then click OK.
17. Identify the barangays and its city/municipality that has a highly critical area.
________________________________________________________________________

## Creating the Map Layout

Now that you have a processed data frame for determined landslide prone areas. It is very
much appropriate to make a layout of the map for possible printing.
o Click on File menu and select Map Document Properties.
o On the Map Document Properties window, set the following:
o Title: Landslide Prone Areas in Cebu, Mandaue, Talisay, and Consolacion
o Click on OK.
o Set your view to layout.
o Set the page orientation to landscape.

5-46

o Set the data frames lower portion to fit the gray dotted line of the page while setting
the upper portion at 1-inch from the upper gray line of the page.
o Right-click on the data frame and select Properties.
o Click on the Frame tab and change the border color to No Color then click OK.
o Click the Insert menu and select Neatline.
o Under the Placement group-box, select Place inside margins and set the Border to 1.0
Point then click OK.
o Click the Insert menu and select Title. Place the title on the upper portion of the page
just above the data frame and within the neatline.
o Double-click on the title.
o On the title Properties window, click the Change Symbol button.
o Set the font Size to 24, click the bold
click OK twice.

## button for the Style to highlight it, and then

o Click the Insert menu and select Dynamic Text, then chose Author. Place the Author text
at the bottom left portion of the page.
Single-click on the name until it is editable).
o Single-click LayerClass label until it is editable and delete its content.
o Add the legend that would identify the critical areas on the map show its border at 1point. (Hint: Use the buffer zone which was renamed as Critical Areas.)
o Place the legend at the bottom right portion of the page.
o Place a North Arrow at the top right part of the page.

5-47

o Set the scale to 1:200,000 and then add a scale bar with the following properties:
o Type: Alternating Scale Bar 1
o Division Units: Meter
o Place the scale bar at the bottom portion of the page.
o Insert a scale text with the following properties:
o Type: Centimeters = Kilometers
o Page Units: Centimeters
o Map Units: Meters
o Place the scale text just above the scale bar.
Since your layout does not contain the name of the cities/municipalities, we have to manually
provide the name of each of these LGUs.
o Click Insert and select Text.
An editable textbox with the content Text appeared on the page.
o Rename the textbox to Cebu City. (If necessary, double-click on the textbox to view its
Properties dialog box.)
o Change the textboxs font-size to 12 and its style to bold.
o Place the Cebu City text to an appropriate location as not to overlap any existing texts.
o Perform the same steps for Talisay City, Mandaue City, and the Municipality of
Consolacion.
The Locator Map
In most printed maps, a map locator or map overview is available. The locator map is a portion
within the page that shows where the main map can be located from a larger area. For
example, Cebu Province can be located in an area between Bohol and Negros Oriental. To make
these possible, you have to make another data frame in order to construct your locator map.
o Click on Insert then select Data Frame.
As you have noticed, a New Data Frame appeared on your page layout. This will be the data
frame for our locator map.
5-48

o Move the New Data Frame at the top left portion of the page.
o Shift your view to data view.
o Rename the New Data Frame to Locator Map.
Notice that the data view is empty. That is because your current data frame is the Locator Map
which is empty. This time we have to fill in some needed feature-classes.
o Drag-drop from the Catalog window the Cebu_Province_Barangays feature-class
(location: ..\LearnGIS2\Spatial Analysis and Model Builder 1\Cebu.gdb) to your data
frame.
o Do the same with the StudyArea feature-class that you saved before.
o Change the symbology of the Cebu_Province_Barangays layer to:
o Fill Color: Mango (row 2, column 4)
o Outline Color: No Color
o Change the symbology of the StudyArea to:
o Fill Color: Dark Umber (row 6, column 2)
o Outline Color: No Color
o Make sure that you are in full extent zoom for the Locator Map data frame. Set your
view to layout.
o Resize the Locator Map to make it more presentable.
o Export the map layout to a PDF file with the name CebuLandslideProne.pdf and save it