ArcGIS Blog

Analytics

ArcGIS Online

Build and automate raster workflows with ModelBuilder in ArcGIS Online

By Rakibul Ahasan and Sarmistha Chatterjee

Raster analysis has arrived in ModelBuilder in Map Viewer in beta. You can add imagery layers to a model, combine raster analysis tools with the feature tools already available, set analysis environments within the model, and run large jobs in a new raster-optimized analysis session. The ArcGIS blog article Raster Analysis Comes to ModelBuilder in Map Viewer (Beta) introduces these capabilities and explains the licensing, privileges, and credits you need.

The next step is building a raster model of your own. While building a model, configure it upfront by selecting which analysis session to use, what extent and cell size to process, and how to keep outputs aligned to the same analytical grid. This example workflow walks through those decisions step by step, ending with a complete model that maps the investigated riparian health in Verde River near Cottonwood, Arizona.

ModelBuilder workflow that derives stream features from terrain, creates a 10-meter stream buffer, and summarizes NDVI, land cover, and slope within the riparian zone.
A ModelBuilder workflow for assessing riparian conditions using terrain, vegetation, land-cover, and slope data

Raster analysis tools in ModelBuilder in Map Viewer

ModelBuilder currently supports 14 raster analysis tools in beta. Six of these tools support hydrologic analysis, while the others cover zonal summaries, multidimensional analysis, sampling, path analysis, and conversion between raster and feature data. The following table provides a comprehensive list:

Purpose Tools What they do
Hydrology Fill, Flow Direction, Flow Accumulation, Derive Continuous Flow, Derive Stream as Line, Watershed Condition elevation data, model how water moves across a surface, extract streams, and delineate contributing areas
Zonal analysis Zonal Statistics, Zonal Statistics as Table Summarize raster values within zones such as watersheds or counties
Multidimensional analysis Aggregate Multidimensional Raster Combine slices of a multidimensional raster, such as monthly values into annual totals
Sampling Sample Extract cell values at point, line, or polygon locations
Paths and connections Optimal Path as Line, Optimal Region Connections Trace optimal or downslope paths, and connect regions with a least-cost network of lines
Conversion Convert Feature to Raster, Convert Raster to Feature Convert data between feature and raster formats within a model

The conversion tools allow you to combine raster and feature tools within a model. A feature result can become the raster input to the next tool, while a raster result can be converted to polygons or lines for use with feature tools such as Create Buffers, Calculate Field, Filter by Attributes, Join Features, Overlay Layers, and Summarize Within.

Build a model step by step with raster tools

To build a model from scratch, complete the following steps:

  1. In Map Viewer, click Analysis on the Settings toolbar, and click ModelBuilder.
  2. To connect to an analysis session, click Connect for a standard session, or click the down arrow and choose Raster optimized.

The session provides the computing resources for building and running the model.

  1. Click Create model and provide a title, folder, tags, and summary as needed. When you are finished, click Save.

An empty model opens.

  1. Click Add data on the action toolbar, and add layers from the map or browse to them.

Imagery layers and tiled imagery layers are supported as raster inputs. A filter applied to a map layer is honored when the model runs.

  1. Click Add tools, select the tools you need, and click Add.

Each tool displays on the diagram with its output.

  1. To connect the data and tools, drag from the port on the right side of a data element to the port on the left side of a tool, and choose the parameter the data fills.
  2. Double-click a tool to set its parameters.

Outputs are intermediate data by default, which means they are temporary and cannot be viewed on the map. For results you want to keep, choose Create hosted layer in the Result layer group, and click Confirm.

  1. Click Set model environments on the action toolbar.

The next section explains the choices.

  1. Click Run. Review messages on the History tab, click Save, and click Disconnect when you are finished.

Alternatively, if you are opening an existing model, you can browse to it after step 1. In this case, you still must connect it to an appropriate session and make the model active to use it for analysis.

Choose environments for raster analysis

Environment settings determine where a tool runs, at what resolution, using which spatial reference and so on. A model initially uses the environment settings of the web map and stays synchronized with them. When you change a setting in the Model environments window, that setting stops syncing with the web map and is saved with the model. This helps the model produce consistent results when opened from another map. Changing the model environment does not change the web map.

Environment Options to know Why it matters
Output coordinate system Same as input, a chosen coordinate system, or same as a layer Most web maps use Web Mercator, which distorts distance and area. At 40 degrees north, a 10-meter cell covers about 7.7 meters on the ground. Use a projected coordinate system suited to the study area.
Processing extent Full extent, Custom extent, or Layer. Display extent is not supported in ModelBuilder and falls back to Full extent. Full extent can mean the whole world for global layers such as Terrain. Use a custom extent or the extent of a layer.
Cell size Maximum of inputs, Minimum of inputs, As specified, or From layer The coarsest input usually controls the default resolution. If you specify a value, use an output coordinate system with matching units.
Snap raster A layer whose cell alignment the outputs follow This keeps outputs on the same grid. Without it, outputs can be offset by a fraction of a cell.
Mask A raster or feature layer that defines the area of interest Cells outside the mask become NoData. For a feature mask, also set the cell size and snap raster layer.

Extent and cell size together set the size of the job. A 10-meter cell size over a 35-by-22-kilometer extent creates about 8 million cells, which fits a standard session. Over an entire state, the same cell size can create billions of cells and require a raster optimized session.

Model environments pane showing a custom processing extent and raster environment settings for snap raster, cell size, and mask. Cell size is set from the Sentinel-2 10m Land Use/Land Cover Time Series layer.
Model environment settings define the processing extent, cell size, snap raster, and mask used by raster analysis tools.

Workflow: Assess riparian conditions

Riparian corridors provide important ecological connections between rivers and surrounding landscapes, particularly in arid environments such as central Arizona. This example uses a section of the Verde River near Cottonwood, Arizona, to assess vegetation, land cover, and terrain characteristics along the river corridor.

The model first uses the Derive Stream as Line tool to generate stream features from terrain data. The Create Buffers tool then creates a 10-meter buffer around the stream features to define the riparian area for analysis. Within these zones, the Zonal Statistics as Table tool summarizes raster datasets representing NDVI, Sentinel-based land cover, and slope in degrees, providing indicators of vegetation condition, land-cover composition, and terrain characteristics.

The workflow can be extended by joining these statistics back to individual stream segments and combining selected indicators to develop a riparian-condition index. This can help compare conditions along the river corridor and identify locations with healthy vegetation as well as areas that may warrant closer monitoring or further investigation.

Map Viewer showing the Verde River corridor with NDVI imagery and buffered streams, along with a table of zonal statistics summarizing NDVI for the riparian areas.
Final model outputs showing riparian areas along the Verde River and summarized NDVI statistics for the buffered stream zones.

Try it with your data

The same model can be applied to other river corridors by changing the input layers and processing extent, or it can be scaled to a larger study area by switching to a raster-optimized session. It is recommended that you start by creating a model with a sequence of raster tools you already run manually.

Raster analysis in ModelBuilder is in beta. The current tools are a subset, and models that contain raster tools cannot yet be published as web tools. For requirements and credits, see the announcement blog article. To share feedback and questions, join the Early Adopter Community.

Data sources

This workflow uses the following layers from ArcGIS Living Atlas of the World:

Share this article

Leave a Reply