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

Shields

  • Summary
  • Properties
  • Code sample

Summary

The Network Dataset Shields object provides information about the directions shields settings for a given edge source.

Properties

PropertyExplanationData Type
combinedFieldName
(Read Only)

The field name whose values contain the whole address description.

String
description
(Read Only)

The Shields Description object.

Object
descriptionCount
(Read Only)

The number of shields.

Integer
numberFieldName
(Read Only)

The field name whose values contain the house number.

String
typeFieldName
(Read Only)

The field name whose values contain the street type.

String
useCombinedField
(Read Only)

Indicates whether the shield information is contained in a single field (True) or in two fields (False).

Boolean

Code sample

Shields Properties Example

Display the directions shields information for each edge source in the network dataset.

# Name: NDSShieldsProperties_ex01.py
# Description: Print information about directions shields for each edge source

import arcpy
import sys

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

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

#If the directions are not set for the network dataset, exit 
if not desc.supportsDirections:
    print "No direction information"
    sys.exit() 

print "Source Direction Information ----" 

# Get all the edge sources 
sources = desc.edgeSources 

if not sources:
    print "No edge sources"
    sys.exit() 
#Loop through all the edge sources
for source in sources:  
    print "--------------------" 
    print "Name: " , source.name 
    print "Source ID: " , source.sourceID  
    #Get the direction information specific to edge source    
    sDir = source.sourceDirections
    #Get the shields for each source
    shields = sDir.shields
    if shields: 
        print "Shield type field: " , shields.typeFieldName
        print "Number field:" , shields.numberFieldName 
        print "Combined field: " , shields.combinedFieldName 
        print "Description count: " , shields.descriptionCount 
    else: 
        print "(No shield information)"

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