Point Distance (Coverage)
Summary
Computes the point-to-point distance between each point in a coverage to all points in the same or another coverage within a specified search radius.
Illustration
Usage
-
The definition of the distance item in the output INFO file will be the same as the highest precision of the two point coverage inputs.
-
The search radius is the maximum distance in coverage units a feature can be from the current point for consideration. The diagonal width of the from coverage’s BND will be used as the default if no {search_radius} is specified.
-
Distance is set to zero when no match is found within the search radius for a particular point. If no matching points are found, the tool gives a warning, and no output info table is created.
-
Point Distance will not work if either coverage contains more than 130,000 points.
-
The output INFO table can become very large when both coverages contain many points. Use a smaller search radius to limit the number of combinations.
-
If Point Distance is used to calculate the distance between other points in a single coverage, the cover# will have an A and a B appended to the item name.
-
Projection files will be compared for similarity using the level of comparison specified with the Project Compare environment setting. For more information, see Compare Projections.
-
The results are recorded in an output table containing items for the internal numbers and distance. The input with the highest precision for distance is the one used for the output INFO distance field.
COLUMN ITEM NAME WIDTH OUTPUT TYPE N.DEC 1 <From coverage># 4 6 B - 5 <To coverage># 4 6 B - 9 DISTANCE 4 12 F 3 (single precision) Or 9 DISTANCE 8 18 F 5 (double precision)
Syntax
Parameter | Explanation | Data Type |
from_cover |
The point coverage for which distances to another coverage's points are to be computed. | Coverage |
to_cover |
The point coverage from which point distances are to be measured. Distances between all points in the same coverage can be calculated by specifying the same coverage name for both <from_cover> and <to_cover> arguments. | Coverage |
out_info_table |
The INFO data table created by Point Distance, which holds the distance measurements. The number of records created in <output Info table:> depends on the search radius used, but it can be as large as the number of points in the <from cover> times the number of points in the <to cover:>. | ArcInfo Table |
search_radius (Optional) |
The maximum distance in coverage units a feature can be from the current point for consideration as the closest feature. The default value is the diagonal width of the from coverage’s BND. | Double |
Code Sample
The following stand-alone script demonstrates how to calculate the distances between points in two coverages.
# Name: PointDistance_Example.py # Description: Calculates the distances between the points in two coverages # Requirements: ArcInfo Workstation # Author: ESRI # Import system modules import arcpy from arcpy import env # Set environment settings env.workspace = "C:/data" # Set local variables fromCover = "wells" toCover = "trees" outInfoTable = "C:/output/distance" # Execute PointDistance arcpy.PointDistance_arc(fromCover, toCover, outInfoTable, "")