Está en la página 1de 25

Lab 9: Geoprocessing in ArcGIS - ArcMAP

What Youll Learn: to apply the concepts of buffering and overlay, two common
cartographic operations. In Part II, you will work on a practical problem to develop a
deeper understanding of Geoprocessing.
Data: All data are in \L9 folder and Part 1 subdirectory, including lakes.shp, roads.shp,
and public lands in public_Hugo.shp. All distance units are meters.
What Youll Produce:
In Part 1, Three maps, 1) map of lake variable distance
buffer zones, 2) map of suitable recreation areas, and 3) map of suitable recreation
areas on private land only.

Part One: Buffer Zones


Buffering and overlay are two of the most common operations in cartographic modeling.
A buffer zone is an area that is within a given distance from a map feature. Points,
lines, or polygons can be buffered. Buffers are used to identify areas surrounding
geographic features. For example, you may wish to keep septic systems over 100
meters away from streams, locate housing within a quarter mile of existing roads, keep
hiking trails away from seasonally flooded rivers, or make sure most of your city is within
some maximum distance from a fire station or school.
When you buffer on a set of features, the output is a set of polygons. (Buffering points
or lines creates a new polygon layer). These polygons define an inside region, an area
less than the specified buffer distance from the features of interest (e.g., less than 300
meters from a stream), and an outside region, an area more than the specified buffer
distance from the features of interest.
These inside and outside regions are typically distinguished by different codes in an
attribute table. You should know the specific codes assigned for the software system
you use.
Fixed Distance Buffers
A fixed distance buffer identifies the inside and outside
region for a fixed distance away from a set of features.
Fixed distance buffering may be applied to points, line,
or polygon input, and creates polygon output.
The figure on the right shows the buffer area (in blue)
for a road network (thicker black lines). It separates
the inside area (blue) from the outside area (white).
There will be a corresponding table with some coding
to indicate the in/out status of each polygon.
Note there is a third status possible for each polygon. We may note those that are out,
but surrounded in that they are contained within the bounds of an in polygon.
1

Variable Buffers
Another variation on buffering will change the buffer distance depending on feature
attributes (see the figure, below).

A GIS project may require buffering those lakes to map a minimum distance from shore
for installing septic systems. However, the acceptable distance for septic systems may
depend on lake size. A large lake could have a system within 100 meters of lakeshore,
but a small lake needs a setback of 25 meters.
A variable distance buffer could buffer the lakes coverage by using an attribute that
specifies the size class. Different sized buffers would be applied to each lake
depending on the size class attribute.
You will create a variable distance buffer in this lab, with the buffer distance defined by
lake size.
Variable distance buffering requires some way of specifying the
distance. This is most often done with an attribute in a table. The
buffering operation uses the table entry to determine buffer
distance around a feature. A numeric data item must be created
to specify the buffer distance, as shown in the column named
DIST in the table to the right. Each lake with an attribute for
surface of 1 will be assigned a buffer with distance 100, a surface
value of 2 a buffer distance of 50, and a surface value of 3, a
buffer distance of 25. Examples of lakes with the three different
surface values and resulting buffers are shown in the figure
above.

Surface
1
2
3

DIST
100
50
25

This item, named dist


here, is used to
specify the buffer
distance.

Part 1: Buffering in ArcMAP


Create a new ArcMap project and add the roads.shp data layer.
Left click on the red ArcToolbox to activate the tools menu, then Analysis Tools
Proximity Buffer.

The displayed window (an example in the figure below) allows you to create a buffer
layer derived from an Input feature layer in a manner you specify.

Set the Input layer to


roads.shp

Specify the Output


Features location and name,
something like
road_buffer_300m.shp.

Enter the Linear unit as


300, and set the units to Meters.

Set the Dissolve Type to


All

Left click OK.

When the buffering process is


finished, it should display the
buffer data layer. You should
close the completed buffer
dialog box.

