Do you use Spatial Analyst extension for performing raster analysis? With the release of ArcGIS Pro 2.5, we have made significant changes in the areas of distance analysis, multidimensional raster analysis, and zonal analysis. There is also whole host of improvements across many other areas. If you are comfortable in ArcPy, there is an exciting new way to perform custom raster analysis. Also in ArcPy, many new functions are available for analyzing, visualizing, and managing raster data using Python.
We will have many more blog posts coming that go into much more detail on some of these changes, and they will be linked to below.
Where do I get it?
ArcGIS Pro 2.5 was released of in February 6 of this year.
For a quick summary of all the changes that have been made for these releases, have a look at the What's New topic (and video!) here:
ArcMap Desktop 10.8 and ArcGIS Enterprise 10.8 will be released very soon. Watch this space, or your usual channels, for more details once they become available.
What's changed for Spatial Analyst?
Here are the main categories of the changes.
- Distortion free distance analysis
- Multidimensional raster analysis
- Multiband raster analysis
- Zonal analysis
- General tool and function enhancements
- Iterating over raster cells using ArcPy
- Modifying raster cell values using ArcPy
- Enhanced multidimensional raster processing with ArcPy
- Additional raster functions available in ArcPy
1. Distortion Free Distance Analysis
With ArcGIS Pro 2.5, Spatial Analyst sees a significant change in distance analysis capabilities. First and foremost, a new algorithm for cost-based distance analysis provides more accurate and precise results than before. By avoiding the distortion in output that was caused by the previously-used network model of cell connectivity, several benefits are achieved:
- Cost accumulation is measured the same way in all directions. An important special case is that cost distance with a constant cost surface now produces the same output as Euclidean distance mapping.
- Surface distance over a digital elevation model is computed much more accurately.
- Paths around barriers are followed more accurately.
- Cost distance accumulation and allocation analysis have the option to perform the analysis using either a planar or a geodesic method.
As part of making this improved capability available, the distance toolset has been reorganized into fewer but more capable tools. The Corridor tool is carried over as-is. The new tools are:
- Distance Accumulation
- Distance Allocation
- Optimal Path As Line
- Optimal Path As Raster
- Optimal Region Connections
Rest assured, all the tools that existed in the previous release are still available; they have simply been moved into a new sub-toolset. We have a help topic that well covers the migration from legacy to distortion free distance tools.
To complement the new GP tools, two new raster functions are available in the Distance group:
Updates have been made to the following existing raster functions:
- The Least Cost Path function has been updated to use the Distance Accumulation tool to perform distortion-free distance analysis.
- The Cost Path function has been updated with a new parameter that allows you to determine a hydrological flow path.
In ArcMap 10.8, the Distance toolset remains basically the same as before. The only exception is that the Cost Path and Cost Path As Polyline tools have been updated with a new parameter which provides the option to make those tools treat the input backlink raster as a flow direction raster instead.
2. Multidimensional Raster Analysis
As part of the increased focus on multidimensional analysis in the ArcGIS platform, a number of tools in various toolsets have been updated to directly support multidimensional raster data. There is also a new pathway for accessing multidimensional analytical tools directly from the ArcGIS Pro interface.
In the Multidimensional Analysis toolset, the following tools have improvements:
- The Aggregate Multidimensional Raster tool supports additional predefined interval options for aggregation.
- The Generate Multidimensional Anomaly tool has four new options for the Anomaly Calculation Method parameter.
In the Extraction toolset, the Sample tool has several new parameters to process multidimensional data. When processing this type of data, the tool has options to specify the following:
- The output table layout, either as rows or columns
- The time, depth, or other acquisition information associated with the location features to extract information for a given time or calculate statistics within a period of the observation time
- Lines and polygons as the input location, in addition to points and rasters
- The Parallel Processing Factor environment
In the Zonal toolset, the Zonal Statistics tool, the Zonal Statistics as Table tool, and the Zonal Statistics raster function now have the Process as multidimensional parameter available, which allows you to calculate various statistics on each slice of a multidimensional value raster.
In ArcGIS Pro, for the Raster Layer tab, the new Multidimensional tab is enabled when a multidimensional raster layer or a multidimensional mosaic layer is selected in the Contents pane. It provides tools and functionality for working with multidimensional raster data.
3. Multiband Raster Analysis
Not to be confused with multidimensional rasters, multiband rasters are raster datasets that are composed of two or more raster bands, or layers, where each band is a measure of a single characteristic. The following tools have changes pertaining to how multiband raster data is handled.
- The Aggregate Multidimensional Raster tool can now do band-wise aggregation for multiband multidimensional input.
- The Pick and Cell Statistics tools have a new parameter that allows you more control over how multiband input rasters are processed.
- The Cell Statistics raster function can calculate single-band or multiband output based on the multiband processing type.
4. Zonal Analysis
In response to an often-requested capability, the Zonal Statistics as Table tool now processes overlapping polygon zones. The statistics for each zone are calculates separately.
5. General tool and function enhancements
In addition to the changes described above, some new other new tools and tool enhancements are available.
- In the Raster segmentation and classification toolset, a new tool, Linear Spectral Unmixing, has been added to perform subpixel classification and calculate the fractional abundance of different land cover types for individual cells. The Export Training Data For Deep Learning tool has four new parameters.
- For generalizing rasters, the Aggregate tool now supports the Parallel Processing Factor environment. The Median option for the Aggregation technique now only produces a float output raster, regardless of the input type. The new Aggregate raster function dynamically generalizes a raster in the display at a reduced resolution. When the output from the function is persisted, it will be generated at the full resolution.
- A new Random raster function is available for creating a dynamic raster on the fly with random cell values.
6. Iterating over raster cells using ArcPy
With ArcGIS Pro 2.5, a powerful new capability to perform custom raster analysis is available to you in ArcPy. Two classes are introduced that allow you iterate over rasters programmatically.
The RasterCellIterator class in the Spatial Analyst module allows you to visit each cell location in a raster. The iterator makes it easy to inspect cell values at each location, as well as neighboring locations. While iterating over a raster, you can read and write cell values.
The RasterInfo class in the ArcPy classes describes a set of raster properties that facilitate the creation of a new raster dataset using the Raster object. This class has several methods and properties available.
7. Modifying raster cell values using ArcPy
The Raster object now allows you to read cell values using a [row, column] index notation (also known as neighborhood notation). In addition to reading values, you can also assign a new value to a particular raster cell, thereby modifying the Raster object. Once the values of raster cells have been modified through an assignment, you can persist these changes by calling the save() method on the Raster object.
8. Enhanced multidimensional raster processing using ArcPy
The Raster object has more capabilities for processing multidimensional rasters. The additional properties and methods are:
- Properties—bandNames, blockSize, noDataValues, properties, and readOnly
- Methods—addDimension, exportImage, getProperty, getRasterBands, getRasterInfo, read, removeVariables, renameVariable, setProperty, and write
9. Additional raster functions available in ArcPy
In the Spatial Analyst module, many new ArcPy functions are available for analyzing, visualizing, and managing raster data using Python. To keep things organized, they are grouped into functional categories, which you can see from Overview page.
Do you have our Spatial Analyst resources blog post bookmarked?
Not only does it include a list of links to informative content, we also work to keep it updated as new resources become available. For example, here is some of the material that was recently added:
- Doing more with Euclidean Distance: Barriers and Paths blog post
- Creating accumulative cost surfaces using directional data blog post
That about covers what's changed since the last release. Once you've downloaded and installed the latest versions of the software, give it a try. We hope you will enjoy the improvements and enhancements.