Invert Raster
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.
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.
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 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.
Parameters
| Label | Explanation | Data 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
Credits and references
By Jeff Jenness, Jenness Enterprises (www.jennessent.com), ported from the Land Facet Corridor Designer by Jenness, Brost and Beier.
- Beier, P., D. Majka, and J. Jenness. 2007, revised 2026. Designing wildlife corridors with ArcGIS: ArcGIS Pro edition. Workshop book, revised by J. Jenness for the Corridor Designer Tools of the Wildlife and Forestry Tools add-in. Available at: CorridorDesigner_WorkshopBook_2026_ArcGISPro.pdf (5 MB)
- Jenness, J., B. Brost, and P. Beier. 2013. Land Facet Corridor Designer. Available at: corridordesign.org (archived copy at the Internet Archive)
Licensing information
Works at every ArcGIS Pro license level (Basic, Standard, Advanced). No extension licenses are required.
Related tools and pages
- Land Facet Tutorial — where this tool builds the interspersion-corridor cost surface.
- Diversity Indices — the surface it most often inverts.
- Land Facet Mahalanobis — produces cost surfaces that must not be inverted.