TIME CHART FOR YOUR GEOGRAPHICAL MODEL
FOR/GGR 525
MODELING ASSIGNMENT
INTRODUCTION
Geographical (cartographical or spatial) analysis allows you to study
real-world processes by developing and applying models. Such models illuminate
underlying trends in the spatial data and thus make new information available.
In this lab you will create a geographical model using the GIS commands
you have learned thus far and the data set from flag24.
STEP 1: (Week 7-8) SETTING UP THE MODEL LOGIC
Select 4 to 7 layers to include in a model. Make a flowchart (to turn
in) and design the model. Make a listing of the variables you will include and
take a look at the items (in ArcCatalog), then assign these variables to the classes
suitable or unsuitable (here we have used harvest and no
harvest). Later,
when you write your weighting and classification programs, these two suitability classes will be further
divided into 5 classes: optimal, good, fair, poor, and exclude.I chose to create a 'Harvest Suitability Model' (courtesy of D.P. Dykstra). We used
four layers in this model: Natural Vegetation (pines), Slope,
Geology (texture), Streams (200 m buffer).
Figure 1. Diagram of Harvest Suitability Model.
STEP 2. (Weeks 9-10) GET THE DATA
- Start ArcCatalog.
- Navigate to your for525 folder and make a new folder called model
if you don't already have one.
- Copy coverages you will need for your model from flag24 into your model
folder using ArcCatalog.
- Then open ArcMap and add the 4 or more layers with which you
will be working. Try displaying several coverages at once in ArcMap, selecting the desired
attributes in each layer. In effect you will see how your model might look before
you actually combine them with overlay commands.
- For example, say that in our suitability model, we are interested in looking at pine, but not dwarf pines.
So, we construct a query to see just the polygons we want:
- Do this with each layer so that you can see how they will overlay.
STEP 3: (Week 10) PREPARE THE DATA
INTRODUCTORY INFORMATION (yes, read it).
- Before you combine your layers you need to buffer the selected buffer
layers.
- Remember that any layers that are not polygon datasets will need to
be buffered for overlay, for example roads or wells. Since we are doing polygon
on polygon overlays, it is these final buffered cover(s) that you will use in
the model.
- If you only want to Buffer a certain feature type (like only road
CLASS = 2) then they need to be first extracted and put into another
coverage using ArcToolbox/Extraction Tools/Select. Then buffer the
new coverage.
- You DO NOT need to Select just the polygons with attributes you
want from each of the other (non-buffered) layers. For example, if you only
want the Forest Service land in the Owner coverage, you will only
give Forest Service a weight in your model program. This essentially
eliminates all the other classes from your model.
- In addition, if there are any other manipulations you need to do
to a coverage, do it now. For example, you may want to change item names or
attribute values so they meet the requirements of your model.
- Buffering Review
In Exercise 7 you completed a number of buffering processes in ArcToolbox.
Another way to buffer is from ArcMap, but only use ArcMap to test the
result of different buffer parameters before committing to one.
- From ArcMap choose Tools/Buffer Wizard .
- Choose the desired layer to buffer and click Next.
- Choose the buffer type, as either a single distance
from features, as multiple buffers around features, or using a feature attribute
(by supplying the item name that contains the attribute).
The following is just an example, use the parameters appropriate for
your own model.
Pretend that in our harvest
suitability model, suitability increases as we move away from archaeological
sites. To model this process, we would need to create a multiple buffer that covers the entire landscape. We have to choose
a buffer width (the distance between the rings), and choose the distance
units. In the following example
we choose enough rings to reach the edge of the landscape (indicated by the
coverage outerbnd), making them 1000
meters apart. You may need to use the measure
tool in ArcMap on the Tools toolbar to find an effective measurement.
Find the feature that will require the most buffers to reach the
furthest edge. Measure the distance from that feature to the edge. Write
that number down so you won't forget it. Now divide that number by the
buffer width to determine how many buffers you will need. Write that
number down. Scratch your nose. Don't forget to wipe and wash.
- In this case we want to dissolve lines between buffers and choose the output
as graphics in existing layer for accuracy check before creating the final layer:
- If you like the way the results look, run the buffer procedure in
ArcToolbox using the same parameters. From ArcMap you can only save a
shapefile or layer, and we want polygon coverages for overlay.
-
You may not want to buffer every feature in a coverage. For example, in archsites,
you may want to buffer only Anasazi sites, or only Hohokam sites or both. One way to do this
is to:
- In ArcCatalog add a field called BUFFVAL. In ArcMap,
double-click the desired layer (or right-mouse-click the
layer and choose Properties).
- Now you will have to calculate
a field value for buffer distance.
- Now, in ArcMap use the Definition Query tab, choose Query
Builder... and
select only the features which you desire to buffer.
Start
editing, open the archsites point attribute table, choose Options/Select by
Attribute.
- In the query window, find type "NAME" = 'Anasazi*'.
- Then right mouse-click buffval, choose Calculate Values,
choose Yes to turn off redo/undo functions, and set the value to, in
this case, 1000 m.
- Then query for Hohokam sites and set the values to 500 meters.
- Calculate all other
attributes to 0.
- From ArcToolbox, open the Buffer Wizard.
- Choose to buffer At a distance from an attribute.
-
Name the inside item something unique to that coverage so that when you see
it in the final combined attribute table, you will know where it came from:
- If you get an error message that stops the buffering process, you may need
to rebuild the topology of your dataset. To do this, open right-mouse click
on the dataset in ArcCatalog, and choose Properties/General/arc/Topology
(Preliminary) /Build.
- Also, you will have problems buffering using an item
if the item is named with more than one word. Don't put any spaces in the name,
e.g. use BUFVAL instead of BUFFER VALUE.
-
If you want to create multiple buffers of different sizes, use the Buffer
Wizard from ArcToolbox. You can create an interesting buffer using this tool:
-
In this case, it is advisable to calculate the inside item values equal to
each buffer value:
You can easily change the item name, if necessary, by opening the archsites
dataset
in ArcCatalog, double-clicking point, choosing the Items
tab, highlighting the desired item and choosing Edit.
IF
YOU ARE USING MORE THAN ONE BUFFERED COVER (e.g.
Roads and Streams),READ
THIS NOW (NOT LATER).
Look at the data table for one of your buffered layers. How does the computer
know which polygons fall inside the buffer, and which fall outside the buffer?
All the polygons are all part of the same layer.
The computer uses an item, or field, either named INSIDE, by default, or whatever
you named it when creating the buffers. If you buffer streams and leave the default
inside item name (i.e., INSIDE), and buffer roads, leaving the default inside item
name (i.e., INSIDE), the inside items of both coverages will have the same
name. Eventually, when all the coverages are overlaid, any items
with the same name will be dropped from the joining dataset. That means that
if you start with strmbuf and add roadbuf to it, roadbuf's inside item WILL
BE DROPPED! Hence, THE BUFFERS WILL BE GONE!
To solve this problem, each original dataset that you are buffering needs a
unique inside item name, like STRMINSD and ROADINSD.
- Joining Data from External Tables
Make sure all of the layers in your model have the correct codes and explanations
in the attribute table; otherwise the information you want to use (which may
be in an LUT - look up table - or other file) may be left out and you will
have to repeat the overlay process. Therefore, in some coverages you may need
to join tables together using ArcToolbox/Data Management Tools/Tables/Join
Tables.
CONTINUE EDITING FROM HERE
STEP 4: (Week 10) Combine your model layers using UNION and
IDENTITY.
In this step, you combine all of the layers that will be included
in your model using the UNION and IDENTITY commands. You have used
these commands before.
Note: All of the layers used in this step must
be polygon covers.
Also Note: If you want to use the roads or streams
coverage for reference (not analysis) we will do this later when we plot the
results. Everyone will start with unioning the outerbnd to their
first input coverage.
Here are the steps in general:
- ArcToobox/Analysis Tools/Overlay/Union outerbnd to XXX
to make overlay1.
- Next, ArcToobox/Analysis Tools/Overlay/Union overlay1 to XXX
to make overlay2.
- Next, ArcToolbox/Analysis Tools/Overlay/Union overlay2 to XXX
to make overlay3.
- Next, ArcToolbox/Analysis Tools/Overlay/Identity overlay3 to XXXbuf
to make final.
...where...XXX is the name of a coverage you have chosen (e.g., landuse,
geology,
etc.); XXXbuf is a buffered coverage you created in Step
3; overlay1 is the overlay cover resulting from the UNION of two layers,
overlay2 is the
overlay cover resulting from the UNION of overlay1 and a third cover,
etc...
IDENTITY, instead of UNION, is always used with buffered layers so that buffers falling outside the
study area are clipped.
Do not forget that if you have more than one buffered coverage (e.g., a buffered
coverage for streams and another for roads), they will both have an item called
INSIDE. You must change the name of the INSIDE items (e.g., STMINSIDE or
RDINSIDE)
before you overlay them OR one of the INSIDEs will be dropped, removing that
buffer from the final cover. Final is the name of the coverage that is a combo of all the layers and will
provide your final.pat datafile. Everyone must call this final coverage "final."
Here is a specific example using 3 polygon layers (landuse, slope, geology) and
1 buffered layer (e.g., strmbuf) = 4 overlays in total.
- ArcToobox/Analysis Tools/Overlay/Union outerbnd to lndowner
to make overlay1.
- ArcToobox/Analysis Tools/Overlay/Union overlay1 to slope
to make overlay2.
- ArcToolbox/Analysis Tools/Overlay/Union overlay2 to geology
to make overlay3.
- ArcToolbox/Analysis Tools/Overlay/Identity overlay3 to strmbuf
to make final.
The output should look similar to this (if your coverage is not
rectangular, talk to the instructor immediately):
STEP 5: (Week 9) Choose weight values and add your weight item (e.g., HARVEST in my case) to your final
polygon.
When you produce your final polygon layer it will have many fields associated with it from all of the layers
you combined but you will only be interested in certain results. You might be
interested in the Pine Communities of the DESCRIP field, or the 500 value of the
STRMINSD field. You want to summarize the importance of each one of these
variables in a cohesive and understandable way. To do this, you need first
to decide on the importance of each variable via a "weight" between 0
and 10, or -999 if it is excluded from the model altogether. Any
weights you assign to variables must be justified (i.e., results found
in literature, in SCS guide, etc.). You must decide weights in this step (if you
haven't done this previously).
The weights you choose will be held in a new field that
you will add to the final coverage (referred to as the weight item). So,
add your weight field (e.g., ours was called HARVEST) now, which will hold the results of the
weight program run
- i.e., all of the weight values added together for each polygon based on each
suitability type. Your weight field must be defined as follows (except for the
name, which you can change):
- Open ArcCatalog.
- Navigate to your flag24/cover area and locate final polygon.
- Right mouse-click final polygon and choose Properties.
- Click the Items tab.
- Choose Add.
- Define the new item as below (you can choose your own item name).
- Click OK twice.
STEP 6: (Begin this step during Weeks 9-10; have it completed
before Week 12) Write the weighting program.
We will use Visual Basic for Applications (VBA), which is a version of Visual
Basic (VB) that runs from inside the application (in this case the application
is ArcMap). VB and VBA are part of a suite of object-oriented programming
languages. Dr. Arundel will be talking more about VBA in class.
- Copy the model.mxd document on the ACADATA drive in for525/model
to your own workspace.
- Open the map document in ArcMap.
- Add just your final coverage to the map (final polygon or final2
polygon or whatever you called it).
- Open the VB editor using Alt+F11, or from the Tools menu through
Macros.
- Click the plus-sign next to the ArcMap Objects folder.
- Right mouse-click ThisDocument, and open the modules folder and
double-click the cmdSuitabilityModel module. Examine this sample VB program
provided to you.
- Alter the sample VB program to develop
your own weighting program. Lines that begin with ', and are green are comments (the computer does not try to run this
code). The program saves when you save the map, so do this often.
-
STEP 7. (Week 12) Run your weighting program.
- To run the program, be sure you have the final polygon layer
selected in the ArcMap TOC, and you have started an editing session.
- Then open the VBA editor, which looks like the picture below.
- Click the run button or click F5.
- The program may take awhile to run. You'll know it is finished when your
cursor goes back to normal (not an hour glass).
- Now switch to ArcMap and open the Attribute Table.
- Check the values in your weight item for accuracy. If wrong, change your
program and run again.
STEP 8. (Week 12)
- Determine if the weighting program produced reasonable results; you should
be familiar enough with ArcMap by now to know how to do this.
- During the overlay process, you generated many small
polygons in your final polygon layer. Some of these small polygons may meet
your model criteria, but are too small to meet the Minimum Mapping Unit (MMU) of 1 hectare that I have assigned and will eventually be deleted
in Step 10.
- Determine whether there are any areas that meet your model criteria, yet are smaller than the MMU. Determine where these small polygons
are located and if they can be combined with adjacent polygons that also
meet the criteria.
- If there are areas that meet your model criteria, are smaller than the
MMU, but could be combined with an adjacent polygon and result in a polygon
that meets the MMU, then you would want to keep them. Use the Dissolve
command to do this. Dissolve will merge adjacent
polygons which have the same value for a specified item (e.g., HARVEST). Look
up "Dissolve" in Help to learn more.
- From ArcToolbox, double-click the Dissolve tool in Data
Management/Generalization.
- Use your final coverage as input, call the output finaldis
and dissolve using your HARVEST item.
STEP 9: (Week 12) Use ELIMINATE to get rid of those polygons
less than the MMU. Everyone
will use a ONE HECTARE minimum mapping unit. (Hint: 10,000 sq. meters
= 1 hectare). This is to assure that your final plots are not too complex.
Look up ELIMINATE in on-line help to learn more.
- From ArcToolbox, double-click the Eliminate tool in Analysis
Tools/Overlay.
- Use the Query Builder to choose the small polygons.
- Name the output final2.
STEP 10: (Week 12) Use the FREQUENCY command to determine the range of values yielded
by your weighting program. (Be sure to look for these values in your weight
field.)
- Looking at the values in your weight field, you will notice that there are
more than 5 classes. However, since the goal of the project is to have 5
suitability classes, we will need to break the weight values into groups
(classes). You will do this with the classification program in the next
step. First, however, you will need to decide on how to group your data so
that they fall into suitability classes of optimal, good, fair, bad,
excluded (or similar types). These classes will be represented by numeric
values in the class field in the final2 polygon layer. The "break points"
for classes (optimal, good, etc.) may be justified from results found
in the literature or can be determined by looking at the range of values. They will be different for each person's model.
- If you are unable to find information in the literature about breaking
your weights into classes, a helpful tool is the frequency table (like a
histogram but in tabular form). The following steps explain how to run a
frequency.
- From ArcToolbox, double-click the Frequency tool in
Analysis Tools/Statistics.
- Use final2 polygon (will appear as final2.pat) as the input
table, call the output table final.fre, choose your weight field as the
frequency item and AREA as the summary item.
- Select the final.fre file
in ArcCatalog to list the results.
C. You can also use the different classification types in the symbol legend
in ArcMap (I'll let you figure this out for yourself).
STEP 11. (Week 12 and Week 13...Have your classifying program written prior to class
this week and have it run before Week 13) Add the CLASS field and write the
classification program.
- Add the field CLASS to final2.
When you run your classification module, it will group your weight results into suitability classes. The results have to go somewhere. They will go in the
final2 polygon layer into a field that you
add called CLASS (you must use this name). The CLASS
item must be added before running the program:
Preview final2 polygon in ArcCatalog to see the new item. You will notice the
item is empty (no data).
- Write the classification program using the sample provided in class. Add
it to the VBA editor module you inserted for the weighting program. Each sub
procedure will be separated by a line as long as each procedure starts with
Public Sub "name" and ends with End Sub.
-
Run the classification program once it is ready in the same manner as you
ran the weighting program. Be sure your cursor is in the correct module
before choosing Run.
STEP 12: (Week 13...finish before Week 14) Conduct ONE variation
of your original model.
This step is the process of generating alternative results. The ideal
solution that you attempted last week may not be attainable in practice
(which is not uncommon), in which case trade-offs must be made among competing
objectives. An iterative process is used to develop alternatives that satisfy
these objectives to different degrees or for model "sensitivity"
analysis. Of course, we do not have time to develop a whole suite of alternatives,
or change every variable to see how "sensitive" the model is
to a certain variable, so we will only attempt one iteration.
Conduct at least one variation ("what if") of your model by using a different data layer, enlarging a buffer,
and/or changing some variable weights. The more complex your iteration,
the more credit you receive. The choice is yours. Be sure to keep track of the
output from each change.
STEP 13: (Week 14):
Dissolve your final coverages on the CLASS field. Refer to Step 8 above.
Plot your final products (both the original model and the iteration). The plotting
instructions are on the main course page under 'Plotting'.
NOTE: To have the plots print in color, send them to the HP
2500 CM.
STEP 14: (Week 14-15)
Write a summary report of your model. This is due on the last Friday of
the semester before final's week at
4:00 pm. Instructions for page limits, and what to include in your report are
included in the introduction (Time Chart for your Geographical
Model). Turn the whole thing in to your
Lab TA.
STEP 15: (Friday by 4:00 pm, Week 15)
Turn in the model report and have a great winter break!
Return to Class Home Page...