Invert Raster

Corridor Designer Tools · Ancillary Corridor Tools · geoprocessing tool · by Jeff Jenness
Works at every ArcGIS Pro license level

Summary

Turns a raster upside down, so that a surface where high values mean good (a habitat suitability model, a diversity index, a Land Facet Density raster) becomes a least-cost surface where that good ground is cheap to cross. Least-cost tools read their input the opposite way from how habitat surfaces are made: low cells are easy, high cells are barriers. This tool bridges the two, and it offers two methods for doing so. The Reciprocal method, the default, makes each output cell 1 / (x + c), and suits proportion and index surfaces such as density and diversity. The Linear method makes each output cell 100 − x, and suits a 0–100 habitat suitability model. The two encode different assumptions about how strongly a species avoids poor ground, and the sections below take each in turn. A modernized port of the Land Facet Corridor Designer's Invert Raster tool; no Spatial Analyst needed.

Learn more About Corridor Design covers cost and suitability as two sides of the same coin, which is the conversion this tool makes explicit. Step 7 of the Corridor Design Tutorial inverts the black bear model, and Step 5 of the Land Facet Tutorial inverts the diversity surface, with the tutorial data (41 MB) available to download so you can follow along.

The reciprocal method: 1 / (x + c)

The reciprocal is the natural inversion for a surface of proportions or index values, where the useful range starts at zero and has no fixed top: a facet density from 0 to 1, a Shannon diversity from 0 to a few units. It punishes poor ground hard, since a cell near zero becomes a very large cost, and that is usually the right behavior for such surfaces, which is why the Land Facet method uses it. The one complication is the zero itself.

Dividing by a cell whose value is exactly zero is undefined, and such cells would become NoData holes that least-cost analysis treats as impassable. Adding a small constant to every cell before inverting removes the problem; the Land Facet manual strongly recommends it and suggests 0.1 — which makes the diversity resistance formula exactly 1 / (H′ + 0.1), as published, and is the default here. The constant also caps the cost range: with c = 0.1, the worst cell (value 0) costs 10 and a perfect density cell (proportion 1.0) costs about 0.91 — an 11-to-1 range. Clear the constant only for a deliberate reason; the tool warns, and zero cells then become NoData.

The linear method: 100 − x

The Linear: 100 − x method is the inversion for a 0–100 habitat suitability model: a suitability of 100 becomes a cost of 0, bumped to 1 so that travel is never free, and a suitability of 0 becomes a cost of 100. It is the same conversion the original CorridorDesigner applied inside its corridor tool, so a corridor built in Pro from a given model is comparable with one built in ArcMap from the same model. The two methods encode different ecological assumptions, and their corridors can take visibly different routes: under the linear rule, near-worthless habitat (suitability 1) costs about ten times what excellent habitat (suitability 90) costs; under the reciprocal with c = 0.1 it costs about eighty times as much. Reciprocal-based corridors avoid bad ground at almost any price; linear-based corridors will shortcut through it when the detour is long. Neither is wrong — pick the assumption that matches how strongly your species avoids poor habitat. The linear method expects a genuine 0–100 surface (the tool warns if values exceed 100 or never exceed 1); for density, diversity, and other proportion or index surfaces, use the reciprocal.

The dialog follows the input's shape

A single-band input (a Diversity Indices surface, say) asks for a plain output raster name. A multi-band input — this suite's own Land Facet Density raster — instead asks for an output workspace and a name prefix, then writes one single-band cost raster per facet in a single run, each named from the facet recorded in the density raster's metadata (“Inv_Valley_Cluster_2”), with the stored integer scaling converted back to 0–1 proportions first. A multi-band inverted raster is never produced, because the least-cost tools these surfaces feed expect a single band. Every output records its place in the Land Facet analysis chain.

Which surfaces need inverting? Only the high-is-good ones: diversity indices, density rasters, habitat suitability models. A Land Facet Mahalanobis D² or D surface is already a valid cost surface (low = most similar = cheapest) and must never be run through this tool — inverting it would make the best ground the most expensive.

A tour of the dialog

