0% found this document useful (0 votes)
23 views10 pages

Lab 4

This document outlines a lab exercise focused on automating spatial analysis using the Model Builder in ArcGIS Pro. It details the steps to create a customized tool for generating Digital Elevation Models (DEM) and Slope from contour lines, along with instructions for preparing data and delivering various outputs. The lab report must include screenshots of the model at different stages and answer specific questions regarding the importance of the Model Builder module.

Uploaded by

Abir Aitt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views10 pages

Lab 4

This document outlines a lab exercise focused on automating spatial analysis using the Model Builder in ArcGIS Pro. It details the steps to create a customized tool for generating Digital Elevation Models (DEM) and Slope from contour lines, along with instructions for preparing data and delivering various outputs. The lab report must include screenshots of the model at different stages and answer specific questions regarding the importance of the Model Builder module.

Uploaded by

Abir Aitt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

ADVANCED GIS AND

ARTIFICIAL INTELLIGENCE

Lab 4: Automation of Spatial Analysis by


Model Builder in ArcGIS

Reda Yaagoubi, Ph.D.


[email protected]

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.

Instruction for the Lab report:


Your report must contain a cover page. It may start with an introduction where you will address
the following questions:
• What is the importance of Model Builder Module provided by ArcGIS Pro?

For each phase, you must answer to the corresponding deliverables.


Submit deadline: After one week.

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.

• Creating a new model:


6- In the Catalog Pane, go to your working Directory, then right-click and click New → Toolbox
and name it DEMandSlopeTool.tbx.
7- Now, right-click on DEMandSlopeTool.tbx and click New → Model.
8 - Right-click on Model and click Edit.
9- In the Geoprocessing Tools, search for Create TIN. Then drag and drop it into your Model.

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:

12- Click OK.


Note: Once you add your data to the Model it becomes colored as follow: The input variables
in Blue Ellipses, the tool in yellow rectangle and the output variable in Green Ellipse.

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.

• Running the created model:


1- Before running your model, right-click on TIN variable, then click the Add To Display. This
option ensures that when the model is run, the output TIN will be added to the display in the Map.
2- Repeat the same operation of the Variable DEM.
3- Repeat the same operation of the Variable SlopePercent.
4- Right-click on an empty space in the Model, then click Run.

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.

5- In the main Ribbon, click Model Builder → Save.


6- In the main Ribbon, click Model Builder → Properties and change then Name to
MyFirstModel. And for the Label, put A model to automatically generate TIN-DEM-SLOPE.
7- Close the Model.
8- Refresh the Catalog Pane.

6
Deliverable 5: Make a screenshot that shows your Model listed under the
DEMandSlopeTool.tbx in the ArcCatalog Tree.

• Customizing your Model:


1- Right-click on your model, the click Open. A Geoprocessing dialog box will be opened for your
Model, but you cannot choose your parameters. The most important reason for creating a model
in Model Builder is that you can run the model with different inputs without having to open
ModelBuilder every time.
To do so, you must follow the following steps:
2- Right-click on your model, the click Edit.
3- Right-click on CourbesdeNiveau and choose Parameter.
4- Do the same process for LimitNappe, TIN, DEM, and SlopePercent.
5- Right-click on Create TIN → Create Variable → From Parameters → Coordinate System.
6- Right-click on TIN to Raster → Create Variable → From Parameters → Sampling
Distance.
7- Right-click on TIN to Raster → Create Variable → From Parameters → Sampling Value.
8- For Coordinate System, Sampling Distance and Sampling Value, define them as parameters
in the model (Right-click → Parameter).
9- In the main Ribbon, click Diagram → Auto layout to automatically restructure your model.
10- Save your model.
11- Close your model.

Deliverable 6:
- Make a screenshot showing your updated Model.

13- Now, Right-click on your model, the click Open.

7
Deliverable 7:
- Make a screenshot showing your Geoprocessing Tool generated from your model.

• Renaming the customized Model:


1- Right-click on CourbesdeNiveau and click Rename.
2- Type Input your Contour Lines and click Ok.
3- Rename the remaining variables follow:
* Coordinate System → Specify your coordinate system
* LimitNappe → Specify the boundaries of your TIN
* TIN → Specify your output TIN
* Sampling Distance → Choose your Sampling Distance
* Sampling Value → Specify your Sampling Value
* DEM → Specify your output DEM
* SlopePercent → Specify your output Slope in Percent Rise
4- In the main Ribbon, click Diagram → Auto layout to automatically restructure your model.
5- Save your model.
6- Close your model.
7- Now, Right-click on your model, the click Open.

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.

11- Run your Model.

Deliverable 10:
- Make a screenshot showing your TIN, DEM and SlopePercent generated from your
model.

PHASE 2: EXERCISE

• Preparing and exploring the data:


1- Close the current Map in your Project.
2- Insert a new Map in your Project.
3- Add Bloc and Roads feature classes that represents the contour lines in the Map.
4- Click on Select by Location under Map in the Main Ribbon.
5- In input Features, choose Roads feature classes.
6- In relationship select Intersect.
7- In selecting Features, choose Bloc.
8- Leave the other parameters as default.
9- Click Run.

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

You might also like