This post will demonstrate how to use the model builder tool in Arcmap toolbox to create models that will run a simple set of geoprocessing tasks within a Desktop GIS.
The model builder in the simplest form can help to automate a task that a GI User needs to carry out regularly with the same or different datasets. Our demo will create a model that will accept input features and output result showing areas where bus stations/stops can be located.
Our simple model invoves a two stage process
i) Create a buffer around the major and minor roads within the geographical extent. These buffers represent the required offset to the road.
ii) Intersect the major road buffer and the minor road buffer. This should generate areas where the minor and major roads intersect representing where the bus stations/stops can be located.
Download sample data here:https://www.dropbox.com/s/salyxogv94gj7nj/sample.zip?dl=0
1.Start by adding the two layers- major roads and the minor roads to the layer window.
2. On the main menu bar, click on Geoprocessing – ModelBuilder
3. The blank model builder window will open. We have to load our tasks into the model builder window. To add the tools quickly, go to the right hand side and click ‘Search tab’.Input buffer analysis (A) and select Buffer Analysis (B). Remember Buffer is one of the tools we will use for this demo. Drag it onto the modelbuilder window.
4. We now have one of our geoprocessing tools. As we are buffering two layer, the major and minor roads, we will bring in the Buffer Analysis tool twice.
5. Next we search for pick the Intersect Analysis tool and add it to the modelbuilder window. We need this tool to carry out the intersect between the buffers.
6. Drag the tool to the model builder window. See screenshot below.
7. Let us add features and parameters to the analysis tools in the model builder window. Double Click on any the buffer rectangles and a Buffer dialog box will open. Input a feature and for this example, we add major rep the major roads. Fill in other details and click Ok.
8. Double click the second buffer rectangle and do for minor too. Note the linear unit for the buffer should be the same.
9. The color change confirms that the features have been activated by the tools. Note the output features are named buffermajor and bufferminor.shp.
10. We go to the intersect rectangle and double click on it. An Intersect dialog window will open. We list the results of the buffer analysis on the major and minor buffers i.e. bufferminor.shp and buffermajor.shp. Fill the parameters and click OK.
11. In order to display the result of the process as a layer on the map canvas, right click the output circle of the intersect rectangle, scroll down the dropdown list and click- ‘Add To Display’.
12. Now let us test the model. Click on Model – Run
13. Our result is displayed as a layer in the layer window. On the screenshot, the red encircled areas represent the areas left after the intersection. These are regarded as suitable spots to build the bus stations/stops.
We have just used the ModelBuilder to carry out a geoprocessing sequence but this model will only run once and cannot be re-used for a different dataset.
In Part two we will demonstrate building a model with parameters that will run different sets of inputs over and over again.
Thank you for following the blog.