LSRI on Contours

Topographic Analysis · Topographic Roughness · geoprocessing tool · by Jeff Jenness
Works at every ArcGIS Pro license level

Summary

Computes the Land Surface Ruggedness Index (LSRI) of Beasom, Wiggers and Giardino (1983) from contour lines you already have: the total length of polyline within a circular neighborhood of every cell of a new raster. Sappington et al. (2007) called LSRI the first widely recognized method for quantifying ruggedness among biologists. The input is any polyline feature class, typically elevation contours but also roads, streams or trails, and if the input has a selection only the selected features are measured. You choose the output cell size, the neighborhood radius and the length units. Correct on geographic (latitude/longitude) data, with no Spatial Analyst or 3D Analyst license needed. The companion LSRI on DEM tool traces the contours from a DEM for you and carries the full explanation of the index; this page covers what is different when you start from lines.

Learn more About Topographic Roughness compares all nine roughness tools and explains how to choose among them. These pages follow the Topographic Roughness lecture from my GIS course (slides; see the training page for the course), which covers LSRI and Beasom's dot-grid shortcut.

When to start from lines instead of a DEM

Beasom et al. (1983) worked from printed topographic maps, and the quantity behind their index was the total length of contour line inside a 40-hectare circle; the LSRI on DEM page tells that story and explains why contour length is a sensible measure of ruggedness, how the contour interval scales the values, and how the tool measures length inside a circle exactly. Everything there applies here. The difference is only where the lines come from. There are three good reasons to supply them yourself:

Whatever the lines are, the tool reports the total length inside the circle, in the units you choose. That is the quantity Beasom et al. measured. If you want a density, use Esri's Line Density tool, which reports length per unit area directly and is built for that purpose. (You could also divide this tool's output by the area of the circle, πr², in matching units: a 500 m radius covers 0.785 km², so 3,140 m of line inside the circle would be 4.0 km per km². But that is Line Density's job, and this tool does not call it.)

What the tool does

The tool reads the polylines (only the selected ones, if there is a selection), breaks every line into its straight segments, and creates a new raster of the cell size you choose covering the input's extent, expanded outward by the radius (or, if the Extent geoprocessing environment is set, exactly that extent, with no expansion). The expansion lets cells just outside the data still see the lines that fall within their circles; it is not an edge correction. A cell whose circle reaches beyond the data has less line available to it than an interior cell, so values within one radius of the data's edge, and in the added ring, run low and should be read as edge artifacts. Then, for every cell, it adds up the exact length of line inside the circle of the chosen radius around the cell center, using the same closed-form segment-and-circle clip described on the LSRI on DEM page. To take the same example, a 300 m segment that runs from 100 m west of a cell center to 200 m east of it, passing 100 m to the north, contributes 273.2 m to that cell at a 200 m radius: the part inside the circle, from −100 m to +173.2 m, and not a meter more.

On a geographic (latitude/longitude) feature class, the vertices and cell centers are converted to Earth-centered coordinates in meters on the data's reference spheroid before the clip, so the neighborhood is a true ground circle and the lengths are true ground lengths at any latitude. A ground-unit radius (meters, kilometers, feet, miles) needs no approximation at all; the Cells unit uses one representative ground cell size at the data's central latitude. Projected data are measured directly in their own map units.

Cell size

Because there is no DEM to inherit a grid from, you set the output cell size yourself, in the input's map units. The default is the greater of the input extent's width or height divided by 1,000, which puts about a thousand cells across the longer side of the data: for a feature class 24 km wide and 18 km tall the default is 24 m. That default is meant to give a reasonably detailed raster without an unreasonable run time, and it is only a starting point. A finer cell size gives a smoother, more detailed surface at the cost of proportionally more cells to evaluate (halving the cell size quadruples the count); a coarser one is faster and may be all a habitat model needs. The cell size does not change the values themselves, only where they are sampled, since each value is the length inside a circle of the same radius regardless of the grid.

Radius

As with LSRI on DEM there is no default radius the first time; after that the dialog pre-fills the last run's radius and units, and the units start at Meters. Beasom et al.'s 40 ha circle is about 356.8 m if you want to reproduce their scale. Beasom et al. do not say why they chose 40 hectares; it may have just been a practical size to trace by hand on a printed 7.5-minute map, and a computed neighborhood need not honor it. Choose the scale of your question, try two or three radii, and compare runs only at the same radius and the same contour interval, since both change the magnitude of every value.

A tour of the dialog

The example continues from the LSRI on DEM page: the 10 m contours that tool saved from the Grand Canyon DEM are the input here, and the question is what LSRI looks like when only every fifth contour, the 50 m intervals, are measured.

The Topographic Analysis Tools gallery open on the ribbon, with the LSRI on Contours button, in the Topographic Roughness row, outlined in blue
Where to find it: LSRI on Contours is in the Topographic Roughness row of the Topographic Analysis Tools gallery, in the Topographic Analysis group of the Wildlife and Forestry tab.
The Select By Attributes dialog with Input Rows set to Grand Canyon Contours, 10m Interval, Selection Type New selection, and the SQL expression MOD(Contour, 50) = 0
Selecting the 50 m contours from a 10 m contour feature class with Select By Attributes. The expression MOD(Contour, 50) = 0 keeps every contour whose elevation is a multiple of 50. It is not the only way to make this selection, but it works with the contour feature classes these tools generate, because they write each contour's elevation to a field named Contour at an exact multiple of the interval. (If you contoured from a base other than 0, subtract the base first: MOD(Contour - 5, 50) = 0. Shapefiles do not support MOD; list the elevations with IN instead.)
The LSRI on Contours geoprocessing pane: Input polyline features Grand Canyon Contours, 10m Interval, with Use the selected records: 2,302 switched on; Output LSRI raster LSRI_from_50m_Interval; Cell size 5.56666666000012E-04; Neighborhood radius 500; Neighborhood radius units Meters; Length units Meters
The dialog with that selection in place. Pro notes the 2,302 selected records beneath the input, and only those contours are measured. The radius is 500 m, the same neighborhood used on the LSRI on DEM page, so the two results can be set side by side. The cell size looks odd because the contours are in geographic coordinates (NAD 1983): it is in degrees, filled in as the larger side of the extent divided by 1,000. At the center of this raster 0.000556667° is 50.1 m east to west and 61.8 m north to south, about twice the DEM's cell in each direction.

