180 likes | 207 Views
How to automatise the grid production - using model builder in ArcGIS. Ola Nordbeck Statistics Norway. Objectives. Basics Model benefits Document a model and its components Parameterize the tools Other tips Demo and exercise. Basics.
E N D
How to automatisethe grid production - using model builder in ArcGIS Ola Nordbeck Statistics Norway
Objectives • Basics • Model benefits • Document a model and its components • Parameterize the tools • Other tips • Demo and exercise
Basics • Models are a series of geoprocessing tools that facilitate the automation of complex or repetitive tasks • Model Builder is a graphical interface that allows users to easily create models using existing tools and data • Requires no programming experience
Basics – creating a model Any tool, script or data can be included in the model by dragging and dropping
Basic – Model elements Tools • Drag and drop into window • Use Add button • Data • Drag and drop into window • Drag and drop onto tools • Fill in dialog • In ArcMap, from the TOC • Use Add button
Basics – work flow Derived data from one tool may be used as input to one or more other tools
Basic - Run States Not ready to run – input is set, tool parameters are not Ready to run Already Run (tool and output are shadowed)
Model Benefits • Models provide an easy way to interpret visual representation of the data and workflow • Models can be reused and shared, and are easy to modify if necessary • Models are much more convenient than running many tools individually • Models can be useful in project documentation
Documentation • Documentation for a model can be viewed in the model dialog box, ArcCatalog, or Desktop Help • On the model context menu in ArcCatalog, choose Item Description…, then click the Edit icon to add information • Basic documentation (name, label and description) can also be added on the model properties dialog
Parameters • Any information used by a tool is a parameter • Parameters can be hardcoded or set so a user can enter values • For example, it is often a good idea to set tool inputs as parameters to make models more flexible • It is also useful to make variables for some tool inputs and expose them as parameters for user input (example coming up)
Parameters • All tool parameters can be set using the Open… option on the tool’s context menu
Example Shaded variables have hardcoded values Variables
Model Dialog with no Parameters or Documentation • Some models have no parameters
Example with Parameters Variables with a “P” are now parameters • Variable names are more meaningful
Model Dialog with Parameters and Documentation • Parameters are listed in the order they were added to the model • Order can be changed in the model properties
Tips • Working in the model builder application vs. using the model as a tool • Keep vs. delete intermediate data • Run vs. Run Entire Model • Iteration – added from Insert menu or set in the model properties • Add to Display • Export to script
Demo and exercise Go through the tools used in the exercise: “Production of gridded population statistics”