Distance Accumulation Tool Bug - not populating all cells

662
3
03-13-2022 05:44 PM
AndyPandy
New Contributor

Has anyone encountered an issue with the Distance Accumulation tool output having some cells null when they should be reachable from the source location?

I have a cost raster that narrows down to 1 or 2 cell wide paths in some places due to natural barriers that are null.  The distance accumulation tool sometimes stops at these narrow areas, leaving me with a gap that prevents the output from being used in downstream optimal path tools.

I'm using Pro 2.9 (also tried 2.8), projection is WGS84 Web Mercator, and tool is doing Geodesic distance.  I'm using snap raster and keeping cell size consistent throughout all the processing, so not sure why this is happening.  

The article "Distance Accumulation Algorithm" says that it should be able to navigate through a diagonal connection with barriers

AndyPandy_1-1647217662323.png

 

Below is a screenshot of what I'm seeing

The pink area is the output from the distance accumulation tool. The feature source for the distance accumulation is off screen to the right of the map.   

The green is the underlying cost distance raster (cost value = 2).  You can see the green because the cost distance did not calculate on those cells. 

The Blue is the destination point I'm trying to connect to from the source in the next step (Optimal Path tool).  However, since the distance accumulation is null for this small section, the Optimal Path tool can't create the line from source to destination.  

AndyPandy_2-1647218391606.png

 

 

0 Kudos
3 Replies
ElizabethGraham
Esri Contributor

Hi Andy,

I am a product engineer on the Spatial Analyst team who works primarily with the Distance tools.  Thank you for bringing this concern to my attention.  Can share your data with me? If so, please email me so I can setup a file share: egraham@esri.com.  I will investigate the behavior you are reporting.

In the meantime, here are a couple suggestions to help you get the result you are expecting. These suggestion require that you modify your Cost Raster.

Suggestion 1

  1. Reduce the Cost Raster cell size by a factor of 3 using Natural Neighbors resampling. Then use the resampled raster as the Cost raster in Distance Accumulation.
  2. If the result still doesn’t include all of your Cost Raster areas in the result, then run Focal Statistics on the resampled dataset to thicken it, then use the result of Focal Statistics in Distance Accumulation as the Cost Raster. (Focal Statistics will essentially do a 1 cell raster buffer.)

Suggestion 2

If you don’t want to change the cell size, you can replace the nodata in the cost raster with a very high cost value.  (This prevents the nodata from being thickened.)

  1. Run Is Null with Cost dataset as input
  2. Run Con
    1. Conditional raster: result from Is Null
    2. True Raster or value: very very large cost
    3. False raster: Friction dataset

Run Distance Accumulation using the Cost Raster with very high Cost values that was just created using Con.

I will continue to look into the issue you reported, but in the meantime I hope one of these suggestions helps you.

Thanks,

Liz

0 Kudos
JerryDavis
New Contributor III

I'm also running to some pretty serious nodata values resulting from using the DistanceAccumulation tool with a cost surface included.  I thought I'd move to this tool because the cost distance tool is being deprecated, but I never saw this happen with that tool. I suspect that it results from categorical data being assigned costs, so there are sharp boundaries; I only say this because by adding slope data to the costs, the effect is minimized. The problem appears to arise from the back direction raster, which BTW won't save into a file geodatabase, but I've instead saved it to a TIFF.

Also, what's a natural neighbor resampling?  The only natural neighbors tool I know is interpolation from points; maybe you meant nearest neighbor?

 

0 Kudos
JerryDavis
New Contributor III

Just figured out the problem: You can't include a zero cost to travel through a cell.  I was allowing factors to range from 0 to 9, and should have made it 1 to 10 -- that fixed the problem. Zeros were creating nodata in back directions.

0 Kudos