All posts
tutorial5 min read

Find stream buffer gaps and build a planting list

A step-by-step walkthrough on a Pittsburgh watershed. Choose your data, run the analysis, review the gaps on a map and export a planting list.

Cairn

Trees along a stream shade the water, hold the banks and filter runoff. This tutorial shows how to find where those trees are missing and turn the gaps into a planting list.

We use a real run: the Streets Run-Monongahela River watershed near Pittsburgh, 54 square miles, with public data only. Every number and screenshot below comes from that run.

The review screen. A map shows a stream through back yards with its buffer in red, next to a panel that reads 0% canopy and 3,700 sq ft plantable.

What you need

  • A Cairn project. One run covers up to 250 square miles. If your project area is larger, such as a whole state, you pick the watersheds inside it to check.
  • Nothing else, if you use public data. Cairn reads USGS lidar, USDA aerial photos and USGS stream lines for you.
  • Or your own files: lidar as LAS or LAZ, an orthophoto as a GeoTIFF, and stream lines as GeoJSON, GeoPackage or a zipped shapefile. Each file needs a coordinate system.

1. Choose the analysis

Open your project and choose Run an analysis. Analyses are grouped by what they do; choose Stream buffers under Detection and mapping. Check the areas to include, or choose Pick watersheds on the map and click the ones you want. Watersheds you pick are added to the project, so you can reuse them.

The Stream buffers set-up page with the project's area checked, a button to pick watersheds on the map, and public lidar chosen.

2. Choose your data

Each of the three inputs can be public or yours. You can mix them.

  • Lidar measures height. Public lidar comes from USGS 3DEP surveys; the date depends on where you are. Your own drone or aerial scan works the same way.
  • Imagery tells plants from roofs. Public imagery is NAIP, at about 2 ft pixels with a near-infrared band. Your own orthophoto works best with four bands. With no imagery, anything tall counts as canopy, buildings included.
  • Streams are the lines buffers are measured from. Public lines come from the USGS National Hydrography Dataset. Upload your own if you have surveyed lines or streams the public data misses.

To use your own, pick the "Your" option and drop the files in. They stay with the project, so a later run can reuse them.

The lidar and imagery sections with "Your lidar" and "Your orthophoto" chosen and one uploaded file selected in each.

Choose Run analysis.

3. Watch it run

The run log shows each step as it happens, in plain words. This run took 4 minutes.

The run log with all seven steps done, from Find streams to Save results.

What the steps do:

  1. Find streams. Streams are cut into reaches of about 100 ft. Each bank gets a buffer at 35, 50 and 100 ft. Here: 36 streams, 37.2 miles, 1,967 reaches, each scored on both banks.
  2. Read lidar. Only points near streams are read. Here: 26.2 million points, collected November 2019 to February 2020.
  3. Read imagery. Here: NAIP photos from May 9, 2022.
  4. Map canopy. Height is the top of whatever is there minus the ground under it. Green and at least 10 ft tall is canopy.
  5. Score buffers. Canopy share and plantable area for every bank, plus flags.
  6. Prepare review map. Canopy and photo tiles for the map you review on.
  7. Save results. Files in open formats.

Each step has Show technical details with the exact sources and settings.

4. Read the results

Choose View results.

The top of the results page: canopy in 35 ft buffers 47%, 2,002 gaps of 3,932 bank reaches, 42.3 acres plantable in gaps, and 901 flagged buffers, above the review map.

The numbers across the top are for the buffer width you pick: 35, 50 or 100 ft.

  • Canopy is canopy divided by land in the buffer. Water and cells with no data are left out.
  • Gaps are banks with less than 50% canopy.
  • Plantable in gaps is low vegetation, such as lawn or meadow, inside those gaps.
  • Second look counts buffers Cairn flagged for a person to check.

Under the numbers, one line names the data and its dates. When the lidar and the photo are from different years, Cairn says so. In this run the lidar is from 2019–2020 and the photo from 2022.

On the map:

  • Buffers are colored by canopy: pink under 25%, orange 25–50%, yellow 50–75%, light blue 75% or more.
  • The green overlay is canopy, darker where trees are taller.
  • Near streams you see the exact photo the run used. Switch Run photo, Canopy and Buffers on and off to compare.
  • The white outline is the area you ran. Zoom out to see it, or switch Boundary off to hide it.

5. Review the gaps

Cairn drafts; you decide. The Gaps list starts with the largest plantable area. For each bank you see the canopy share, what covers the rest, and any flags.

Then choose one:

  • Add to planting list (P) for a gap worth planting.
  • Skip (S) for a real gap you won't plant, such as a ball field.
  • Wrong (W) when the detection is off. It leaves the totals.

After each choice the map moves to the next bank. J and K step forward and back, and U undoes a choice. Add a note for anything the next person should know, such as the landowner or access.

The Flagged list holds the buffers to double-check:

  • Close call. Canopy is within 5 points of the 50% line.
  • Tall, not green. A fifth or more is tall but not green: a building, a bridge or bare trees.
  • Thin lidar. Few lidar points, or large patches with none.
  • Mostly water. Half or more of the buffer is water.

6. Export

The planting list below the map updates as you review. Download it as CSV or GeoJSON. Each row has the reach, stream, bank, canopy share, plantable area, your note, who reviewed it and a map coordinate.

The planting list with three banks, 0.25 acres plantable at 35 ft, and CSV and GeoJSON download buttons.

Downloads has everything else: every buffer at every width as GeoPackage, shapefile, GeoParquet and CSV, plus the canopy height and land cover maps as GeoTIFFs and a run details file.

The downloads list: buffers as GeoPackage, shapefile, GeoParquet and CSV, canopy height and land cover as GeoTIFF, and run details as JSON.

What to keep in mind

  • Dates. Results show the ground as of the lidar and photo dates, not today. Check the dates line before you plan around a gap.
  • Stream lines. Buffers are measured from the stream line, not the bank. Wide rivers and lakes aren't scored.
  • Plantable is a starting point. It means low vegetation in the buffer. Ownership, slope and utilities aren't checked.
  • Large areas. Big watersheds are mapped in slightly larger cells. This run used 1.5 m cells.
  • Check a sample. Before you rely on the totals, look at a few buffers you know on the ground.

For the bigger picture of how much water these streams carry and whether that is changing, see the streamflow trend and forecast tutorial.