# Euclidean Distance keeps failing

5717
11
07-14-2021 08:31 AM
by
New Contributor II

Hello,

I am having a problem with a dem of a greek island. I want to use the Euclidean distance tool but I get back the same dem without the distance raster. I draw a random line trying to test it, but it keeps failing. Why ?

The only thing I can provide is some details of the raster

Tags (2)
1 Solution

Accepted Solutions
Esri Contributor

Hi,

I'm glad we are getting closer.  It looks like the tool only processed to the extent of your input source, I'm not sure if you set the extent or not?

Here is what I think will work.

For the inputs to Euclidean Distance set the source and the output

The environment settings

1. Extent: DEM (or at least to an extent that covers where you want the result to cover)
2. Cellsize: DEM (unless you want a different cellsize)
3. Snap Raster DEM (so the resulting pixel will line up with the DEM, this often helps if there are more steps to your analysis which uses both the DEM and the result form the distance tool)

*Before you run the tool again you need to make sure that the values in the DEM raster that fall on the ocean are NODATA. (I am adding an image with green scribbles where there needs to be nodata.) How Mask works is that it only processes the area within the mask, meaning it only processes where the mask has values greater than or equal to zero. If you are unsure you can run the Is Null tool with the DEM as input. It will return 0 everywhere that the DEM has values equal to or greater than 0 and will return 1 where there is nodata in the DEM.

If it turns out that your DEM has the value of zero over the water then use the In Null result in Con tool to create a new Mask.  I am including a screen shot of the Con tool if you need to do this step.

Please let me know if you have more questions.

Liz

11 Replies
MVP Frequent Contributor

nothing jumps out at me as wrong with the DEM.  Are you able to share the details of the output file and the values (show both the DEM symbolised on a a map, and the output symbolised on a map. And also screenshot the properties of the euclidean distance tool used.

New Contributor II

Hi Kosta,

I'm not sure I fully understand the problem you are having.  The Euclidean Distance tools calculates the straight-line distance from a source to every location in a study area.  For example, if your line is a river and you want to know how far each location in your study area (Greek Island) is from that river then you would use the river as the input source and the dem to set the Extent environment. (You might also want to set the cellszie parameter and Snap Raster environment to the dem).

The result is a continuous raster and at each location has a value that is the distance back to the river (line).  See attached graphic.

What are you trying to to calculate the distance to?  In other words what is your source?

If the source is the Greek island then you will need to set an extent larger than the island. Maybe you want to calculate the distance to this islands from everywhere else in Greece, in which case you would need to set the extent to be the country boundary of Greece.

Please let me know if this explanation helps.

Liz

by
New Contributor II

Of course. I have done it a lot of times. I don't know what is going on now.  I am putting as input the road network and I am getting back the same dem. I have sent some screenshots of my strange results.

MVP Frequent Contributor

Agree with Dan, probably a projection mismatch, also as another test - set a file extension of .tif on your output raster.

by
New Contributor II

And a screenshot from results

MVP Esteemed Contributor

That leaves "test"

Try converting it to a raster, making sure it is in the same coordinate system as the raster dem.

I just want to make sure that you aren't mixing coordinate systems and line not actually falling on the extent of the dem

Euclidean Distance (Spatial Analyst)—ArcGIS Pro | Documentation

... sort of retired...
Esri Contributor

Hi,

You say you are getting back the same DEM. But, I think the result you are getting back is all NoData. And I think the reason for this is because you are specifying a barrier over your whole study area. The Distance calculation will not process areas that are a barriers.  Barriers should be nodata in the result.

If you want your calculation to process from the line to the coast then the line is your source and the coast is the barrier (not the whole study area).

Instead of using the DEM as a barrier please try using the dem as a mask, in the environment settings. But in order for this to work the pixel values in the DEM surrounding the island need to be nodata not zero.

Liz

MVP Frequent Contributor

Just looked at the parameters, you're right - almost every input looks incorrect. Good spot.

by
New Contributor II

I think that helped a bit. I forwarded some screenshots of my results, which are limited only along the line and not the entire island. What am I missing?

Thank you very much for your help.