Connect To Closest Point

Running programmatically

Creates an output polyline layer with single segmented polylines that connect each point of the input Point layer to it's closest neighbor. The function uses a robust algorithm and can be applied on datasets containing up to 2 million points.





Result Dataset - Add Duplicate Links option NOT selected


Result Dataset - Add Duplicate Links option NOT selected


Running Programmatically

(Go to TOP)


Expression Explanation
Function Name ConnectToClosestPoint
<input dataset> A String representing the input layer. Must be of Point type.
<output dataset> A String - the full name of the output layer.
<CutOff Distance> A Double representing the CutOff Distance( in the units of the spatial reference of the input dataset).
{Add Duplicates} A Boolean indicating whether duplicate links will be added to the result.

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[ETGWPath, "ConnectToClosestPoint", "input dataset", "output dataset", "CutOff Distance", "Add Duplicates"])
.NET using ETGWRun.exe StartInfo.FileName = ETGWPath
StartInfo.Arguments = "ConnectToClosestPoint" "input dataset" "output dataset" "CutOff Distance" "Add Duplicates"
.NET using ETGWOutX.dll ConnectToClosestPoint(input dataset, output dataset, CutOff Distance, Add Duplicates)
ArcPy arcpy.ConnectToClosestPoint(input dataset, output dataset, "CutOff Distance", "Add Duplicates")


(Go to TOP)