ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Ayuda
  • Sign Out
ArcGIS Desktop

ArcGIS Online

La plataforma de representación cartográfica para tu organización

ArcGIS Desktop

Un completo SIG profesional

ArcGIS Enterprise

SIG en tu empresa

ArcGIS Developers

Herramientas para crear aplicaciones basadas en la ubicación

ArcGIS Solutions

Plantillas de aplicaciones y mapas gratuitas para tu sector

ArcGIS Marketplace

Obtén aplicaciones y datos para tu organización.

  • Documentación
  • Soporte
Esri
  • Iniciar sesión
user
  • Mi perfil
  • Cerrar sesión

ArcMap

  • Inicio
  • Introducción
  • Cartografiar
  • Analizar
  • Administrar datos
  • Herramientas
  • Extensiones

Landmark Source

  • Resumen
  • Propiedades
  • Muestra de código

Resumen

The Landmark Source object provides information about the configuration of landmarks used in generating driving directions.

Propiedades

PropiedadExplicaciónTipo de datos
featureClassName
(Sólo lectura)

The name of the point feature class or table associated with this landmark source.

String
labelFieldName
(Sólo lectura)

The name of the text field in the landmark feature class or table that describes the landmark.

String
levelFieldName
(Sólo lectura)

The name of the field used to associate landmarks with a specific floor level of a building.

String
searchTolerance
(Sólo lectura)

The size of the search radius. In general, when a route passes by a landmark within the search radius, it is reported in the directions. The units for this field are specified under searchToleranceUnits.

Double
searchToleranceUnits
(Sólo lectura)

The units of the searchTolerance value.

String
useSpatialSearch
(Sólo lectura)

A Boolean indicating whether the landmarks are spatial (True) or nonspatial (False). Nonspatial landmarks are associated with the ObjectID of a particular edge feature, whereas the position of spatial landmarks is determined by geometry.

Boolean

Muestra de código

Landmark Source example

# 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

  • Inicio
  • Documentación
  • Soporte

ArcGIS

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

Acerca de Esri

  • Quiénes somos
  • Empleo
  • Blog de Esri
  • Conferencia de usuarios
  • Cumbre de desarrolladores
Esri
Díganos su opinión.
Copyright © 2021 Esri. | Privacidad | Legal