Spatial Modeling and Analysis in ArcGIS

Report 6 Downloads 46 Views
Spatial Modeling and Analysis in ArcGIS Kevin Armstrong

Agenda





Modelbuilder -

Brief Intro

-

Working with variables

Network Analysis •



Drive Time

Spatial Analyst •

Zonal Tools



Weighted Overlay

Required knowledge for building models?





Know how to use geoprocessing tools -

Complex operations are accomplished by combining simple operations

-

Learn how to combine tools in the correct order

Know how to use ModelBuilder techniques

Making a Model a Tool



Creating model elements for parameters



Setting data type on model elements



Setting filters on model parameters



Setting symbology on model parameters



Using variables for environment setting



Using the feature set data type to make models interactive

Modelbuilder

Buffer and Clip Example



Make the model interactive

Parcel Report Example



Given a parcel id, report all the parcels within 500 feet



Create a model where only the parcel id is entered



Export the list of parcels to an html file

Model Variables

Parcel Report: Create a variable for the parcel id



Create a variable for the parcel id in the model -

Use the “String” data type



Rename the variable to “ParcelID”



Make the variable a model parameter

Parcel Report: in-line variable substitution



Note the single quotes around the variable name -

You have to supply proper quoting in the expression

In-line variable substitution = flexibility



Any string or path parameter can include in-line variables



Use %% to indicate in-line variable



Keywords: Variable Names - Environment setting names - Built in keywords - %n% is the current iteration number - %i% is the current list index - %v% is the current series value -

In-line Variable Substitution Examples



Calculate Value expression – %StartYear% + %n%



Calculate Field expression – !shape.Area! * %conversion_factor% – [airport_id] = “%airport_id%” –



Make sure to include quotes in the expression!

Path to dataset – %scratchworkspace%\out.shp – Directory\out%n%

Parcel Report: Export to Html



Download “Table to Html” tool -



http://resources.esri.com/geoprocessing/index.cfm?fa=code GalleryDetails&scriptID=15712

Also includes “Table to Excel” -

Shows how to call Excel from python.

Use model iteration

Network Analyst

Drive Time Demographics Example



For a location, determine the population within drive time zones

Drive Time

Drive Time Demographics



Use Service Area Network Analysis Layer



Use Add Locations to add the drive time source



Use Solve to compute the drive time zones

Select Data Tool



The Select Data tools is used to expose sub-datasets from the results of tools like Solve, Import from CAD, Split

Select Data Example



Use Select Data to get the “polygons” sub-layer from the Service Area Layer

Model Only Tools



Select Data



Calculate Value



Merge Branch -

These tools are only useful in ModelBuilder

-

The are not needed in scripting

Drive Time Demographics



Use Dissolve with statistics fields to sum the population by drive time zones

Managing model tool parameters



Variable Name = Parameter Label/Name



Variable Data Type = Parameter Data Type



You can change “Optional” to “Required”



You can specify a filter



You can specify output symbology

How to control the parameter filter



Model Properties/Parameters property page



Filter Property -

For the string data type, specify a choice list

-

For the feature class data type, specify the geometry type: Point, Line, Polygon, …

How to control the symbology of the output



Set the symbology property on the output variable

Spatial Analyst

ArcGIS Spatial Analyst



Integrated raster and vector spatial analysis tools



Extension product that adds functionality to ArcGIS Desktop, Engine, and Server

Key Features of Spatial Analyst



Over 170 geoprocessing tools



Analysis on all raster formats



Analysis on all vector formats



Full support of selections



On-the-fly projections



Calculator with Map Algebra syntax



Great developer experience

Spatial Analyst Overview

Density Mapping



Count occurrences of a phenomena within an area and distribute it through the area.



Use points or lines as input. -

Population per Km2

-

Road density per Mi2

Zonal Overlay



A zone is all the areas/cells with the same value



Calculate a statistic within the zones for each cell in a raster



Input zones can be feature or raster



Output as a raster, summary table, or graph -

Max flow length in each watershed

-

Median income in each ZIP CODE

-

Mean elevation per vegetation zone

Zonal Overlay (cont.) Slope Mean Slope per Watershed

Watersheds

Zonal Histogram





Create histograms of cell counts within Zones -

Same zone definitions as Zonal Statistics

-

Zones can also be classes defined in the renderer

Investigate frequency/distribution of one dataset within classes of another dataset •

Slope distribution within Landuse classes



Rainfall distribution within Elevation classes



Crime distribution by beat

Zonal Tools

The Weighted Overlay tool



Assign weights and combine multiple inputs

Weighted Overlay



Perform Weighted Overlay analysis for suitability modeling “where is the best place” -

Weight layers

-

Weight classes

-

Supports NoData and restricted values

-

Easier to use, explain, and modify than using reclass and map algebra

Weighted Overlay