140 likes | 265 Views
WITHOUT LANGUAGE. PROGRAMMING. [ DEVELOPING GEO-PROCESSING MODELS USING ARCGIS MODELBUILDER 10 ]. R. RYAN STEVENS / GIS RESEARCH ANALYST / THE POLIS CENTER @ IUPUI. How ModelBuilder Works [ DEVELOPING GEO-PROCESSING MODELS USING ARCGIS MODELBUILDER 10 ].
E N D
WITHOUT LANGUAGE PROGRAMMING [ DEVELOPING GEO-PROCESSING MODELS USING ARCGIS MODELBUILDER 10 ] R. RYAN STEVENS / GIS RESEARCH ANALYST / THE POLIS CENTER @ IUPUI
How ModelBuilder Works [ DEVELOPING GEO-PROCESSING MODELS USING ARCGIS MODELBUILDER 10 ] Model Builder is an ArcMap extension used to create, edit, and manage models. Models are workflows that string together sequences of geoprocessing tools, feeding the output of one tool into another tool as input. Model Builder can also be thought of as a visual programming language for building workflows. It also provides advanced methods for extending GIS functionality by allowing you to create and share your models as tools. INPUT OUTPUT TOOL Model builder takes an input (shapefile, raster, etc.) and applies a tool creating an output. That output can then be used as in input for another tool FINAL OUTPUT TOOL
Advantages[ DEVELOPING GEO-PROCESSING MODELS USING ARCGIS MODELBUILDER 10 ] • Allows for automation of repetitive and time consuming geoprocessing • Reduces the risk of human error (often unavoidable) and can identify human error in previous geoprocessing • No programming skills are required for basic models • Advanced modeling only requires basic programming skills • Models can be shared through the Arc Toolbox or as a Python Script • A pain-free introduction into the world of “development”
Disadvantages [ DEVELOPING GEO-PROCESSING MODELS USING ARCGIS MODELBUILDER 10 ] • Models developed in ModelBuilder can be “bulky”, whereas a model/tool developed in Python or another language may be more efficient • Models developed in earlier releases of model builder can cause unexpected conflicts in later releases of ArcMap (field calculator issues, for example) • Model Builder is reliant upon ArcMap (no license, no ModelBuilder) • Visual programming and ModelBuilder’s ease-of-use can result in complacency or deter a user from acquiring programming skills • Potential for wasted time developing pointless models
Process Overview [ DEVELOPING GEO-PROCESSING MODELS USING ARCGIS MODELBUILDER 10 ] As a GIS Analyst I use model builder heavily, and in a variety of ways. Primarily, my goal is to reduce the time it takes to complete geoprocessing, while at the same time simplifying the process for other users who may work on the same project. While not all projects are the same, in general, the process involves developing (writing) a workflow and then modeling as much of it as possible. Develop Workflow What Can Be Modeled? Develop Models Modify Workflow The general process used to develop a project workflow that involves the use of models to automate geoprocessing in selected sections or throughout the project
Building a Simple Model [ DEVELOPING GEO-PROCESSING MODELS USING ARCGIS MODELBUILDER 10 ] Before looking at some example models, let’s walk through building a simple model that uses the clip tool to extract a county’s political areas from a state-wide shapefile. Clip StatewidePoliticalAreas CountyBoundary CountyPoliticalBoundary Although this may seem like a simple tool with no time-saving benefits, it is actually a small part of a much more complex tool that converts the county political boundary to a polyline and then applies a number of FEMA required attributes to those lines
BFE Snapper [ DEVELOPING GEO-PROCESSING MODELS USING ARCGIS MODELBUILDER 10 ] BFE (Base Flood Elevation) lines span the floodway and contain an elevation attribute. According to FEMA guidelines they must be snapped to the edge of the 100 year floodplain. This model pulls the 100 year out of the overall floodplain and then snaps the BFE lines to it’s edge utilizing the Snap tool. Make FeatureLayer Floodplain BFE 100-YearFlood Snap Dissolve 100-YearDissolved BFESnapped The process of snapping BFE lines manually takes anywhere from 1-2 hours. Over 92 counties the average would total 138 hours. The model took an hour to build and test.
Advanced Modeling [ DEVELOPING GEO-PROCESSING MODELS USING ARCGIS MODELBUILDER 10 ] Basic modeling in ModelBuilder can result in complex models that can easily be applied to real-world projects. These models can reduce the need for repetitive manual geo-processing and require absolutely no programming knowledge to create. Advanced models allow the user to develop models with features that can’t be replicated with manual geoprocessing. These features can have substantial impact on project labor requirements and, in many cases, only require basic programming knowledge. Tool Tool Input Feature Dataset Variable Variable Output Outputs IterateFeatureClasses
Iteration [ DEVELOPING GEO-PROCESSING MODELS USING ARCGIS MODELBUILDER 10 ] An iterator repeats a process or a set of processes on a set of inputs. It is an extremely easy way to automate huge chunks of manual geo-processing. ModelBuilder can iterate over a variety of inputs including datasets, rasters, folders, tables, etc.. Tool Input Input Input Input Input Output Output Output Output Output Iterator ModelBuilder includes the following iterators: For, While, Feature Selection, Row Selection, Field Values, Multivalue, Datasets, Feature Classes, Files, Rasters, Tables and Workspaces
DEM Clipper [ DEVELOPING GEO-PROCESSING MODELS USING ARCGIS MODELBUILDER 10 ] This model utilizes an iterator to clip a county-wide DEM (raster) to individual tiles. This is a part of a larger model designed to break-down a number of features into more manageable “chunks” based on a tile polygon. Tile DEM(Raster) Split Tiles FeaturesLoaded IterateFeatureClasses ClipRaster ClippedRasters
In-Line Variable Substitution[ DEVELOPING GEO-PROCESSING MODELS USING ARCGIS MODELBUILDER 10 ] In ModelBuilder, contents of a variable can be used as a substitute for another variable by enclosing the substituting variable in percent (%) signs. This allows the user to simplify the building of models and extend functionality. Tool Variable Variable Input Output A basic understanding of in-line variable substitution allow the user to introduce variables into tools and outputs to increase the flexibility of their models
Variable Slope Map [ DEVELOPING GEO-PROCESSING MODELS USING ARCGIS MODELBUILDER 10 ] This is a small part of a much larger model. This extracted section converts a DEM into a slope map, which is fed into the raster calculator to set cells that have a value less than a designated threshold to null using a short python expression. This is an example of how do you in-line variable substitution to extend the functionality of a model. DEM Degree Slope Slope SlopeMap MinimumSlope RasterCalculator This model utilizes in-line variable substitution within a python expression to allow users of the tool to select from a list of degrees of slope without having to edit the model.
Information & Resources [ DEVELOPING GEO-PROCESSING MODELS USING ARCGIS MODELBUILDER 10 ] R. Ryan StevensGIS Research AnalystThe Polis Center @ IUPUIricsteve@iupui.edu Working With Iterators in ModelBuilder – Tutorialshttp://resources.arcgis.com/gallery/file/geoprocessing/details?entryID=1D0B467A-1422-2418-88B2-2F32E993AFE8 ModelBuilder: Advanced Techniques – Branching and Iteratinghttp://video.arcgis.com/watch/2568/modelbuilder-advanced-techniques-branching-and-iterating Geoprocessing With ModelBuilderhttp://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/What_is_ModelBuilder/002w00000001000000/