Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Running Geoprocessing Tools

Geoprocessing tools are used to update and analyze data based on a particular criteria. The majority of geoprocessing tools generate a new feature class that differs from the input feature class(s) either in feature geometry or attributes or both.

Merge

The first set of data you will be working with contains the Houston Police Department (HPD) beat boundaries. Though it has been modified for the purposes of this tutorial, the original data was obtained from the City of Houston GIS Database webpage, which is no longer available, but the original data can be obtained from the GIS/Data Center data collection.

...

  1. At the top of the Geoproccessing pane, click the Toolboxes tab.
  2. Click the Data Management Tools toolbox > General toolset > Merge tool.
  3. In the upper right corner of the ‘Merge’ tool, hover over the help button.

Read the Merge pane help and review the sample illustration. Notice that this tool merges two like datasets covering different geographic extents together into a single dataset. Clicking on the help button will open the full tool documentation in your default web browser.

  1. For ‘Input Datasets’, use the drop-down menu to In the ‘Input Datasets’ drop-down menu, click the drop-down arrow and select the HPDBeats_South layer.

After selecting the HPDBeats_South layer, another drop-down window menu appears.

  1. Click the second Use the second 'Input Datasets' drop-down arrow and menu to select the HPDBeats_North layer.

Notice that the when you hover over the 'Output dataset windowDataset' field, Output Dataset defaults to your default geodatabase (C:\Users\gistrain\Desktop\GeoprocessingTutorialDataGeoprocessing\HoustonSchoolsAndCrime\HoustonSchoolsAndCrimeGeoprocessing.gdb).

  1. For ‘Output Dataset’, rename the  only the feature class portion of the file path from “HPDBeatsHPDBeats_South_Merge” Merge or “HPDBeatsHPDBeats_North_Merge” to “HPD_Beats.’
  2. Leave all other settings as the default.
  3. Merge to “HPDBeats".
  4.  Ensure that your merge pane appears like the pane Merge tool Parameters tab appears as shown below and click Run.

...

  1. .

When the tool is finished running, you will see a box pop-up in message at the bottom right portion of your monitor of the Geoprocessing pane with the name of the tool. A green checkmark indicates that the tool ran successfullytool. A green checkmark indicates that the tool ran successfully. You may also see a yellow warning icon or a red X if the tool has warnings or fails.

  1. In the Contents pane, right-click the HPDBeats layer and select 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.

  1. 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.

  1. In the Contents pane, right-click the HPDBeats_North layer and select Remove.
  2. In the Contents pane, right-click the HPDBeats_South layer and select Remove.
  3. On the Above the ribbon, on the Quick Access toolbar, click the  the Save button button.

    Image Added

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. Scroll down the HPDBeats 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.

  1. Close the attribute table the HPDBeats table view.
  2. On the Analysis tab, click the Tools At the top of the Geoprocessing pane, click the Back button.
  3. Under the Toolboxes tab in In the Geoprocessing pane click the within the already expanded Data Management Tools toolbox click the Generalization toolset > click the Dissolve toolDissolve tool.
  4. In the upper right corner of the ‘Merge’ tool, hover over the help button.

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.

  1. For ‘Input Features’drag in the HPDBeats layer from the Contents pane, use the drop-down menu to select the HPDBeats layer.
  2. For ‘Output Feature Class’, rename the feature class from “HPDHPD_Beats_Dissolve” Dissolve to “HPDDistricts”HPDDistricts.
  3. For ‘Dissolve_Field(s)’,  use the drop-down menu to select the District field, since this is the field containing the common district values you wish to dissolve on.
  4. Ensure that your Dissolve pane looks like the pane tool Parameters tab appears below, and click Run Run.
  5. In the Contents pane, toggle the new HPDDistricts layer off and on to understand the result of the Dissolve tool.
  6. In the Contents pane, right-click the HPDDistricts layer and select Attribute  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.

  1. Close the HPDDistricts attribute table.

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

  1. In the Contents pane, right-click the HPDBeats layer and select Remove Remove.
  2. Click the Save buttonAbove the ribbon, on the Quick Access 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[g2]  within the administrative boundary dataset.

  1. On At the right side bottom of the screen, close the Geoprocessing pane, click the Catalog tab.In
  2. Within the Catalog pane, click Folders > GeoprocessingTutorialData > GeoprocessingData.gdb.Drag the HISD feature class into the Map DisplayGeoprocessing geodatabase, right-click the HISD feature class and select Add To Current Map.

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.area boundary.

  1. At the bottom of the Catalog pane, click the Geoprocessing tab.
  2. At the top of the Geoprocessing pane, click the Back button.
  3. Click the Data Management Tools toolbox to collapse it.
  4. Click the Analysis
  5. On the ribbon, click the Analysis tab.
  6.  click the Tools button >Analysis Tools toolbox > Extract toolset > Clip tool.

Read the Clip pane help and review the sample illustration. Notice that this tool clips one dataset to the extent, or shape, of another dataset.

  1. For ‘Input Features’,  drag in the HPDDistricts layer from the Contents paneuse the drop-down menu to select the HPDDistricts layer.
  2. For ‘Clip Features’,  drag in use the drop-down menu to select the HISD layer from the Contents pane.
  3. For ‘Output Feature Class’, rename the feature class from “HPDDistrictsHPDDistricts_Clip” Clip to “HPDDistrictsHPDDistricts_HISD” HISDand click Run Run.

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.

...

  1. On the right side of the screen, close the Geoprocessing pane.
  2. In the Catalog pane, drag the HPDCrime2010 feature class into the Map Display.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.

  1. In the Analysis tab, click the Tools button >Analysis Analysis Tools toolbox > Extract toolset > Clip tool.
  2. For ‘Input Features’,  drag in the HPDCrime2010 layer from the Contents paneuse the drop-down menu to select the HPDCrime2010 layer.
  3. For ‘Clip Features’,  drag in use the drop-down menu to select the HISD layer from the Contents pane.
  4. For ‘Output Feature Class’, rename the feature class from “HPDCrime2010HPDCrime2010_Clip” Clip to “HPDCrime2010HPDCrime2010_HISD” HISDand click Run Run.
  5. In the Contents pane, right-click the HISDCrime2010_HISD layer and select Attribute  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.

  1. Close the attribute HISDCrime2010_HISD table view.
  2. In the Contents pane, right-click the HPDCrime2010 layer and select Remove Remove.
  3. In the Contents pane, uncheck the HPDCrime2010_HISD and HISD layers, so that only the HPDDistricts_HISD layer is visible.
  4. Click the Save buttonAbove the ribbon, on the Quick Access toolbar, click the Save button.

Buffer

The final dataset you will work with contains the locations of all the elementary schools in HISD. Though it has been modified for the purposes of this tutorial, the original data can be obtained online from the Texas Education Agency School District Locator Data Download webpage at http://schoolsdata2-tea-texas.opendata.arcgis.com/

  1. On At the right side bottom of the screen, close the Geoprocessing pane, click the Catalog tab.
  2. In the Catalog pane,  drag right-click the HISDElemSchools feature class into the Map Displayclass and select Add To Current Map.
  3. In the Contents pane, right-click the HISDElemSchools layer and select Attribute  Attribute Table.

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

  1. Close the attribute HISDElemSchools table view.

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.

  1. In the Analysis tabGeoprocessing paneclick the Tools button > the Analysis Tools toolbox > the Proximity toolset > Buffer tool.
  2. For ‘Input Features’,  drag in the HISDElemSchools layer from the Contents paneuse the drop-down menu to select the HISDElemSchools layer.
  3. For ‘Output Feature Class’, rename the feature class from “HISDElemScholsHISDElemSchols_Buffer” Buffer to “HISDElemSchoolsHISDElemSchools_HalfMileBuffer”HalfMileBuffer.
  4. For ‘Distance [value or field]’, type “0 “0.5” 5and use the unit drop-down box to select Miles Miles.
  5. Click Run Run.
  6. In the Contents pane, right-click the HISDElemSchools_HalfMileBuffer layer and select Attribute  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.

  1. Close the HISDElemSchools_HalfMileBufferattribute table.Click the Save button
  2. Above the ribbon, on the Quick Access toolbar, click the Save button.
  3. In the Contents pane, uncheck the HISDElemSchools layer and check the HPDCrime2010_HISD layer.

Spatial Join (Points to Polygons)

...

  1. In the Contents pane, right-click the HISDElemSchools_HalfMileBuffer layer and select Joins  Joins and Relates > Spatial Join.
  2. For ‘Join Features’, use the drop-down box to select the HPDCrime2010_HISD layer.
  3. For ‘Merge Rule,’ click the drop down arrow ’ use he drop-down menu to select Count.
  4. For ‘Output Feature Class,’ rename the feature class from “JoinJoin_Output” Output to “HISDElemSchoolsHISDElemSchools_HalfMileBuffer_WithCrimeStats".
  5. Ensure that your Spatial Join pane appears like the pane tool Parameters tab appears as shown below and click Run Run.

The new layer should appear at the top of your Contents pane. 

  1. Right-click the HISDElemSchools_HalfMileBuffer_WithCrimeStats layer and select Attribute Table.

Notice the newly added Join_Count field.  This field tells you how many crime points are contained within each school buffer.

  1. Close the attribute table HISDElemSchools_HalfMileBuffer_WithCrimeStats table view.

Since the newly joined buffer layer contains all of the same information as the original buffer layer, plus the new Join_Count and Sum fields, you no longer need the original buffer layer. Since your crime data has now3 been summarized, you no longer need the original crime points either.

...