ArcGIS for Desktop

  • 文档
  • 合约
  • 支持

  • My Profile
  • 帮助
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

专为贵组织打造的制图平台

ArcGIS for Desktop

全面的专业性 GIS

ArcGIS for Server

面向企业的 GIS

ArcGIS for Developers

用于构建位置感知应用程序的工具

ArcGIS Solutions

适用于行业的免费模板地图和应用程序

ArcGIS Marketplace

获取适用于组织的应用程序和数据

  • 文档
  • 合约
  • 支持
Esri
  • 登录
user
  • 我的个人资料
  • 登出

帮助

  • 主页
  • 入门
  • 制图
  • 分析
  • 管理数据
  • 工具
  • 更多...

Point Distance

在 Advanced 许可等级下可用。

  • 摘要
  • 插图
  • 用法
  • 语法
  • 代码实例
  • 环境
  • 许可信息

摘要

Determines the distances from input point features to all points in the near features within a specified search radius.

法律声明:

This is a deprecated tool. This functionality has been replaced by Near and Generate Near Table tools that now calculate distances between point, polyline and polygon features.

插图

Point Distance illustration

用法

  • The tool creates a table with distances between two sets of points. if the default search radius is used, distances from all input points to all near points are calculated. The output table can be quite large. For example, if both input and near features have 1,000 points each, then the output table can contain one million records.

  • Use a meaningful search radius to limit the size of the output and improve tool performance. The output table contains only those records that have a near point within the search radius.

  • The results are recorded in the output table containing the following information:

    • INPUT_FID: The feature ID of the input features
    • NEAR_FID: The feature ID of the near features
    • DISTANCE: The distance from the input to near feature. The value of this field is in the linear unit of the input features coordinate system.
  • 输入要素和邻近要素可以是同一数据集。在此情况下,如果输入要素和邻近要素是相同的记录,将忽略这一结果,这样就不会报告与一个要素的距离是 0 个单位的要素本身。

语法

PointDistance_analysis (in_features, near_features, out_table, {search_radius})
参数说明数据类型
in_features

The point features from which distances to the near features will be calculated.

Feature Layer
near_features

The points to which distances from the input features will be calculated. Distances between points within the same feature class or layer can be determined by specifying the same feature class or layer for the input and near features.

Feature Layer
out_table

The table containing the list of input features and information about all near features within the search radius. If a search radius is not specified, distances from all input features to all near features are calculated.

Table
search_radius
(可选)

Specifies the radius used to search for candidate near features. The near features within this radius are considered for calculating the nearest feature. If no value is specified (that is, the default (empty) radius is used) all near features are considered for calculation. The unit of search radius defaults to units of the input features. The units can be changed to any other unit. However, this has no impact on the units of the output DISTANCE field which is based on the units of the coordinate system of the input features.

Linear unit

代码实例

PointDistance example 1 (Python window)

The following Python interactive window script demonstrates how to use the PointDistance function in immediate mode.

import arcpy
arcpy.env.workspace = "C:/data/pointdistance.gdb"
  
arcpy.PointDistance_analysis("police_stations", "crime_location", "crime_distances")
PointDistance example 2 (stand-alone Python script)

The following Python script demonstrates how to use the PointDistance function in a stand-alone script.

# Description: Finds distance of each near point from each input point and outputs to a table.
  
# import system modules
import arcpy
  
# set workspace environment
arcpy.env.workspace = "C:/data/pointdistance.gdb"
  
# set variables
in_features = "police_stations"
near_features = "crime_location"
out_table = "crime_distance4"
search_radius = "22000 Feet"
  
# find crime locations within the search radius
arcpy.PointDistance_analysis(in_features, near_features, out_table, search_radius)

环境

  • 范围
  • 当前工作空间
  • 临时工作空间

许可信息

  • ArcGIS for Desktop Basic: 否
  • ArcGIS for Desktop Standard: 否
  • ArcGIS for Desktop Advanced: 是

相关主题

  • 邻域分析工具集概述
有关此主题的反馈?

ArcGIS for Desktop

  • 主页
  • 文档
  • 合约
  • 支持

ArcGIS 平台

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

关于 Esri

  • 关于我们
  • 招贤纳士
  • 内部人员博客
  • 用户大会
  • 开发者峰会
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | 隐私政策 | 法律声明