Wednesday, 15 March 2017

Getting shortest distances between features on separate polygon layers using ArcGIS Desktop?



I have a county-level map for the state of North Carolina, U.S.


I would like to compute the shortest distance of each county to any point along the border of Georgia.


How would this be done?


I have looked all over this site and the internet for suggestions and cannot find much.



Answer



According to the ArcGIS Resource Center:



Both input features and near features can be point, multipoint, line, or polygon.



So you should be able to use the Near Tool for both polygon layers as Rayner suggested but without needing to convert them. The Near tool can be found in the Proximity toolset of the Analysis tools in ArcToolbox.



enter image description here


Just set the Counties layer as the input feature and the Georgia layer as the near feature. The following attributes would then be added to the Counties layer:




  • NEAR_FID—Stores the feature ID of the nearest feature.

  • NEAR_DIST—Stores the distance from the input feature to the nearest feature. The value of this field is in the linear unit of the input's coordinate system.



I take it the NEAR_DIST values are what you need?





Extracting the Georgia boundaries from the states shape file


As for your data, you can extract the Georgia boundary from the states shapefile. Go to your states shapefile's attribute table and select Georgia.


enter image description here


The Georgia state should be highlighted. You can then extract it by right-clicking the states layer name in the table of contents and clicking Data > Export Data. This displays the Export Data dialog box. You can then export just the Georgia boundary by choosing the Selected features option from the dropdown menu.


enter image description here


You can then use the resulting Georgia layer as the Near Feature.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...