Redo this buffer, but this time; leave the default Dissolve Type to NONE. How do the
results differ? When would this be important? After inspecting, remove the undissolved
layer.
Creating a Variable Distance Buffer
The second exercise will buffer the Lakes.shp layer using a variable distance buffer.
The buffer distances are:
A buffer distance of 50 meters for lakes with size class 1
A buffer distance of 150 meters for lakes with size class 2
A buffer distance of 500 meters for lakes with size class 3
3

This exercise involves three steps (step by step instructions below).


-First you open the lakes attribute table in ArcMap and insert a new field that will hold
the variable buffer distance.
-Second you use Select by Attributes to assign the attribute values for the variable
buffer distance (refer to Lab 7 if you dont remember the details on selecting and editing
values in a table)
-Third, you apply the buffer operation.
Step by Step instructions;

Make sure the Lakes.shp is in your project, and open the attribute table for Lakes.
Left click Options Add field, and create a new long integer field named buffdist,
something descriptive.
Use the Select by Attributes to select each of the lake size classes. Assign the
appropriate buffer distance to each lake size class, placing the value in the newly
created field. Refer to the Lab 7 in this series if you dont remember how to
calculate/assign fields.

Close the table. Make sure you unselect any selected polygons or the buffer will only
work on selected polygons (before switching out of the table, click on the Selection
Clear All Selected Features).
Your table should appear similar to that shown below.

Now create the variable distance buffer:


Left click in the ArcToolbox Analysis Tools Proximity Buffer.
Make sure the Lakes.shp layer is Input.
Name the Output Features something logical, such as Var_Lake_Buffer.shp.
Select the Field (not
Distance Unit) radio
button.
Specify the field you
created in the previous
step, buffdist.
Select Dissolve Type as
ALL.
When the buffering
process is finished, it
should display the buffer
data layer, close the
completed buffer dialog
box.
Arrange the roads, dissolved fixed distance road buffer, lakes, and dissolved variable
distance lake buffer layers so that you can see all three, as in the figure below.
Create and print/export a layout with
the roads, lakes, and their buffers, as
in the view shown here. Make sure
the order is as shown here, so you
may see most of each layer. The order
is, from the top, 1) roads, 2) road
buffer, 3) lakes, 4) lake buffer.
Your data view should look something
like the figure at right.
Create a layout, and label each layer
with descriptive text in the
TOC/legend, and include a scale bar,
north arrow, and title.

Part Two: Overlay in ArcMAP


Overlays are another common cartographic modeling operation. An overlay is the
primary way to combine information from two separate themes. Overlays are most
common for polygonal data, and perform a geometric intersection, which results in a
new layer with the combined attributes of both initial layers.
Our goal in this exercise is to find potential campgrounds sites for a State Park. The
campground needs to be within the buffer zone created for the lakes. However, these
will be drive in sites and they must also be within the buffer zone of the roads. The
final map will show locations that are both within 50, 150 or 500 meters of a lake
(depending on the size of the lake) and within 300 meters of a road.
We have already created our starting Layers. These are the variable distance lakes
buffer, and the fixed distance roads buffer from the previous exercise.
In ArcMap we must modify input layers prior to overlay so that we may easily interpret
the results after overlay. We add a field to each input data layer that specifies the
factors we wish to use later in our analysis.
In our current exercise, we wish to identify areas that are inside the buffers in the lake
buffer layer. We create a new item (column or attribute) in the lakes buffer table, name it
something like insd_lbuf, and give it a value of 1 for all the lake buffer areas (you should
know how to do this by now, without step-by-step instructions, but refer to previous labs,
or ask the instructor). When you
are done, you should have
attribute tables for the lakes buffer
that looks like:

Do the same for the road buffer


