modelbuiler: a modern visual scripting environment€¦ · folder, geodatabase, feature dataset, or...

59
Modelbuilder: A Modern Visual Scripting Environment Jeff Pearson- Solution Engineer ([email protected]) Kristen Hocutt- Solution Engineer ([email protected]) Greg Matthews- USGS Esriurl.com/spatialstats

Upload: others

Post on 23-Aug-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Modelbuilder: A Modern Visual Scripting EnvironmentJeff Pearson- Solution Engineer ([email protected])

Kristen Hocutt- Solution Engineer ([email protected])

Greg Matthews- USGS Esriurl.com/spatialstats

Productivity Loading…..0% 100%

90% of the workforce say they are being burdened by boring and repetitive

tasks that could be automated -SnapLogic

Data Search

Data Entry

Data Processing

Data AnalysisData Clean-up

Visual Scripting Environment

Visual ElementsSpatial Arrangements of Text and Graphics

Visual Scripting Environment

Input Tool/Action Output

ModelBuilder

InputGeoprocessing

ToolOutput

Modelbuilder

Communicates information on processes & statusConduct sophisticated data engineering and spatial analysisBuilt with reuse in mind

How many tools does ArcGIS Pro have?

A.) 200-500 B.) 500-800 C.) 800-1000 D.) 1000+A.) 200-500 B.) 500-800 C.) 800-1000 D.) 1000+

Gaining Access to Tools

• Gallery of common tools

• Suite of Geoprocessing Tools

• ArcGIS Online and Enterprise Tools

• Geoprocessing History

• Python Command Line

• Export to Python

• Modelbuilder

• Network Analysis

• Imagery Processing and Raster Functions

• Data Interoperability and workbench

Create a Geoprocessing Workflow

Automate geoprocessing in modelbuilder or a Python script• Drag and drop tools

• To get started, run the tool in Pro, then command and paste script

arcpy.Buffer_analysis(input, output, "10 Miles")

Plan the Workflow

Create the Model Shell

Add Tools and Set Parameters

Validate the Model

Run it Again(optional)

Run the Model

6 Steps to creating a Model

DemoOverview of ModelBuilder

Data Engineering & Visualization

Design & Configuration

Data Visualization

IteratorsOften referred to as looping or batch processing, means to repeat a process over and over with some degree of automation

Iterator DescriptionFor For specific number of times

While Until a particular variable or condition is True or False

Iterate Feature Selection Each feature in a feature class or for a group of features with common attributes.

Iterate Row Selection Iterates through each record in a table or for a group of records with common attributes

Iterate Field Values Each value

Iterate Multi-value Value in a list of input values

Iterate Datasets Dataset in a workspace

Iterate Feature Classes Feature class in a workspace

Iterate Files File in a folder

Iterate Rasters Raster in a workspace

Iterate Tables Table in a workspace

Iterate Workspaces Each workspace, like a geodatabase, in a folder

Raster Location Raster

Output

Iterate Raster

%Name%

Python

Inline Variable SubstitutionThe value or dataset path can be substituted for another variable by enclosing the substituting variable name in percent signs (%VariableName%)

Inline Variable Substitution

• Model Variable Substitution• With Iterators

• User Input to a model

• Use with Calculate Value

• Substituting vales with file extension

• Parse Path

• System Variable substitution

Grouping

Assemble processes in logical units

UtilitiesAdvanced Behavior

Utility Tools DescriptionCalculate Value Returns a value based on a specified Python

expression.

Collect Values Designed to collect output values of an iterator or to convert a list of multivalues into a single input. The output of Collect Values can be used as input to tools like Merge, Append, Mosaic, and Cell Statistics.

Get Field Value Gets the value of the first row of a table for the specified field.

Parse Path Parses the input into its file, path, name, or extension. The output can be used as inline variables in the output name of other tools.

Select Data Selects data in a parent data element, such as a folder, geodatabase, feature dataset, or coverage.

Input Data Set

Output Value

Calculate Values Buffer

Output Value

A BInput

Feature Class

DemoData Engineering and Visualization

AnalysisSpatial AnalysisMachine Learning & AIBig Data Analytics

Branching & Logical ToolsIF some condition is true, THEN perform an action, ELSE a condition is false, perform a different action.

File in

Workspace

If file X exists Add a field

Else if file X does not exists

Copy and then add a field

Feature Class

If has X projection

Do nothing

Else - Project

Logical Tools/Utility DescriptionIf Data Exists Specified Data Exists

If Field Exists Input data has specified fields

If Selection Exists Input data has a selection and if a certain number of records are selected

If Coordinate System Is Input data has a specified coordinate system

If Data Type Is Input data matches certain data type

If Feature Type Is Evaluates if a feature class is the specified feature type

If Field Value Is The values in an attribute field, match a specified value, expression or second field

If Row Count Is If the row count matches a specified value

If Spatial Relationship Is Inputs have a specified spatial relationship

If Value Is Input value to a single value, list of values or a range of values using a comparison operator

Merge Branch Merges two or more logical branches into a single output

Stop Stops iteration if all inputs values meet the specified condition of True or False.

Input Data Set

Raster Output

If Field Value Is

%Name%

SubModelsAdding and Running one Model Tool within another Model

Input Data Set

Output Values

SubModel Merge Output Data Set

Main Model

Input Data Set

