Skip to main content

Network Dataset properties

Resumen

The Describe function returns the following properties for network datasets. The Dataset property group is also supported.

For a network dataset, the Describe dataType property returns a value of "NetworkDataset".

A network dataset is used to model transportation networks.

Propiedades

Propiedad Explicación Tipo de datos

attributes

(Solo lectura)

Returns a list of Network Attribute objects.

Object

catalogPath

(Solo lectura)

The path of the network dataset.

String

defaultTravelModeName

(Solo lectura)

The name of the network dataset's default travel mode. An empty string is returned if the network dataset does not have a default travel mode.

String

directions

(Solo lectura)

Returns a Network Directions object defined for the network dataset. This object can be used to get directions information at the network dataset level. The directions property is available only if the supportsDirections property returns True.

Object

edgeSources

(Solo lectura)

Returns a list of Edge Source objects.

Object

elevationModel

(Solo lectura)

The network elevation model used to refine the connectivity of the network dataset. This property returns the following keywords:

  • None

  • Elevation Fields

  • Z Coordinate Values

String

historicalTrafficData

(Solo lectura)

Returns the Historical Traffic Data object defined for the network dataset. This object can be used to get historical traffic information such as the historical traffic tables used by the network dataset. This property is available only if the supportsHistoricalTrafficData property returns True.

Object

isBuildable

(Solo lectura)

Specifies whether the network dataset can be built. SDC-based network datasets cannot be built, as they are read-only.

Boolean

junctionSources

(Solo lectura)

Returns a list of Junction Source objects.

Object

liveTrafficData

(Solo lectura)

Returns a Live Traffic Data object defined for the network dataset. This object can be used to get information about live traffic properties, such as traffic feed name used by the network dataset. This property is available only if the supportsLiveTrafficData property returns True.

Object

networkType

(Solo lectura)

The type of workspace containing the network dataset. This property returns the Geodatabase keyword.

String

optimizations

(Solo lectura)

Returns a list of strings indicating the optimizations, if any, the network dataset uses. If the network dataset has a service area index to increase the speed at which service area polygons are calculated, the Service Area Index value is returned in the list of optimizations. If the network dataset is dissolved, the Dissolve value is returned in the list of optimizations. If no optimizations are present, an empty list is returned.

String

sources

(Solo lectura)

Returns a list of Network Source objects. This property returns all the sources for the network dataset. To get a list of a particular source type—for example, only the edge sources—use the edgeSources property.

Object

supportsDirections

(Solo lectura)

Specifies whether the network dataset supports generating directions.

Boolean

supportsHistoricalTrafficData

(Solo lectura)

Specifies whether the network dataset supports the use of historical traffic information.

Boolean

supportsLiveTrafficData

(Solo lectura)

Specifies whether the network dataset supports the use of live traffic information.

Boolean

supportsTurns

(Solo lectura)

Specifies whether the network dataset supports turns.

Boolean

systemJunctionSource

(Solo lectura)

Returns a System Junction Source object defined for the network dataset. This property is not available with SDC-based network datasets, as they do not support system junction sources.

Object

timeZoneAttributeName

(Solo lectura)

The name of the time zone attribute. If the network dataset does not support time zones, this property returns an empty string.

String

timeZoneTableName

(Solo lectura)

The name of the time-zone table that stores the list of time zones used by the network dataset.

String

trafficSupportType

(Solo lectura)

The type of traffic data currently configured for this network dataset. This property returns the following keywords:

  • HISTORICAL

  • HISTORICAL_AND_LIVE

  • LIVE

  • NONE

If live traffic data is supported (supportsLiveTrafficData returns True), but a feed source has not been configured, this property will return HISTORICAL.

String

turnSources

(Solo lectura)

Returns a list of Turn Source objects.

Object

Muestra de código

Network dataset properties example

Display some network dataset properties.

# Name: NDSProperties_ex01.py
# Description: Print some of the network dataset properties.
import arcpy

# Set the workspace
arcpy.env.workspace = "C:/Data/Paris.gdb/Transportation"
# Create Describe object for the network dataset
desc = arcpy.Describe("ParisMultimodal_ND")

# Print general network dataset properties
print("Network type:   " + desc.networkType)
print("Supports turns? " + str(desc.supportsTurns))
print("Supports directions? " + str(desc.supportsDirections))
print("Is buildable?   " + str(desc.isBuildable))
print("Elevation model: " + desc.elevationModel)
print("Supports historical traffic data: " + str(desc.supportsHistoricalTrafficData))
print("Time zone attribute name: " + desc.timeZoneAttributeName)
print("Time zone table name: " + desc.timeZoneTableName)
print("Optimizations: " + ", ".join(desc.optimizations))