layer. Add a new attribute call it
insd_rbuf and assign it a value of
1 to indicate it is inside the road
buffer:
We dont worry about assigning a
value for areas outside the buffer
in this exercise, because of the
way ArcMap views the vector
world. Areas outside of polygons do not have a boundary nor a record in the attribute
table associated with them. We cannot assign a value for these outside areas in each
input layer, because there is nothing to attach the value to. Some other vector GIS
packages define a bounding polygon for the outside world, and in a later lab we will use
raster overlay to assign values for both the inside and outside areas. We usually do not
assign outside areas in vector overlay in ArcMap.

Before we overlay the two layers with the Union command, we need one more
preparation step. The lake buffers layer we created has buffered areas that include the
lake as well as the land near shore. We only want campsites on dry ground so we will
erase the lake from the lake buffer layer.
Note: Student Home versions of ArcGIS 10 do not have ERASE. This is a ArcEditor
version, with a one-year time out. Some functions are missing, including Erase, the
ability to work with topology, and others.
If you do have the Erase function (only in the ArcInfo version of ArcGIS located in Skok
35 or Green 210A labs), perform the following steps.
First, open the ArcToolbox, then Analysis Tools Overlay Erase
Specify Input Features as the variable lakes buffer
Specify the Erase Features as the lakes layer
Set the output destination in the output feature class
OK to apply the buffer

Workaround:
If you dont have the Erase
function in your toolbox, do
the following:
Open the table of the file that
will be used as the eraser, in
this lab this file is the Lakes

Add a short integer field to the lakes file, call it something like to_erase.
Use the Field Calculator (right click on column heading) to assign a value of 1 to all
records in this new to_erase column.
Use ArcToolbox Analysis Tools Overlay Union to union the erasing layer
(Lakes.shp) and the target (Var_Lakes_Buffer.shp) files
Open the attribute table of the unioned layer. Select by Attributes all records toerase is not equal to 1; for example to_erase <> 1,
Leave the records selected.
Select the unioned layer and Data Export Data, name the output
outside_lake_buffer.

End Workaround
7

The final step is to overlay the two buffer layers.


Select ArcToolbox Analysis Tools Overlay Union
Specify the input layers outside_lake_buffer and road_buffer_300m.
Specify the output layer Union_Lk_Rd.
Press OK.
Examine the unioned layer and open the
attribute table for this layer. Select the polygons
that meet both the within the roads buffer and the
within the lakes buffer criteria (see the figure
below for some hints).
Note the number of records selected.
Why do you have only 3 records? You can see
more polygons on the screen.
ArcMap groups polygons in the data files when
performing analysis. When we are finished with
our analysis we will ungroup polygons in the file,
creating a table row for each polygon.
Open the attribute table for the roadbuffer outside
Lake buffer union, and create a new field named
something like in_both to identify those areas that
meet both the inside road buffer and inside lake
buffer criteria (refer to previous exercises).
Use Select by Attributes to find those areas with insd_lbuf=1 and insd_rbuf = 1, and
assign them the number 1 using the Field Calculator (previous exercises, or see
graphic below).

Close the attribute table, make sure the Union_Lk_Rd layer is selected and right
click on the layer name in the TOC. Right click on the Union_Lk_Rd layer in the
table of contents, and select Data Export Data and export only the selected
(where in_both =1) to a file called Acceptable_Areas.

Select Toolbox Data Base


Management Features
Multipart to Singlepart. This will
ungroup the combined polygons
to and create a table row for each.
You should have 32 records in the
table for the singlepart file.

Display the roads, singlepart


acceptable areas, and lakes in the
view. It should look something like
the figure at right.
Now before you print/export the map
you need to determine the size (in
acres or hectares) of your acceptable
sites.
Open the attribute table and add a float or double field named Hectares with a
precision of at least 12, scale of 1 or 2. Verify that there are 32 records in the table.
Right click on the column heading for the Hectares column, and left click on Calculate
Geometry in the
dropdown menu.
Specify Area in the
Property drop down box,
the default coordinate
system, and Hectares,
then O.K.:
The new Hectares column
should be populated with
numbers, with values
between 0 and 300.
Right click on the
Hectares column, and
then left click on
Statistics:
This should display a set of summary statistics.
Count should be 32. If it isnt, perhaps you selected the wrong layer, or made a mistake
in the processing chain.
The total area should be over 1000, but below 1200. If it is way off, perhaps you
selected incorrect units in calculating geometry.
10