Iterate Feature Classes

Output Feature

Class

Name

Collect Values

Output Values

SubModel

SubModels

PreconditionsControl the order of operations between two related but disconnected processes.

WorkspaceOutput

File GDBCreate File

GDB

Create Feature Data Set

Output Feature Data Set

Process One

Input Feature

Clip

Output Feature

Class

Process Two

Clip Feature

DemoAnalysis

Sharing & CollaborationExport as Python

Geoprocessing Tools as a Service

Overview of TrailsUSGS-Greg Matthews National Trails Program

Vision

Connect trails systems to expand recreational

opportunities on the Nation’s public lands

+ 39

2-Year Goals to Support the Vision❖ Goal 1: Create a decision support tool (TRAILS) to

assist land managers in identifying connections between

existing trails and trail systems.

❖ Goal 2: Create a robust national digital trails database.

❖ Goal 3: Develop a mobile responsive editor for

maintaining trails.

TRAILS Decision Support Tool

+ 41

❖ USGS has aggregated 200,754 miles of trails as of 01/05/2020❖ Updated digital trail schema

Goal 2 - NDT Database

Next steps…

❖ Continue review of

state trails (in green)

❖ Continue to build partnerships with

Federal, state, and

other organizations

❖ Continue work with

Federal partners to standardize trail

schema

Model Report

• Shows all tools in a model

• Variables

• Processes

• AutoSync

Export as PythonNEW as of ArcGIS Pro 2.5

Export as SVG and PDF

Schedule a Model

Python Script Model

Create Task

New Action

Task Trigger

Schedule a Model

Schedule a Model

• Geoprocessing→Scheduled section

• New Time-Stamped item will be added below the entry

• Schedule a geoprocessing tool creates a folder with files including a Python script in the user directory. (Extend)

Share as a Web Tool

• Share Tab

• Geoprocessing History

• Python Script

Demo

Sharing & Collaboration

Data Engineering

Visualization & Exploration

Spatial Analysis

Machine Learning & AI

Modeling& Scripting

Big Data Analytics

Sharing & Collaboration

Spatial Analysis and Data Science Framework

Data Clean UpData PreparationData SearchData Entry

Data Engineering

Visualization & Exploration

Spatial Analysis

Machine Learning & AI

Modeling& Scripting

Big Data Analytics

Sharing & Collaboration

Spatial Analysis and Data Science Framework

Weighted OverlaysClusteringRaster AnalyticsGeoAnalytics

Data Engineering

Visualization & Exploration

Spatial Analysis

Machine Learning & AI

Modeling& Scripting

Big Data Analytics

Sharing & Collaboration

Spatial Analysis and Data Science Framework

WebToolsWidgetsWeb Applications

From Means and Medians to Machine

Learning: Spatial Statistics Basics and

Innovations

Modeling Spatial

Relationships: Concepts for

Regression and Classification

Spatial Data

Mining: Cluster Analysis and Space-

Time Analysis

The Forest for the Trees: Making Predictions Using Forest-Based Classification and

Regression

Data Visualization

for Spatial Analysis

Using Geocoding and Geoenrichment to

Spatially Enable your Data for Analysis

From Means and Medians to Machine

Learning: Spatial Statistics Basics and

Innovations

Modeling Spatial

Relationships: Concepts for

Regression and Classification

Spatial Data

Mining: Cluster Analysis and Space-

Time Analysis

The Forest for the Trees: Making Predictions Using Forest-Based Classification and

Regression

Machine Learning

in ArcGIS

ArcGIS Pro:

Analysis and Geoprocessing

Overview

Data Visualization

for Spatial Analysis

ArcGIS Analytics for

IoT: An Introduction

ArcGIS GeoEvent

Server: An Introduction

ArcGIS GeoEvent

Server: Applying Real-Time Analytics

ArcGIS GeoEvent

Server: Visualizing Real-Time Data

Big Data and ArcGIS: An Introduction to ArcGIS

GeoAnalytics Server

Data Science in

ArcGIS Using Python and R

Data Science using

ArcGIS Notebooks

ModelBuilder:

Visual Scripting Environment

Python: An

Introduction

Python: Building

Geoprocessing Tools

Python: Beyond

the Basics

Data Science using

ArcGIS Notebooks

Data Science in

ArcGIS Using Python and R

Analyzing

Multidimensional Scientific Data in

ArcGIS

Kriging: An

Introduction to Concepts and Applications

Classification and Feature Extraction

Network Analyst:

An Introduction

Spatial Data

Mining: Cluster Analysis and Space-

Time Analysis

Python: Building

Geoprocessing Tools

Resources

• Education \ Training• Instructor Lead Training • College Courses• Online

• Books• Learning ArcGIS Pro

• Online Resources• Pro site: Help, Tutorials, Videos• Blogs• Learn ArcGIS Exercises

• Technical Support• Not just for bugs

ArcGIS Pro Educational Resources

Print Your Certificate of Attendance

Print Stations Located in 150 Concourse Lobby

Wednesday10:45 am – 5:15 pmExpoHall B

6:30 pm – 9:30 pmNetworking ReceptionSmithsonian National Museumof Natural History

Download the Esri Events app and find

your event

Select the session you attended

Scroll down to “Survey”Log in to access the

surveyComplete the survey and select “Submit”

Please Share Your Feedback in the App

Questions?