ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Point Distance

Available with Advanced license.

  • Summary
  • Illustration
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

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

Point Distance 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

arcpy.arc.PointDistance(from_cover, to_cover, out_info_table, {search_radius})
ParameterExplanationData 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:>.

INFO 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

PointDistance example (stand-alone script)

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

# 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, "")

Environments

  • Current Workspace
  • Level Of Comparison Between Projection Files
  • Precision For Derived Coverages
  • Precision For New Coverages
  • Scratch Workspace

Licensing information

  • Basic: No
  • Standard: No
  • Advanced: Requires ArcInfo Workstation installed

Related topics

  • An overview of the Proximity toolset
  • An overview of the Proximity toolset

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal