Dark theme

Build the model


Having got "Hello World" working, we'll now add some functionality.


First off, download this set of Shapefiles (properly georeferenced with any luck!). Unzip them to m:/GEOG5790M/practical4/albertsquare (not m:/GEOG5790M/practical4/albertsquare/albertsquare) and stick them in a map. Save the map to m:/GEOG5790M/practical4. Note that there is also a layer file in with the shapefiles: don't worry about that for the moment; we'll come back to it.


Now, in Arc, open up last practical's toolbox and build the following model in modelbuilder. Call it "TraffordModel", as that's what it is known as by the Manchester police.

Screenshot: model

Use the search window to find Spatial Join if need be.

Double-click on the Spatial Join box, and make sure its Join Operation is set to JOIN_ONE_TO_ONE.

The model will be used to buffer around our houses, and then join the buffers with each house to make a new layer of houses. Most notably, there will be one house in the new layer produced for each house in the original dataset, and each house will have a Join_Count column value that tells us how many buffers it joined with. Run through the model once by hand. You'll need the Burglaries layer as the Input Features, 80 as the distance, and Buildings as the Target Features. Pay close attention to the values in the model inputs (are they a whole filepath, or just a name?) and their order in the model version.


Once you've got that working, go on to Part Three where we'll build this into our addin.


  1. Build the toolbar
  2. This page
  3. Get the model working <-- next
  4. Sort the table
  5. Display the data