Generate Events (Location Referencing)

Disponible avec la licence Location Referencing.

Synthèse

Re-creates shapes for event features registered with an LRS Network.

Utilisation

  • An LRS dataset is required to run this tool. To create an LRS dataset, add the calibration point, centerline, and redline layers to a feature dataset; then run the Modify LRS tool with the geodatabase as the input.

  • Input the event whose features need to be regenerated based on the route and measure of the event.

  • When conflict prevention is enabled for the tool, any events being generated by the tool will be locked.

    • While working in the default version, the locks acquired are released automatically when the tool completes.
    • While working in a child version, the locks acquired will remain in On Post status when the tool completes. The lock owner must post or delete the version to release the locks.
    • While working in a child version, if the execution of the tool is canceled by interruption, the locks are acquired and will remain in releasable status when the tool completes.

Paramètres

ÉtiquetteExplicationType de données
Event Layer

The event for which shapes will be regenerated.

Feature Layer

Sortie obtenue

ÉtiquetteExplicationType de données
Output Event Layers

Updated events feature layer.

Remarque :

Les résultats de validation de cet outil sont écrits dans le répertoire ArcGIS Server. Par défaut, ce fichier est nettoyé automatiquement au bout de 10 minutes, ce qui risque de ne pas laisser suffisamment de temps pour le traitement de toutes les validations et leur écriture sur le poste de travail exécutant ArcGIS Pro. Pour des charges de données plus importantes, il est recommandé de régler l’âge maximal du fichier sur une heure, au minimum.

Feature Layer

arcpy.locref.GenerateEvents(in_event_layer)
NomExplicationType de données
in_event_layer

The event for which shapes will be regenerated.

Feature Layer

Sortie obtenue

NomExplicationType de données
out_event_layers

Updated events feature layer.

Remarque :

Les résultats de validation de cet outil sont écrits dans le répertoire ArcGIS Server. Par défaut, ce fichier est nettoyé automatiquement au bout de 10 minutes, ce qui risque de ne pas laisser suffisamment de temps pour le traitement de toutes les validations et leur écriture sur le poste de travail exécutant ArcGIS Pro. Pour des charges de données plus importantes, il est recommandé de régler l’âge maximal du fichier sur une heure, au minimum.

Feature Layer

Exemple de code

GenerateEvents example 1 (Python window)

The following Python script demonstrates how to use the GenerateEvents function in the Python window.

# Name: GenerateEvents_Ex1.py
# Description: Generate events in stand-alone mode using a feature service. It is recommended to work in  a version and post it into the default version.
# Requires: ArcGIS Location Referencing

# Check out license
arcpy.CheckOutExtension("LocationReferencing")

# Tool variables 
in_event_layer = "Event"

# Set current workspace 
arcpy.env.workspace = "C:/data/Outputs.gdb"

# Execute the tool 
arcpy.GenerateEvents_locref(in_event_layer)

# Check in license
arcpy.CheckInExtension('LocationReferencing')
GenerateEvents example 2 (stand-alone script)

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

# Name: GenerateEvents_Ex2.py 
# Description: Re-creates shapes for event features registered with an LRS Network 
# Requirements: ArcGIS Location Referencing

# Import arcpy module 
import arcpy

# Check out license 
arcpy.CheckOutExtension("LocationReferencing")

# Local variables 
# Input Network layer 
in_event_layer = "C:\\Data\Sample.gdb\\LRS\\SpeedLimit" 

# Process: Generate Events
arcpy.GenerateEvents_locref(in_event_layer)

# Check in license
arcpy.CheckInExtension('LocationReferencing')
GenerateEvents example 3 (stand-alone script)

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

# Name: GenerateEvents_Ex3.py
# Description: Generate events in stand-alone mode using a feature service. It is recommended to work in  a version and post it into the default version.
# Requires: ArcGIS Location Referencing

# Import arcpy module.
import arcpy

# Check out license
arcpy.CheckOutExtension("LocationReferencing")

## Input event is in feature service.  Portal signin is required to access the feature service.
arcpy.SignInToPortal('https://yourdomain.com/portal', 'username', 'password')

## Map the input event from the feature service. Here, 3 corresponds to the input event
in_event_layer = r"https://yourdomain.com/server/rest/services/FeatureServiceName/FeatureServer/3"

# Process : Generate Events
arcpy.GenerateEvents_locref(in_event_layer)

# Check in license
arcpy.CheckInExtension('LocationReferencing')

Environnements

Cas particuliers

Informations de licence

  • Basic: Nécessite ArcGIS Location Referencing
  • Standard: Nécessite ArcGIS Location Referencing
  • Advanced: Nécessite ArcGIS Location Referencing

Rubriques connexes