Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a point layer and I want to calculate the distance from each point to a number of line features (rivers, roads etc.). Using the "Near" tool I can do this for one feature at a time (eg rivers) and I get 2 new fields in the attribute table indicating the id of the nearest feature and the distance. Fine. However, trying to find distance to the next features (eg roads) simply overwrites the previous ones (for rivers). The problem is I want to get distances to multiple features and get them all added separately to the attribute table. I tried to change the field name to see if this helped but I can only change the "Alias" so it makes no difference. I am working in Arcmap 10.0. Thanks.

share|improve this question
add comment

2 Answers 2

You are correct, the Near tool only generates the distance to the single nearest feature.

ArcGIS can do this using the Generate Near Table option, also in the Analysis -> Proximity section of the toolbox. More information here: http://resources.esri.com/help/9.3/ArcGISDesktop/dotnet/Gp_ToolRef/analysis_tools/generate_near_table_analysis_.htm - be sure to untick the "Find only closest feature" box.

Once the table has been generated, you can use joins to join it back up to your spatial data.

Note: I believe it may require an ArcInfo level license.

share|improve this answer
add comment

The Near tool overwrites the NEAR_FID and NEAR_DIST fields each time the tool is run. You will need to Add Field using a name that corresponds to each line layer (e.g. distriver, distroad, etc.) that you used Near to calculate the distances for, and then Calculate Field equal to the NEAR_DIST values. Then run the Near tool on the next line layer and repeat until all line layers have distances copied in to unique field names in the attribute table.

An alternative to the Near tool (and useful for anyone without an ArcInfo license) is Spatial Join with the CLOSEST match_option, where you can enter a unique distance_field_name. This results in a redundant output that must be used as the input to the next Spatial Join with another line layer and unique distance_field_name and so on...

With Spatial Analyst, you can create Euclidean Distance rasters to each of the line layers, name the output rasters as distriver, distroad, etc. and then use Extract Multi Values to Points to get the distance values into the point layer attribute table. You will need to decide on appropriate cell size for your distance rasters, but these layers are then available for additional modeling if needed.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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