Create a second .pdf as suggested below:

11

PART 3

Estimate the amount of Private (non-public) land in your


proposed Campsites locations.

Create a new project or data frame, and add the layers roads.shp, Lakes.shp,
acceptable areas.shp, and Public_Hugo.shp (see figure below).

Open the
ArcToolbox, then
Analysis
Overlay
Erase
Remember, if you
have the ArcMap
Student (or
ArcView) edition,
you do not have
the Erase tool, and
should use the
Workaround
described earlier.

From the
acceptable
areas layer,
use the Public_Hugo as the Erase Features Layer. This removes the publicly owned
land in Hugo from your Acceptable Areas.
Name you new layer; in the Output Feature Class to
Campgrounds_on_Private_Land. This is the land that would need to be acquired if
the community wants to build campsites.

Recalculate the area of Campground_on_Private Land and note it size in hectares.


Subtract it from your previous area calculation (the total Acceptable Areas from Part 2).
Create a Layout that includes roads, lakes, and Campgrounds on Private Land. (see
below).

12

Label each layer with descriptive text in the legend, and include a scale bar, north
arrow, and title.
Make sure you add the area measurement of the suitable for campground on private
land, in hectares.

Print or Export a map from this layout, your third and final map for this lab.

13

Part II
SOLVE A PRACTICAL PROBLEM

14

Setting Up a Map Document


In this tutorial, you will be preparing data for a hypothetical collaboration between the Houston
Police Department (HPD) and the Houston Independent School District (HISD). The goal is to
learn which elementary schools are located in areas with high levels of violent crime and put
them in touch with their respective police districts to create plans to reduce crime near their
campuses.
You will begin by opening ArcMap and creating a new map document.
1. On the desktop, double-click the ArcMap 10.1 icon.
2. In the ArcMap Getting Started window, ensure that My Templates and the Blank
Map template are selected.

At the bottom of the window, notice the default geodatabase for this map is currently set to
C:\Users\gistrain\Documents\ArcGIS\Default.gdb. The default geodatabase should be set to the
geodatabase that will contain most of the data for the particular map document you are working
on. In this case, you will want to use the geodatabase in your GeoprocessingTutorialData folder.
3. Next to the Default geodatabase for this map: box, click the Browse button.

4. In the Default Geodatabase window, click the Connect To Folder button.

5. In the Connect To Folder window, select the GeoprocessingTutorialData folder


located in the Lab9 folder.

Ensure that the GeoprocessingTutorialData folder is highlighted in blue and not the
GeoprocessingData.gdb geodatabase that appears inside it. You never want to connect directly to
a geodatabase, as doing so will prevent you from being able to access any of the data contained
inside of it.
6. For Folder:, verify that GeoprocessingTutorialData folder or the is listed and
click OK.
7. In the Default Geodatabase window, select the GeoprocessingData.gdb
geodatabase and click Add.
8. Ensure the Default geodatabase correctly mentions GeoprocessingData.gdb
and click OK.
15

At this point, it is a good idea to save your map document and to continue saving regularly.
9. On the Standard toolbar, click the Save button.

10. In the Save As window, use the Save in: drop-down box to select the
GeoprocessingTutorialData folder.

You will save the map document here, directly inside the GeoprocessingTutorialData, but NOT
within the GeoprocessingData geodatabase.
11. For File name:,

type HoustonSchoolsAndCrime and click Save.

