Closest Feature Distance

Running programmatically

Calculates the distance for each feature of a dataset to the closest feature from the same dataset (Point, Polyline or Polygon). The function is slow and can hang on large datasets. If the input dataset is a Point one, we recommend using the Find Closest Point function added in version 11.1

Inputs:

Outputs:

Notes:

Running Programmatically

(Go to TOP)

Parameters

Expression Explanation
Function Name ClosestFeatureDistance
<input dataset> A String representing the input layer.
<output dataset> A String - the full name of the output layer
<Search Tolerance> A Double representing the Search Tolerance (in the units of the spatial reference of the input layer)

Running the function

ETGWPath used in the table below is the full path to ETGWRun.exe (E.G. "C:\Program Files\ETSpatial Techniques\ETGeo Wizards\ETGWRun.exe")

Language Syntax
Python subprocess.call([ETGWPath, "ClosestFeatureDistance", "input dataset", "output dataset", "Search Tolerance"])
.NET using ETGWRun.exe StartInfo.FileName = ETGWPath
StartInfo.Arguments = "ClosestFeatureDistance" "input dataset"  "output dataset" "Search Tolerance"
.NET using ETGWOutX.dll ClosestFeatureDistance(input dataset, output dataset, Search Tolerance)
ArcPy arcpy.ClosestFeatureDistance(input dataset, output dataset, "Search Tolerance")

Notes:

(Go to TOP)