Select to view content in your preferred language

Summarize cell value following flow direction

1307
6
04-19-2022 08:13 AM
MarcoBelotti
Occasional Contributor

Hi,

I have two raster datasets: the first is a flow direction and the second is a raster of values.

I need to calculate a third raster where each cell value is the sum of all cell values in the second raster obtained following the flow direction (downstream).

I tried to do this using raster cell iterator but it could be very slow with large raster datasets.

Does anyone have a better idea for doing this?

thanks

Marco

6 Replies
MarkBoucher
Honored Contributor

There is the flow accumulation tool, but that doesn't do what you want to do. It just sums up the number of cells the flow to each cell.

0 Kudos
DanPatterson
MVP Esteemed Contributor

off-hand, if you can extract the values along the resultant stream, you could use the down stream origin point as the start of a

Distance Accumulation (Spatial Analyst)—ArcGIS Pro | Documentation

using the extracted values along the stream as the "cost" values, and it should do an accumulation from the origin point.


... sort of retired...
0 Kudos
MarkBoucher
Honored Contributor

Is Raster Cell Iterator only available in Pro?

0 Kudos
XuguangWang
Esri Contributor

Yes, Raster Cell Iterator is an ArcGIS Pro feature only.

Xuguang

0 Kudos
tlopezcantu
Esri Contributor

Hi Marco,

I think it is possible to calculate what you are looking for using Flow Accumulation tool with the raster of values as Input weight raster. 

This optional parameter (Input weight raster) allows you to put a "weight" to each cell so that when they are being processed for accumulation, their value is not 1, but 1 multiplied by the weight. When you use your raster of values, you will be summing the values of the raster following the direction of flow.

What kind of data or variable does your raster of values represent? What kind of problem are you trying to solve? I would love to hear about what you are working on.

Thank you,

Tania Lopez-Cantu
0 Kudos
MarcoBelotti
Occasional Contributor

Hi Tania,

thank you for your suggestions.

Flow Accumulation doesn't fit my needs. 

In my raster, each cell represents the time that the drop of water takes to cross it. I have to calculate, for each cell, the total time obtained by adding the times of each cell from the current to the outlet, following the flow direction.

I drew a figure to explain what I want.

Marco

0 Kudos