ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Aide
  • Sign Out
ArcGIS Desktop

ArcGIS Online

La plateforme cartographique de votre organisation

ArcGIS Desktop

Un SIG professionnel complet

ArcGIS Enterprise

SIG dans votre entreprise

ArcGIS Developers

Outils de création d'applications de localisation

ArcGIS Solutions

Modèles d'applications et de cartes gratuits pour votre secteur d'activité

ArcGIS Marketplace

Téléchargez des applications et des données pour votre organisation.

  • Documentation
  • Support
Esri
  • Se connecter
user
  • Mon profil
  • Déconnexion

ArcMap

  • Accueil
  • Commencer
  • Carte
  • Analyser
  • Gérer les données
  • Outils
  • Extensions

Network Analyst Locator

  • Résumé
  • Discussion
  • Propriétés
  • Exemple de code

Résumé

Provides the source, snap type, and search query information about the classes that are used to determine the network locations.

Discussion

The source, snapType, and searchQuery properties for the locator object are dynamic. This means that the total number of properties supported by a given locator object depends on the locatorCount property. For example, if the value of the locatorCount property is 2, then the locator object will support source0, source1, snapType0, snapType1, searchQuery0, and seacrhQuery1 properties.

Propriétés

PropriétéExplicationType de données
sourceX
(Lecture seule)

The name of a particular class used by the locator.

String
snapTypeX
(Lecture seule)

An underscore-separated string containing the snap types used for a given class in the locator.

The possible snap types are

  • NONE
  • SHAPE
  • MIDDLE
  • END
String
searchQueryX
(Lecture seule)

A query to restrict the search to a subset of the features within a given class in the locator.

String

Exemple de code

Network Analyst Locator example

Displays the Network Analyst Layer Locator properties.

# Name: NALayerLocatorProperties_ex01.py
# Description: Prints the source name and snap type information
#              for the locators used by a network analysis layer

import arcpy

in_layer = "C:/Data/Route.lyr" 

# Create a Describe object from layer file.
desc = arcpy.Describe(in_layer) 

count = desc.locatorCount 
locators = desc.locators 

#print locator information
print "Total Locators: ", count 
for i in range(0, count): 
    sourceName = getattr(locators,"source" + str(i))
    snapType = getattr(locators,"snapType" + str(i))
    query = getattr(locators, "searchQuery" + str(i))
    print "%s : %s : %s" % (sourceName,snapType, query)

ArcGIS Desktop

  • Accueil
  • Documentation
  • Support

ArcGIS

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

A propos d'Esri

  • A propos de la société
  • Carrières
  • Blog d’Esri
  • Conférence des utilisateurs
  • Sommet des développeurs
Esri
Donnez-nous votre avis.
Copyright © 2021 Esri. | Confidentialité | Légal