Remember that, in order for your GIS project to open properly on other computers, you must tell
the map document to store relative pathnames to its data sources and take your entire project
folder containing all of your data and your map document with you.
12. Click the File menu and select Map Document Properties.
13. Towards the bottom of the Map Document Properties window, click the checkbox
to Store relative pathnames to data sources and click OK.
14. On the Standard toolbar, click the Save button again to store this setting in your
map document.

Merge
The first set of data you will be working with contains the HPD beat boundaries. Though it has
been modified for the purposes of this tutorial, the original data can be obtained from the City of
Houston GIS Database webpage, at http://cohgis.houstontx.gov/cohgis2010/index.html, within
the administrative boundary dataset.
1. On the right side of the ArcMap window, click the Catalog tab.
2. On the Catalog toolbar, click the Go To Default Geodatabase button, which will
take you to the default geodatabase you specified earlier.

3. Double-click the Geoprocessing Data geodatabase to expand it.


4. Drag the HPDBeats_North feature class into the Map Display.
5. Click the Catalog tab again and drag the HPDBeats_South feature class into the
Map Display.

16

Notice that the police beats in the City of Houston have been divided into two separate feature
classes covering the northern and southern portions of the city respectively. You will now
examine their attribute tables.
6. In the Table of Contents, right-click the HPDBeats_North layer and select Open
Attribute Table.

Notice that you are provided with both the beat number and the district number for each police
beat and that there are 55 beats in the north layer.
7. In the Table of Contents, right-click the HPDBeats_South layer and select Open
Attribute Table.

Notice that the south layer contains 62 beats with the same data fields.
8. Close the attribute tables.

At this point, you wish to combine the north and south police beats into a single layer. You will
do so using a geoprocessing tool in ArcToolbox.
9. On the Standard toolbar, click the ArcToolbox button.

10. Drag the blue title bar of the ArcToolbox window and notice the four blue
outward facing arrow buttons at the center of your screen.

11. Hover your cursor over the arrow pointing left towards the Table of Contents and
release to dock ArcToolbox in between your Table of Contents and your Map
Display.
12. If desirable, resize the widths of your Table of Contents and ArcToolbox.
13. On the Tools toolbar, click the Full Extent button.

14. In ArcToolbox, double-click the Data Management Tools toolbox > General toolset
> Merge too .
15. In the bottom right corner of the Merge window, click Show Help >>.

17

Read the Merge window help and review the sample illustration. Notice that this tool merges
two like datasets covering different geographic extents together in a single dataset.
16. In the Table of Contents, select the HPDBeats_South layer.
17. Hold down Shift and select the HPDBeats_North layer, so that both layers are
simultaneously selected.
18. Drag both selected layers into the Input Datasets box in the Merge window.

Notice that the Output Dataset defaults to your default geodatabase


(C:\Users\gistrain\Desktop\Working_data\Data\GeoprocessingData.gdb).
19. For Output Dataset, rename the feature class from HPDBeats_South_Merge or
HPDBeats_North_Merge to HPD_Beats and click OK.

Usually, it takes a few moments for the tool to begin executing. While the tool is running, you
will notice scrolling text with the name of the running tool in the bottom right corner of the Map
Display, as shown below.

When the tool is finished running, you will see a box pop-up in the bottom right portion of your
monitor with the name of the tool. A green checkmark indicates that the tool ran successfully.

20. In the Table of Contents, right-click the HPDBeats layer and select Open Attribute
Table.

Scroll down the attribute table and notice that the attributes for both the north and south beats
feature classes were preserved and combined into a single table with 117 beats.
21. Close the attribute table.

Since you now have all the beats contained in a single layer, you no longer need the separate
layers for the north and south beats.
22. In the Table of Contents, right-click the HPDBeats_North layer and select Remove.
23. In the Table of Contents, right-click the HPDBeats_South layer and select Remove.
24. On the Standard toolbar, click the Save button.

18

