CS 128/ES 228 - Introduction to Geographic Information Systems
Lab 13: Beginning Spatial Analysis
Goals:
By the conclusion of this lab period, you will have:
- Confronted the limitations of ArcMap as we have used it thus far.
- Learned how to use Personal Geodatabases to overcome some of these limitations.
-
Explored a few of ArcMap's tools for spatial analysis.
Setting
up a clean workspace
- Getting a usable dataset.
As the semester has progressed, various versions of the campus dataset have
proliferated on to the various laptops in the lab. To ensure that
things work well this week, download a clean copy of the
dataset, unzip it, launch ArcMap by double-clicking the Lab13.mxd file,
and zoom to the building outlines layer.
Reviewing what we can (and cannot) do
- Buildings revisited. Examine the attribute data for the building
outlines layer. (There is very little!) Rather than trying to recreate the data set that we gave you, simply add new fields for building name, building type (Academic, Dorm, Support), number of floors,
footprint and total area. For the first five buildings in the table, fill in the first three of these values. Do not worry about the
footprint total area for now. (If doing only a portion of campus offends you, feel free to set the values for all twenty-seven buildings.)
- Spatial computations. Using the measuring tools available to you in ArcMap, make an estimate of the footprint (square footage on the ground) for Murphy, Friedsam, and Devereux.
Add these three values to the attribute table. Explain how you arrived at these estimates.
Getting ArcMap to do (some of) the work for you
- Personal Geodatabases - or "More than just a pretty face". If the GIS is to be truly a spatial technology, then it must help you compute various quantities. Two obvious quantities that it can help you compute are lengths and areas. And, yet, as Step 3 showed, this is not easily done. To perform calculations of this sort, the data must be properly stored within the computer. One way to achieve this is to store the information in a Personal Geodatabase, i.e. a database of geographic information that you create. [There are also multi-user geodatabases, but they
do not appear in this course.] Our goal is now to create a personal geodatabase for the buildings layer. [Note: Dr. Georgian did this for you in the past when he created the "labeled_bldgs" layer that you used for the Map Layout lab. We will now walk through the process of doing so.]
- Start ArcCatalog. Within the right-hand window, select the folder in which you wish the geodatabase to reside; right click and choose New:Personal Geodatabase. Name it appropriately. (The icon is a gray cylinder.)
- The dataset you created contains, as yet, no data. To populate, we Export from our existing buildings layer to that dataset. To do so, right-click on that layer, and choose to Export the data to a single personal geodatabase. In the dialog, the input layer will be the one you clicked on (and should be filled in already). The output location should be your geodatabase from step a. The output feature class name can be anything; enter SpatialBuildings.
- Return to ArcMap. Add your new SpatialBuildings dataset to the map.
Using your new layer, determine the areas of our three favorite buildings,
i.e. the ones in Step 3. How did you do this? How accurate were the previous estimates? Can you explain any discrepancies? Don't you wish you knew about this in Week 1? (That
last question is rhetorical.)
- Creating Geodatabases 'from scratch'. It is possible to create a Feature Class within a Personal Geodatabase without having an existing layer. We will now do this to create one that stores lines rather than polygons,
all within the Geodatabase created in the previous step.
- Using ArcCatalog, make a New:Feature Class by right-clicking on the Geodatabase and choosing New. Name it, and go to the next screen. Click Next to get to the third screen. Click on the word “Geometry” (next to Shape in the second row). A new table should open up at the bottom. The third property is “Geometry Type”. Click on Polygon and a drop-down menu appears. Choose Line. Now set the coordinates.
WARNING: THIS IS YOUR LAST CHANCE TO DO THIS; OTHERWISE YOU MUST START OVER. To do so, click the gray button labeled “…” on the last line of the field properties (labeled Spatial Reference). Then choose the X/Y domain tab and put in the correct coordinate values representing the extent of the layer. (Don’t know them? Look them up on a layer in your map.) This is also a good time to set your projection, although that setting can be modified later.
- Add your new dataset to the map.
Using the editor, add a few lines corresponding to steam pipes. In particular, add a line from the power plant to Francis Hall. This line should cross Rob-Fal, and make a significant crossing of Doyle. Do not, of course, let this line cross the wetlands! (For now, you may accomplish this by terminating the line shortly after it leaves Doyle.) Also add lines to Shay and to Murphy. Let these lines cross whatever buildings makes it easy.
- Computing more complicated quantities with geodatabases. Alas, just as you finished drawing in these lines, Congress passed a law which will require that all lines be covered with duct tape. As a first approximation, Bonaventure will assume that the cost is directly proportional to the length of these lines. What is the total length of these lines? Find a way to compute this that would work just as well for one hundred lines as for three. [In other words, don't do any computations yourself.] A
hint is available.
- After further thought. The university has realized that the cost will be significantly higher for those lines that were routed underneath buildings. You must now compute the length of lines under the buildings. To do so, Start ArcToolbox by clicking on the Red Toolbox button near the scale. The Intersection tool is one example of an Analysis tool. Intersect your pipes and your buildings. Be sure to specify that you want the output type to be lines. Adjust the display of the result. What is the total length of the lines that exist under the buildings? What is the total length of the lines that exist not under buildings? This last quantity is probably most easily computed by hand (as it involves only one subtraction regardless of the dataset size), but how might you get ArcMap to compute it?
- Nearest neighbors. Create and populate a new shapefile.
Have it contain you have at least six fire hydrants. (Accuracy is
great, but not necessary for this lab; make it reasonable, but don't sweat
the details.) We wish to solve a problem similar to the "nearest dorm on fire" problem from Lab 5. In particular, we wish to know what the nearest fire hydrant is for each of the buildings on campus. To do so, we must create a spatial join. Right-click the buildings layer in the table of contents and then join it with another layer. Choose to "Join data from another layer based upon spatial location", the Hydrants layer and the second radio button, i.e. the one that selects nearest neighbors. Having done so, determine the hydrant nearest Hopkins Hall. Which one is it, and how did you determine that?
In a similar vein, describe how you would determine which points fell within given polygons. What might be an application that would require such information?
- Buffer zones. As you may be aware, the university has
instituted a policy that prohibits smoking within 30 feet of campus
buildings. As far as enforcing this policy goes, they intend only to
warn smokers who are 15-30 feet from buildings, but to "cite" smokers who
are less than 15 feet away. To help with this, they would like a map
of campus that features each building along with the appropriate "warning"
and "citation" zones. ArcMap includes a feature to help with this; the
feature is most easily accessed using the Buffer Wizard under the Tools
menu. Create the desired map for the administration. (Feel free
to approximate using metric units if this makes things easier.)
To Hand In
Hand in a report that answers the
various questions posed in lab. This report should include sufficient
screen snapshots to show that you created all of the appropriate layers: Pipes,
PipesUnderBuildings, Hydrants, and Smoking Buffer. Also include a snapshot
of the attribute table from Step 8.
Help Policy
Help Policy in Effect for This Assignment: Group Project With Limited Collaboration
In particular, you may discuss the assignment and concepts related to the assignment with the following persons, in addition to an instructor in this course: any GIS instructor and any student enrolled in CS 128/ES 228.
You may use the following materials produced by other students: materials produced by member of your own group.