I have a river water lines shapefile. I have a small clipped raster of ~7000 pixels of a place in India. I want the distance from each pixel of the raster to the nearest river line.

I am new to ArcGIS. I read something about Euclidean distance tool but am uncertain how to get the distance in an Excel sheet.

  • 1
    It does indeed seem like the Euclidean distance tool is what you are looking for. You need to be more specific about what your desired output is, since "get the distance in excel sheet" is not very clear. – Jacob F Jul 5 '18 at 19:01
  • Thanks @JacobF for the response. I need distance in meters in a table so that i export it to an excel sheet. Like distance from each pixel point to the nearest river/road/railway lines etc. How to go about this Euclidean distance tool as I have a river (shapefile) and my area of interest( a raster file) but the tool requires only one input feature. Kindly guide me – user123098 Jul 5 '18 at 19:20
  • Don't forget to take the Tour to learn about our focussed Q&A format. Please use the edit button beneath your question to provide any requested clarifications. – PolyGeo Jul 5 '18 at 21:56

As mentioned by @Jacob F in the comments. A good starting point would be the Euclidean Distance Tool.

Basically what you would need to do is use the Rivers as the input dataset. This will then create a raster output where each cell (pixel) represents the distance it is from the river / rail or whatever feature you have decided to use. This distance is to the closest part of the input layer.

To get this into a table, I would suggest converting your clipped raster (your study area) into a point shapefile. The Raster to Point Tool, located in the Conversion Toolbox will accomplish this. Taken directly from help:

For each cell of the input raster dataset, a point will be created in the output feature class. The points will be positioned at the centers of cells that they represent. The NoData cells will not be transformed into points.

You can then use the "Extract Values to Points" Tool located in the Extraction Toolbox of Spatial Analyst, to extract the "Distance" values from the Euclidean Raster created from the Rivers. Your output will be a new Shapefile containing the points from your study area raster and an attribute table with the distance each point (cell) is from the river. You can then export this attribute table to *.dbf / *.txt for consumption in Excel or another spreadsheet type software package.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.