Dissolve
As explained in the tutorial introduction, the collaboration with the schools is going to be based
on the police districts, not the police beats. At this point, your HPD layer only displays the police
beat boundaries, but its attribute table does tell you the district number corresponding to each
beat.
1. In the Table of Contents, right-click the HPDBeats layer and select Open Attribute
Table.

Scroll down the attribute table while observing the values in the District field. Notice that each
district contains many beats. You will now dissolve the police beats based on this District field
so that all beat boundaries within a single district will be dissolved into a single district
boundary.
2. Close the attribute table.
3. In ArcToolbox, under the Data Management Tools toolbox, double-click the
Generalization toolset > Dissolve tool.

Read the Dissolve help and review the sample illustration. Notice that this tool dissolves
boundaries based on common field values. In this case, you will dissolve the police beat
boundaries based on common district values, resulting in a file showing only the larger district
boundaries.
4. For Input Features, drag in the HPDBeats layer from the Table of Contents.
5. For Output Feature Class, rename the feature class from HPDBeats_Dissolve
to HPDDistricts.
6. For Dissolve_Field(s), check the District field, since this is the field containing
the common district values you wish to dissolve on.
7. Click OK.
8. In the Table of Contents, toggle the new HPDDistricts layer off and on to get a
better idea of the result of the Dissolve tool.
9. In the Table of Contents, right-click the HPDDistricts layer and select Open
Attribute Table.

Notice that only the dissolve field, in this case the District field, was preserved. Because multiple
beats were dissolved into each district, it is not possible to retain all of the attributes of each
separate beat.
10. Close the attribute table.

Since you only need to use the police districts, you may now remove the police beats layer.
19

11. In the Table of Contents, right-click the HPDBeats layer and select Remove.
12. On the Standard toolbar, click the Save button.

Clip
Now you will examine the school district boundaries. Though it has been modified for the
purposes of this tutorial, the original data can also be obtained online from the City of Houston
GIS Database webpage at http://cohgis.houstontx.gov/cohgis2010/index.html within the
administrative boundary dataset.
1. On the right side of the ArcMap window, click the Catalog tab.
2. Drag the HISD feature class into the Map Display.

Notice that this feature class displays the boundary of the Houston Independent School District,
which can be considered the study area boundary for this project. All of the other data layers you
bring into your map document can be clipped to the study area boundary to reduce the size of the
files you are working with, which will eliminate visual clutter and allow various processes to run
more quickly. First, you will clip the police districts to the study area boundary.
3. In ArcToolbox, double-click the Analysis Tools toolbox > Extract toolset > Clip
tool.

Read the Clip window help and review the sample illustration. Notice that this tool clips one
dataset to the extent, or shape, of another dataset.
4. For Input Features, drag in the HPDDistricts layer from the Table of Contents.
5. For Clip Features, drag in the HISD layer from the Table of Contents.
6. For Output Feature Class, rename the feature class from HPDDistricts_Clip to
HPDDistricts_HISD and click OK.

Notice that the resulting HPDDistricts_HISD layer maintains the police district boundaries, but
limits the extent of the districts to the extent of the HISD boundary. You no long need the full
police districts layer and may remove it.
7. In the Table of Contents, right-click the HPDDistricts layer and select Remove.

You will now work with a dataset containing the locations of all violent crimes (including
murder, rape, aggravated assault, and robbery) occurring in 2010, as reported by HPD.
8. On the right side of the ArcMap window, click the Catalog tab.
9. Drag the HPDCrime2010 feature class into the Map Display.

20

10. If the Geographic Coordinate Systems Warning window appears, click Close.

You will now clip the crime layer to the study area boundary to reduce the size of the dataset.
11. In ArcToolbox, double-click the Clip tool.
12. For Input Features, drag in the HPDCrime2010 layer from the Table of Contents.
13. For Clip Features, drag in the HISD layer from the Table of Contents.
14. For Output Feature Class, rename the feature class from HPDCrime2010_Clip
to HPDCrime2010_HISD and click OK.
15. In the Table of Contents, right-click the HISDCrime2010_HISD layer and select
Open Attribute Table.

