ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • 帮助
  • Sign Out
ArcGIS Desktop

ArcGIS Online

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

ArcGIS Desktop

全面的专业性 GIS

ArcGIS Enterprise

面向企业的 GIS

ArcGIS Developers

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

ArcGIS Solutions

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

ArcGIS Marketplace

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

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

ArcMap

  • 主页
  • 入门
  • 地图
  • 分析
  • 管理数据
  • 工具
  • 扩展模块

Landmark Source

  • 描述
  • 属性
  • 代码示例

描述

地标源对象提供了与用于生成行驶方向的地标配置相关的信息。

属性

属性说明数据类型
featureClassName
(只读)

与该地标源相关的点要素类或表的名称。

String
labelFieldName
(只读)

地标要素类或表中的文本字段的名称,用于描述地标。

String
levelFieldName
(只读)

用于将地标与建筑物的特定楼层相关联的字段的名称。

String
searchTolerance
(只读)

搜索半径的大小。通常,当路径通过搜索半径范围内的路标时,将在方向中报告该路标。该字段的单位在 searchToleranceUnits 下指定。

Double
searchToleranceUnits
(只读)

searchTolerance 值单位。

String
useSpatialSearch
(只读)

指示地标为空间地标 (True) 还是非空间地标 (False) 的布尔值。非空间地标与特定边要素的 ObjectID 相关联,而空间地标的位置由几何确定。

Boolean

代码示例

地标源示例

# Name: NDSLandmarks_ex01.py
# Description: Print information about the directions landmarks associated
#              with edge sources in the network dataset.

import arcpy
import sys

def printLandmarkInfo(landmarks):
    for lm in landmarks:
        print("\nLandmarks feature class name:", lm.featureClassName)
        print("Label field name:", lm.labelFieldName)
        print("Level field name:", lm.levelFieldName)
        print("Search tolerance:", lm.searchTolerance)
        print("Search tolerance units:", lm.searchToleranceUnits)
        print("Landmarks are spatial:", lm.useSpatialSearch)

network = r"C:/Data/NetworkDatasetWithLandmarks.gdb/Transportation/Streets_ND"

# Create Describe object for the network dataset
desc = arcpy.Describe(network)

#If the directions are not set for the network dataset, exit
if not desc.supportsDirections:
    print("No direction information")
    sys.exit()

# Get all the edge sources
sources = desc.edgeSources

#If there are no edge sources in the network dataset, quit.
if not sources:
    print("No edge sources")
    sys.exit()

#Loop through all the edge sources
for source in sources:
    print("\n--------------------")
    print("Edge source name: " , source.name)
    # Get the directions information specific to this edge source
    sDir = source.sourceDirections
    # Check if the edge source has turn and confirmation landmarks associated with it.
    # If so, print some information about the landmarks.
    if hasattr(sDir, "landmarkEventSources"):
        landmarkEventSources = sDir.landmarkEventSources
        print("\n--Confirmation landmark information--")
        printLandmarkInfo(landmarkEventSources)
    else:
        print("Source does not have confirmation landmarks.")
    if hasattr(sDir, "landmarkManeuverSources"):
        landmarkManeuverSources = sDir.landmarkManeuverSources
        print("\n--Turn landmark information--")
        printLandmarkInfo(landmarkManeuverSources)
    else:
        print("Source does not have turn landmarks.")

ArcGIS Desktop

  • 主页
  • 文档
  • 支持

ArcGIS

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

关于 Esri

  • 关于我们
  • 招贤纳士
  • Esri 博客
  • 用户大会
  • 开发者峰会
Esri
分享您的想法。
Copyright © 2021 Esri. | 隐私政策 | 法律声明