ArcWatch: Your e-Magazine for GIS News, Views, and Insights

August 2008

Outputs Additional Information

Near Tool Now Handles Multiple Feature Types

In ArcGIS Desktop 9.3, the Near tool offers additional proximity analysis for ArcInfo users. More feature types can be used for this analysis and additional results are generated and saved as output.

  click to enlarge
Use the Near tool in the Proximity toolset of the Analysis tools in ArcToolbox (available at the ArcInfo license level) to calculate distances to multiple features of many types. (This map was created for the Esri Mapping Center (http://mappingcenter.esri.com/). Visit this Web site to learn how to make better maps.)
  click to enlarge
Features located outside the search radius specified return a value of -1 for the NEAR_FID, NEAR_DIST, NEAR_X, and NEAR_Y fields and 0 for the NEAR_ANGLE field.

Previously, the Near tool computed the distance from each point in a coverage to the nearest arc, point, or node in another coverage and recorded that distance in the attribute table for the point coverage. The Near tool in ArcGIS 9.3 takes point, polyline, polygon, and multipoint feature types and determines the distances of Input features from features added to the tool as Near features based on the search radius specified.

Two new fields—NEAR_FID (the feature ID of the Near feature found) and NEAR_DIST (the distance between the Input feautures and the Near features)—are added to the attribute table and populated with the results of this analysis. Checking the Location and Angle boxes in the Near tool dialog box saves two additional calculations. The Location parameter creates and populates the NEAR_X and NEAR_Y fields, which contain the x and y coordinates of the Near features. The Angle option creates the NEAR_ANGLE field and stores the angle value from the Input feature to the nearest point on the Near feature. This value is measured in degrees from 180 to -180. When multiple Near features are specified, an additional field, NEAR_FC, is created, which contains the pathname of the layer or feature class used as Near features.

Locate the Near tool in the Proximity toolset of the Analysis tools in ArcToolbox (available at the ArcInfo license level). The accompanying illustrations show the Near tool used to generate distances from the San Diego Convention Center (where the Esri International User Conference was held August 4-8, 2008) to restaurants that are located within a half mile. After opening the Near tool, the Restaurants layer was added as the Input feature, the San Diego Convention Center layer was added as the Near feature, and the Location and Angle boxes were checked. Both layers were feature classes, but shapefiles also could have been used. The House of Blues restaurant was located outside the search radius of 2,500 feet so the analysis returned a value of -1 for the NEAR_FID, NEAR_DIST, NEAR_X, and NEAR_Y fields and 0 for the NEAR_ANGLE field. If the Input features layer contained selected features, the Near tool would have used only the selected features and set nonselected features to -1.

The three diagrams below show how the Near tool calculates the distances from an Input feature to a Near feature when that feature is a point, line, or polygon. If Near features are polylines, the location on the polyline closest to the Input feature will be used. If the Near feature is a polygon (as shown in this example), the distance is calculated from the point on the polygon boundary that is closest to the Input feature. In either case, if the Near feature polyline or polygon touches or intersects a feature from the Input features, the distance will be zero. If no search radius is specified, the radius will be set large enough to calculate a distance to each Input feature.


Diagrams show how the Near tool calculates the distances from an Input feature to a Near feature when that feature is a point, line, or polygon.

Contact Us | Privacy | Legal | Site Map