Lab 4
Lab 4
ARTIFICIAL INTELLIGENCE
1
Main objective:
In this lab, we will learn how to automate some geoprocessing operations that have been manually
performed in Lab 3 by using the Model Builder Module provided by ArcGIS Pro.
Important Note:
- In this tutorial, many functions have been already seen in the previous Labs. The
corresponding steps will be presented with less details.
2
PHASE 1: CREATING A CUSTOMIZED TOOL IN MODEL BUILDER
In this phase, we will automate the creation of a Digital Elevation Model (DEM) and Slope in
Raster format from contour lines.
First, please copy the lab data in your working directory.
1- Start ArcGIS Pro and click on ‘Start without a template’.
2- Click on Add Folder, and select you working directory.
3- Make your working directory as Default. To do so, right-click on your directory in Catalog and
choose ‘Make Default’.
4- Insert a new map.
5- Add CourbesdeNiveau and LimitNappe feature classes that represents the contour lines in the
Map.
Note: Both the tool and output data are empty (with gray color), it means there is no
parameter defined for this geoprocessing function.
3
10- In your Model, double-click the Create TIN tool to open its tool dialog box. Then fill the
corresponding window as follows:
13- In the main Ribbon, click Model Builder → Auto layout to automatically restructure your
model.
Deliverable 1:
- Make a screenshot showing your Model created in Model Builder.
14- Now, search for the TIN to Raster function and drag and drop it inside your Model.
15- Click on TIN and drag the arrow to the rectangle TIN To raster and choose Input TIN.
This operation means that the TIN will be used as Input for the TIN to Raster function.
16- Double-click on TIN to Raster and fill the dialog box as follows, then click OK.
4
17- In the main Ribbon, click Diagram → Auto layout to automatically restructure your model.
Deliverable 2:
- Make a screenshot showing your updated Model.
18- Now, search for the Slope function and drag and drop it inside your Model.
19- Click on DEM and drag the arrow to the rectangle Slope and choose Input Raster. This
operation means that the DEM will be used as Input for the Slope function.
20- Double-click on TIN to Raster and fill the dialog box as follows, then click OK.
5
21- In the main Ribbon, click Diagram → Auto layout to automatically restructure your model.
Deliverable 3:
- Make a screenshot showing your updated Model.
Important Note: After running the model, the tools (the yellow rectangles) and output
variables (the green ovals) show a drop shadow around them indicating that these tools have
been successfully run.
Deliverable 4:
- Make a screenshot showing the TIN output in the Map.
- Make a screenshot showing the DEM output in the Map.
- Make a screenshot showing the SlopePercent output in the Map.
6
Deliverable 5: Make a screenshot that shows your Model listed under the
DEMandSlopeTool.tbx in the ArcCatalog Tree.
Deliverable 6:
- Make a screenshot showing your updated Model.
7
Deliverable 7:
- Make a screenshot showing your Geoprocessing Tool generated from your model.
Deliverable 8:
- Make a screenshot showing your Geoprocessing Tool generated from your model.
8- Now, Right-click on your model, the click Properties → Parameters → Select row 7 (that
correspond to the variable of Coordinate system)→ Right-click → Move Up. Repeat this
operation to move the variable of Coordinate system to Row 4.
9- Click Ok.
10- Double-click on your model.
8
Deliverable 9:
- Make a screenshot showing your Geoprocessing Tool generated from your model.
Deliverable 10:
- Make a screenshot showing your TIN, DEM and SlopePercent generated from your
model.
PHASE 2: EXERCISE
Deliverable 11:
- Make a screenshot showing the road segments that intersect the parcels.
9
This result shows the segments that intersect the parcels even if it contains some parts that are
outside theses parcels.
We want to automate a Geoprocessing Tool that allows the following:
a- Extracting the parts that are within each parcel (Intersect (Analysis Tools)).
b- Calculating a buffer of 2.5 m around these parts (Intersect (Analysis Tools)).
c- Making a Zonal Statistics as a table to calculate the slope average (based on the Slope
raster Data provided with Lab Data) of Each Buffer Zone that corresponds to road parts (Zonal
Statistics as Table (Spatial Analysis Tools)).
d- Joining the resulting table to the Buffer Zone based on ObjectID (Add Join (Data
Management Tools)).
e- Doing a Spatial Join between the Buffer zone around the parts (that contain information
about the mean slope) and the road parts extracted in (a) (Spatial Join (Analysis Tools)).
Important Note: You can run your model step by step to validate it.
Deliverable 12:
- Make a screenshot showing your model.
Deliverable 13:
- Make a screenshot showing your customized Geoprocessing Tool.
Deliverable 14:
- Make a screenshot showing the attribute table of your road parts with the
corresponding slope average.
10