Go to ET GeoWizards 12.x User Guide

Connect To Closest Point

Go to ToolBox Implementation

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

Inputs:

• A Point feature layer
• Cutoff distance - the maximum distance to search for neighbor points.

Outputs:

• A new  Polyline feature class. The attribute table of the resulting feature class will have three new fields
• [ET_From] - the ID of the FROM point
• [ET_To] - the ID of the TO point
• [ET_Dist] - the distance from the point to the closest point

Notes:

• If the distance from a point to the closest point is larger than the Cutoff distance then no link will be created between the two points
• If there are coincident points in the input dataset, the duplicates will be ignored.
• The direction of the resulting polyline is always from the evaluated point to the closest point found.
• If there are 2 points "A" and "B" where point "B" is the closest neighbor of point "A" and point "A" is the closest neighbor of point "B"
• If the Add Duplicate Links option is selected, the resulting feature class will have 2 duplicate links - one from "A" to "B and one from "B" to "A"
• If the Add Duplicate Links option is NOT selected, then only one of the two links will be stored in the output.

Examples:

 Result Dataset  - Add Duplicate Links option NOT selected The closest point to point 8 is point 10. The closest point to point 10 is point 8 Only one link is added - from point 8 to point 10 Result Dataset  - Add Duplicate Links option selected The closest point to point 8 is point 10. The closest point to point 10 is point 8 Two coincident links are added from point 8 to point 10 from point 10 to point 8

Command line syntax

Parameters

Expression Explanation
<input_dataset> A Point,  Polyline or Polygon feature class or feature layer
<out_feature class> A String - the full name of the output feature class (A feature class with the same full name should not exist)
<cut_off> A Double representing the maximum distance between two points to be considered neghbors - in the units of the spatial reference of the input dataset