The dialog asks for the polyline layer or feature class, the output raster name, the cell size (filled in from the extent until you change it), the radius and its units, and the length units of the output values. If the input layer has a selection, Pro notes the number of selected records beneath the input in the tool dialog, and only those features are used.

Two LSRI maps of the same stretch of the Grand Canyon side by side, both with a 500-meter radius and both in a blue-to-red ramp over a hillshade, each with a 1-kilometer circle drawn on the map. Left: from all the 10-meter contours, values 0 to 121,138 meters, in fine cells. Right: from the selected 50-meter contours only, values 0 to 24,195 meters, in visibly larger cells. The two maps show the same pattern. A scale bar runs from 0 to 3 kilometers.
Left: LSRI on DEM's output from all the 10 m contours at a 500 m radius. Right: LSRI on Contours run on the 50 m selection at the same radius. The circle on each map is the 500 m neighborhood at map scale. The two maps show the same pattern, and the values on the right are about a fifth of those on the left (a maximum of 24,195 m against 121,138), as you would expect from keeping one contour in five. You can also see the larger cells on the right, the 50 by 62 m cells set in the dialog above, against the DEM-sized cells on the left. Both layers are partially transparent over a hillshade of the DEM.

The output is a floating-point raster of lengths in the chosen units, 0 where no line falls within the circle and climbing from there without an upper bound. It carries statistics, a histogram and pyramids and draws with the same blue-yellow-red stretch as the other roughness tools. A folder output without an extension becomes a GeoTIFF.

A run stops with an error above 5,000,000 input segments, or 20,000,000 of the pieces they are subdivided into. The piece limit is the one long lines can reach, such as roads or transmission lines with a small radius; the remedies are fewer or simpler lines, a smaller extent, or a larger radius.

ModelBuilder

A ModelBuilder diagram: the layer Grand Canyon Contours, 10m Interval feeding LSRI on Contours, producing LSRI_from_50m_Interval
The contours in; the LSRI raster out. When the input is a layer with a selection, as here, the model measures the selected contours only.

Parameters

LabelExplanationData type
Input polyline featuresRequired · in_polylines The polylines to measure: typically elevation contours, but any polyline data. Projected or geographic. If the input has an active selection, only the selected features are used. Feature Layer
Output LSRI rasterRequired · out_raster The total length of polyline within the neighborhood radius of each cell, in the length units. Floating point. A name is suggested from the input. Raster Dataset
Cell sizeRequired · cell_size The output raster's cell size in the input's map units. Defaults to the greater of the input extent's width or height divided by 1,000. Double
Neighborhood radiusRequired · radius How far the circle extends around each cell, in the radius units. No default: choose the scale that suits your question (Beasom et al.'s 40 ha circle is about 356.8 m). Larger radii give larger values. Double
Neighborhood radius unitsRequired · radius_units Cells (that many output cells, using the cell size above), Meters, Kilometers, Feet or Miles (converted to the input's map units; exact on geographic data). String
Length unitsOptional · length_units The units of the output values: Meters (default), Feet, Kilometers or Miles. String

Python

import arcpy
arcpy.ImportToolbox(r"C:\path\to\JennessEnterprisesTools.pyt")  # your install path
# LSRI from an existing contour feature class, 30 m cells, 500 m neighborhood.
arcpy.jenness.LSRIOnContourPolylines(
    in_polylines=r"C:\Project\Elev.gdb\DEM_Contours",
    out_raster=r"C:\Project\Elev.gdb\Contours_LSRI",
    cell_size=30, radius=500, radius_units="Meters",
    length_units="Meters")
# The same tool on a stream network: total channel length within 1 km of each cell.
arcpy.jenness.LSRIOnContourPolylines(
    in_polylines=r"C:\Project\Hydro.gdb\Streams",
    out_raster=r"C:\Project\Hydro.gdb\Stream_Length_1km",
    cell_size=50, radius=1, radius_units="Kilometers",
    length_units="Kilometers")

Recommended citation

Jenness, J. 2026. LSRI on Contours. Wildlife and Forestry Tools add-in for ArcGIS Pro, v. 1.99 (September 2026). Jenness Enterprises. Available at: https://github.com/JeffJenness/Wildlife_Tools. Method: Beasom, S. L., E. P. Wiggers, and J. R. Giardino. 1983. A technique for assessing land surface ruggedness. Journal of Wildlife Management 47:1163–1166.

Credits and references

By Jeff Jenness, Jenness Enterprises (www.jennessent.com), automating the contour-length measurement of Beasom, Wiggers and Giardino (1983) over a moving neighborhood, from polylines supplied by the user.

Licensing information

Works at every ArcGIS Pro license level (Basic, Standard, Advanced). No extension licenses are required; the lengths are measured internally, without Spatial Analyst or 3D Analyst.