ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Turn Source

  • Summary
  • Properties
  • Code sample

Summary

Provides information about turn sources in a network dataset.

Properties

PropertyExplanationData Type
name
(Read Only)

The name of the feature class associated with this network source.

String
sourceID
(Read Only)

The unique identifier of this network source within the network dataset.

Integer
sourceType
(Read Only)

The type of network source. This property returns the following keywords:

  • EdgeFeature
  • JunctionFeature
  • SystemJunction
  • TurnFeature
  • NetworkSource

String
elementType
(Read Only)

Network element type of the network source. This property returns the following keywords:

  • Edge
  • Junction
  • Turn

String

Code sample

Turn Source Properties example

Displays information for turn sources in the network dataset.

# Name: NDSTurnSourceProperties_ex01.py
# Description: Print the information about the turn sources defined for the 
#              network dataset

import arcpy
import sys

# Set workspace
arcpy.env.workspace = "C:/Data/SanFrancisco.gdb/Transportation"

#Create a Describe object from the network dataset
desc = arcpy.Describe("Streets_ND")

justify = 35
print ("------- Turn sources") 

#Get all the turn sources for the network dataset
turns = desc.turnSources

#Not all network datasets can have turn sources.
if not turns:
    print ("%*s" % (justify, "(No turn sources)")) 
    sys.exit(0)

for turnSource in turns: 
    print ("%*s: %s" % (justify, "Source Name" , turnSource.name)) 
    print ("%*s: %s" % (justify, "Source ID" , str(turnSource.sourceID))) 
    print ("%*s: %s" % (justify, "Source Type", turnSource.sourceType))
    print ("%*s: %s" % (justify, "Element Type", turnSource.elementType))
    print (" ")

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

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

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal