Show Navigation | Hide Navigation
You are here:
Geoprocessing tool reference > Analysis toolbox > Proximity toolset > Tools

Near (Analysis) (ArcInfo only)

Release 9.3
Last modified January 11, 2011
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

NOTE: This topic was updated for 9.3.1.


This determines the distance from each feature in the Input Features to the nearest features in the Near Features within the Search Radius.

Learn more about how Near works.


Illustration


Near illustration

Usage tips

Command line syntax
An overview of the Command Line window
Near_analysis <in_features> <near_features> {search_radius} {NO_LOCATION | LOCATION} {NO_ANGLE | ANGLE}

Parameter Explanation Data Type
<in_features>

The feature class or layer containing features from which distances are calculated to each feature in the Near Features.

Feature Layer
<near_features>

The feature class or layer containing features from which distances are calculated to the closest feature in the Input Features. If multiple feature classes or layers are specified, an extra field named NEAR_FC will be added to the input feature class to identify which near feature class contains the closest feature.

Feature Layer
{search_radius}

The maximum distance between Input Features and Near Features for which distance and FID will be determined. If no Search Radius is specified, all Near Features will be used.

Linear unit
{NO_LOCATION | LOCATION}

Determines whether the x,y coordinates of the nearest feature are added to the Input Features as well as NEAR_FID and NEAR_DIST. The new fields are NEAR_X and NEAR_Y.

  • NO_LOCATION — The x,y coordinates or the nearest point are not saved. This is the default.
  • LOCATION — Additional fields named NEAR_X and NEAR_Y will be added to the result. These fields will contain the x- and y-coordinates of the Near Features.

Boolean
{NO_ANGLE | ANGLE}

Determines whether the angle between the near feature will be calculated and stored in the NEAR_ANGLE field. The angle value is measured in degrees, where one degree represents 1/360 of a circle, and fractions of a degree are represented as decimal points. Angles are measured from 180° to -180° ; 0° to the east, 90° to the north, 180° (-180° ) to the west, and -90° to the south.

  • NO_ANGLE — The angle between the nearest point will not be saved. This is the default.
  • ANGLE — A field named NEAR_ANGLE will be added to the result and will contain the angle from the Input to the nearest point on the Near Feature.

Boolean
Data types for geoprocessing tool parameters


Command line example

Near_analysis D:\Workspace\wells.shp D:\Workspace\seis.shp 25000 LOCATION ANGLE

Scripting syntax
About getting started with writing geoprocessing scripts
Near_analysis (in_features, near_features, search_radius, location, angle)

Parameter Explanation Data Type
in_features (Required)

The feature class or layer containing features from which distances are calculated to each feature in the Near Features.

Feature Layer
near_features (Required)

The feature class or layer containing features from which distances are calculated to the closest feature in the Input Features. If multiple feature classes or layers are specified, an extra field named NEAR_FC will be added to the input feature class to identify which near feature class contains the closest feature.

Feature Layer
search_radius (Optional)

The maximum distance between Input Features and Near Features for which distance and FID will be determined. If no Search Radius is specified, all Near Features will be used.

Linear unit
location (Optional)

Determines whether the x,y coordinates of the nearest feature are added to the Input Features as well as NEAR_FID and NEAR_DIST. The new fields are NEAR_X and NEAR_Y.

  • NO_LOCATION — The x,y coordinates or the nearest point are not saved. This is the default.
  • LOCATION — Additional fields named NEAR_X and NEAR_Y will be added to the result. These fields will contain the x- and y-coordinates of the Near Features.

Boolean
angle (Optional)

Determines whether the angle between the near feature will be calculated and stored in the NEAR_ANGLE field. The angle value is measured in degrees, where one degree represents 1/360 of a circle, and fractions of a degree are represented as decimal points. Angles are measured from 180° to -180° ; 0° to the east, 90° to the north, 180° (-180° ) to the west, and -90° to the south.

  • NO_ANGLE — The angle between the nearest point will not be saved. This is the default.
  • ANGLE — A field named NEAR_ANGLE will be added to the result and will contain the angle from the Input to the nearest point on the Near Feature.

Boolean

Data types for geoprocessing tool parameters


Script example

import arcgisscripting
gp = arcgisscripting.create()

gp.workspace = "D:/Workspace"
gp.toolbox = "analysis"
gp.near("wells.shp", "seismic.shp", "25000", "LOCATION", "ANGLE")

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.