I'm going to measure the distance between a given image pixel and a series of neighboring polylines, consisting of 15 different types of roads. In other words, I'm looking for a solution with which I can measure the distance of the pixel from all the 15 types of roads, not only the nearest one.

How can I do it in ArcGIS?

  • You can't do this directly from a raster, you will need to export your raster to points then separate the roads by their type to individual feature classes then using Generate Near Table create a table for each of the road types, add fields for the closest by type, join by attributes to each near table and Field Calculate the distances. This requires an advanced license. If your count of points is small enough you can perform a point to raster (use FID/OBJECTID) and join the feature class distance table to the raster attribute table. – Michael Stimson Jun 27 '18 at 7:09
  • Thank you @MichaelStimson for your help. I'll test it to see if it works for me. – Federico Jun 27 '18 at 7:21
  • Don't forget to take the Tour to learn about our focussed Q&A format. Please decide which of the GIS products mentioned you want to ask about. By asking about more than one you are effectively asking multiple questions which goes against the Tour. You should then describe not just what you want to do, but precisely what you have tried and where you are stuck trying that. – PolyGeo Jun 27 '18 at 7:44
  • @PolyGeo I revised the question to make it more specific. Thank you. – Federico Jun 27 '18 at 8:27
  • I've removed the ArcPy tag because you have presented no code. You have a spatial-analyst tag but are you using the ArcGIS Spatial Analyst to try to do this? – PolyGeo Jun 27 '18 at 8:40

Your Answer

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

Browse other questions tagged or ask your own question.