Notice that you are provided with the date and hour of the crime, the type of offense, the premise
code, the number of offenses, and the approximate address. Since crimes are actually only
reported by the block address range, not the exact street address, this address represents the
midpoint of the block on which the crime was reported.
16. Close the attribute table.
17. In the Table of Contents, right-click the HPDCrime2010 layer and select Remove.
18. In the Table of Contents, uncheck the HPDCrime2010_HISD and HISD layers, so
that only the HPDDistricts_HISD layer is visible.
19. On the Tools toolbar, click the Full Extent button.
20. On the Standard toolbar, click the Save button.

Buffer
The final dataset you will work with contains the locations of all the elementary schools in
HISD.
1. On the right side of the ArcMap window, click the Catalog tab.
2. Drag the HISDElemSchools feature class into the Map Display.
3. In the Table of Contents, right-click the HISDElemSchools layer and select Open
Attribute Table.

Notice that you are provided with the elementary school name, address, and grade range.
4. Close the attribute table.

21

Now you will create a one-half mile buffer around each school, so that you will later be able to
count the number of violent crimes occurring in 2010 within each buffer.
5. In ArcToolbox, under the Analysis Tools toolbox, double-click the Proximity
toolset > Buffer tool.
6. For Input Features, drag in the HISDElemSchools layer from the Table of
Contents.
7. For Output Feature Class, rename the feature class from
HISDElemSchols_Buffer to HISDElemSchools_HalfMileBuffer.
8. For Linear unit, type 0.5 and use the unit drop-down box to select Miles.
9. Click OK.
10. In the Table of Contents, right-click the HISDElemSchools_HalfMileBuffer layer
and select Open Attribute Table.

Notice that all three fields contained in the original schools point layer (school name, address,
and grade range) have been preserved. In addition, a new field has been added stating the radius
of the buffer in feet.
11. Close the attribute table.
12. On the Standard toolbar, click the Save button.

Spatial Join (Points to Polygons)


1. In the Table of Contents, uncheck the HISDElemSchools layer and check the
HPDCrime2010_HISD layer.

At this point, you can see all of the violent crime locations along with the half-mile school
buffers, but much of the map is so densely covered with overlapping points that it becomes
difficult to tell exactly how many points there are and to see the underlying school buffers. In
addition, while you can see the spatial distribution of the points, you are not provided with any
sort of useful summary of the data. Performing a spatial join will allow you to discover exactly
how many violent crimes occurred within a half mile of each school in 2010.
The goal of performing a spatial join is to add a numeric field to the end of the school buffer
attribute table that tells you how many crime points are contained within each school buffer.
2. In the Table of Contents, right-click the HISDElemSchools_HalfMileBuffer layer
and select Joins and Relates > Join.
3. For What do you want to join to this layer?, select Join data from another layer
based on a spatial location.
22

4. For 1. Choose the layer to join to this layer, use the drop-down box to select the
HPDCrime2010_HISD layer.

For 2., notice that it now specifies you are joining points to polygons and updates the options
based on these respective geometry types. Notice also that the default selection ensures that each
polygon will automatically be given a count field showing how many points fall inside it. In
addition, you would like to generate a sum of the values contained in the number of offenses
field, since some crime points contain more than one offense.
5. For 2., check to summarize the Sum of each numeric attribute.
6. For 3., scroll to the end and rename the feature class from Join_Output to
HISDElemSchools_HalfMileBuffer_WithCrimeStats and click OK.

The new layer should appear at the top of your Table of Contents.
7. Right-click the HISDElemSchools_HalfMileBuffer_WithCrimeStats layer and select
Open Attribute Table.
8. Scroll to the right and notice the newly added Count_ field. This field tells you
how many crime points are contained within each school buffer. The new
Sum_Num_Off field tells you the sum of the number of offenses field contained in
the original crime points layer.
9. Close the attribute table.

