# NSink Rasterific

author: Jeff Hollister
date: 11/14/13

Based on my understanding of the current NSink tool, the information we would like out of it is the following:

- Total potential reduction percentage map. This would indicate the perecntage delivery for each cell on the landscape. Formerly known as the “heat map” and now the “delivery map”
- Flow path from a given location
- Landcover along the flowpath
- Static map of important locations for reductions. This is a combination of both upstream accumulation (i.e. which cells occur in many flow paths) and the reduction potential of a given cell (i.e. wetland cells important, urban cells are not). Cells with both are very important for reduction. Cells with lot of accumulation but little reduction potential are sites for possible resoration

## Total Potential Reduction Map: The Delivery Map

Weighted FlowLength - FlowLength should be close. Just need to figure out how the weighting works.

## Flow path from a given location

Cost Path: Inputs are grid with source and destination. Plus a backlink grid. The backlink grid is simply flow direction from the elevation. Cost surface is a constant. I used the “Best_Single” path type. It should work (haven't tested this) for multiple end points (i.e as in coastal watersheds) and would pick the shortest one.

Only two geoprocessing services required. One, get the starting point and two, calculate the flow path with Cost Path.

So, for instance:

Here's an image of starting elevation:

Next a possible starting point on the landscape:

And the resulting flow path from that point:

A second starting point:

And a second flow path:

## Landcover along the flowpath

Take flow path, calculate Euclidean distance from that flow path, select cells greater than buffer distance and turn to NA. Mask out landcover. Count cells of each class, multiply by 900.

## Static Map of important locations for reductions (aka: The Walter)

Need to think more about this, but it is some combination of Flow Accumulation and sinks.