ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Hilfe
  • Sign Out
ArcGIS Desktop

ArcGIS Online

Die Mapping-Plattform für Ihre Organisation

ArcGIS Desktop

Ein vollständiges professionelles GIS

ArcGIS Enterprise

GIS in Ihrem Unternehmen

ArcGIS Developers

Werkzeuge zum Erstellen standortbezogener Apps

ArcGIS Solutions

Kostenlose Karten- und App-Vorlagen für Ihre Branche

ArcGIS Marketplace

Rufen Sie Apps und Daten für Ihre Organisation ab.

  • Dokumentation
  • Support
Esri
  • Anmelden
user
  • Eigenes Profil
  • Abmelden

ArcMap

  • Startseite
  • Erste Schritte
  • Karte
  • Analysieren
  • Verwalten von Daten
  • Werkzeuge
  • Erweiterungen

Landmark Source

  • Zusammenfassung
  • Eigenschaften
  • Codebeispiel

Zusammenfassung

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

Eigenschaften

EigenschaftErklärungDatentyp
featureClassName
(Nur lesen)

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

String
labelFieldName
(Nur lesen)

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

String
levelFieldName
(Nur lesen)

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

String
searchTolerance
(Nur lesen)

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
(Nur lesen)

The units of the searchTolerance value.

String
useSpatialSearch
(Nur lesen)

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

Codebeispiel

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

  • Startseite
  • Dokumentation
  • Support

ArcGIS

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

Über Esri

  • Über uns
  • Karriere
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Wir sind an Ihrer Meinung interessiert.
Copyright © 2021 Esri. | Datenschutz | Rechtliches