Go to ET GeoWizards 12.x User Guide
Closest Feature Distance
Go to ToolBox Implementation
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:
- A feature layer
- Search tolerance - the maximum distance to search for neighboring features.
Outputs:
- A new feature class. The attribute table of the resulting feature class will have three
new fields
- [ET_ID] - the ID of the feature
- [ET_Dist] - the distance from the feature to the closest feature.
- [ET_Closest] - the ID of the closest feature.
Notes:
- If the distance from a feature to the closest feature is larger
than the Search Tolerance then the [ET_Dist] and [ET_ Closest] will have a value of -1
- If the layer is of polygon type all the polygons that are within another polygon
will have a distance of 0. If the distance to the polygons boundaries has to be
calculated, convert first the polygon layer to a polyline one using Polygon To Polyline
Wizard.
- The larger the search tolerance is, the slower the process will be
- The distance is calculated in the Spatial Reference of the input dataset.
- If there are more than one feature with the same distance to a feature (for example
intersecting polylines) only one of the ID's will be recorded in the [ET_ Closest] field.
ToolBox
implementation
(Go to TOP)
Command line syntax
ET_GPClosestFeatureDistance<input_dataset>
<out_feature_class> <search_distance>
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) |
|
<search_distance> |
A Double representing the
maximum distance between the points within a cluster - in
the units of the spatial reference of the input dataset |
Scripting syntax
ET_GPClosestFeatureDistance(input_dataset,out_feature class,
search_distance)
See the explanations above:
<> - required parameter
{} - optional parameter
| Copyright © Ianko Tchoukanski |