The example is Step 5 of the Land Facet Tutorial: the Shannon diversity of eighteen land facets inverted into the cost surface for the interspersion corridor.

The Corridor Designer Tools gallery open on the ribbon, with the Invert Raster button, in the Ancillary Corridor Tools row, outlined in blue
Where to find it: Invert Raster is in the Ancillary Corridor Tools row of the Corridor Designer Tools gallery, in the Corridor Designer Tools group of the Wildlife and Forestry tab.
The Invert Raster geoprocessing pane: input raster Facet_Diversity, output inverted raster Inv_Facet_Diversity, inversion method Reciprocal 1 divided by x plus c, constant added before inverting 0.1
A single-band input gives the simple form of the dialog: the raster, an output name, the method and the constant. Reciprocal with c = 0.1 is the published 1/(H′ + 0.1).
The inverted diversity surface as a cost raster, blue at 0.4 through yellow to red at 10: blue over the dissected hills and mountain fronts, red along the flat floor of the Santa Cruz valley, and in scattered patches of uniform ground, with a gray NoData hole at the high Santa Rita summit and the wildland blocks outlined in yellow
The result, drawn as a cost surface: 0.4 where diversity is highest, 10 where a window holds a single facet. Compare it with the diversity map on the Diversity Indices page: the dark green ground has become blue and cheap, and the white ground of the Santa Cruz valley floor red and dear. The constant is what keeps those uniform windows at 10 rather than at infinity. The NoData hole at the summit stays NoData, which a least-cost corridor treats as impassable.

The tool holds the whole raster in memory at once, so the memory it needs grows with the number of cells. On most rasters that is no concern. On a very large one the tool may need more memory than your computer has free, and then one of two things happens: Windows starts using the disk as overflow memory and the tool slows to a crawl, or the tool stops with an out-of-memory error. There is no fixed limit; it depends on how much memory your computer has free. If a raster is too large, clip it to the area you need first.

ModelBuilder

The classic chain: Diversity Indices → Invert Raster → least-cost corridor modeling for the facet-interspersion strand. The single-band output (or each per-facet output) chains onward as an ordinary raster.

A ModelBuilder diagram: Facet_Diversity feeding Invert Raster, producing Inv_Facet_Diversity
The diversity surface in; the cost surface out, ready for Identify Termini Polygons and Least-Cost Corridor.

Parameters

LabelExplanationData type
Input raster (high values = good)Required · in_raster The surface to invert — single-band, or a multi-band Land Facet Density raster. Raster Layer
Output inverted rasterOptional · out_raster The output for a single-band input. Raster Dataset
Output workspaceOptional · out_workspace Where the per-facet outputs go for a multi-band input. Workspace
Output name prefixOptional · out_prefix Prefix for the per-facet output names (multi-band input). String
Inversion methodRequired · method Reciprocal 1/(x + c), or Linear 100 − x for ArcMap CorridorModel compatibility. String
Constant added before invertingOptional · add_constant Default 0.1; prevents zero cells from dividing to NoData. Disabled for the linear method. Double
Facets / bands to invertOptional · facets For a multi-band input: which facets to process (default all). Multiple Value

Python

import arcpy
arcpy.ImportToolbox(r"C:\path\to\JennessEnterprisesTools.pyt")  # your install path
arcpy.jenness.InvertRaster(
    in_raster=r"D:\corridor\lf.gdb\Facet_Diversity",
    out_raster=r"D:\corridor\lf.gdb\Diversity_Cost",
    method="Reciprocal: 1/(x + c)",
    add_constant=0.1)

Recommended citation

Jenness, J., B. Brost and P. Beier. 2026. Invert Raster. Wildlife and Forestry Tools add-in for ArcGIS Pro, v. 1.99 (September 2026). Jenness Enterprises. Available at: https://github.com/JeffJenness/Wildlife_Tools.

Credits and references

By Jeff Jenness, Jenness Enterprises (www.jennessent.com), ported from the Land Facet Corridor Designer by Jenness, Brost and Beier.

Licensing information

Works at every ArcGIS Pro license level (Basic, Standard, Advanced). No extension licenses are required.