Since the newly joined buffer layer contains all of the same information as the original buffer
layer, plus the new Count and Sum fields, you no longer need the original buffer layer. Since
your crime data has now been summarized, you no longer need the original crime points either.
10. In the Table of Contents, right-click the HISDElemSchools_HalfMileBuffer layer
and select Remove.
11. In the Table of Contents, right-click the HPDCrime2010_HISD layer and select
Remove.
12. Double-click the HISDElemSchools_HalfMileBuffer_WithCrimeStats layer to open
the Layer Properties window and edit the symbology.
13. Click the Symbology tab.
14. In the Show: box on the left, click Quantities and leave the default selection of
Graduated colors.
15. In the Fields box, for Value:, select the Sum_Num_Off field.
16. Under the Range column, click the range 3.000000 27.000000 and type 25 and
press Enter to move to the next range.
17. Type 50 and press Enter.
23

18. Type 100 and press Enter.


19. Type 150 and press Enter.
20. Click OK.

You can now easily tell which schools have the largest number of violent crimes occurring
within a half mile radius.
21. On the Standard toolbar, click the Save button.

Spatial Join (Polygons to Points)


You now have an attribute table that tells you the number of violent crimes that occurred within
one year within a half mile of each school, but you would also like to have a table that tells you
in which police district each elementary school lies. To create this table, you will perform
another spatial join to add the attributes of the police beat to the back of each school that lies
inside it.
1. In the Table of Contents, uncheck the
HISDElemSchools_HalfMileBuffer_WithCrimeStats layer and check the
HISDElemSchools layer.

At this point, only the elementary school point locations and the police district boundaries should
be visible.
2. In the Table of Contents, right-click the HISDElemSchools layer and select Open
Attribute Table.
3. Scroll to the right and browse through all of the attributes.

Remember that, at this point, the attribute table only contains the school name, address, and
grade range.
4. Close the attribute table.
5. In the Table of Contents, right-click the HISDElemSchools layer and select Joins
and Relates > Join.
6. For What do you want to join to this layer?, select Join data from another layer
based on a spatial location.
7. For 1. Choose the layer to join to this layer, use the drop-down box to select the
HPDDistricts_HISD layer.

For 2., notice that it now specifies you are joining polygons to points and updates the options
based on these respective geometry types.
24

8. For 2., check that each point will be given all the attributes of the polygon that it
falls inside.
9. For 3., scroll to the end and rename the feature class from Join_Output to
HISDElemSchools_WithHPDDistricts and click OK.

The new layer should appear at the top of your Table of Contents.
10. Right-click the HISDElemSchools_WithHPDDistricts layer and select Open
Attribute Table.
11. Scroll to the right and notice the newly added OBJECTID and District fields. The
District field tells you which police district each school falls within.
12. Scroll to the bottom and notice that the last five schools do not have a district
assigned to them. That is because those schools fall within HISD, but do not fall
within the City of Houston police jurisdiction.
13. Close the attribute table.

Searching for Tools in ArcToolbox


In this tutorial, you navigated to various geoprocessing tools directly through ArcToolbox;
however, it is likely that when you go to work on your own, you may not remember exactly
where all those tools are located. As long as you can remember the name of the tool or what it
does, you can find it using the search function.
1. On the right side of the ArcMap window, click the Search tab.
2. At the top of the Search tab, click the Tools link to limit your search to the tools in
ArcToolbox.
3. In the Search box, type Buffer and press Enter.
4. Click on the blue link that says Buffer (Analysis) to open the tool wizard.
5. Close the Buffer window without running the tool.
6. Beneath the blue link you just clicked, click the green link that says
toolboxes\system toolboxes\analysis tools.

Notice that the toolboxes are expanded to the location of the particular tool you searched for
directly within the Catalog window.

Produce a map of the final layer generated after the Spatial Join, apply suitable
symbology and submit accordingly
25

También podría gustarte