Skip to main content

attribute

汇总

该对象提供了对网络数据集的特性、属性、属性值和元素的访问。

讨论

将提供一个 NetworkQuery 对象作为 attach 方法的参数,其他方法可以使用该对象的 self.networkQueryNetworkQuery 对象可用于获取网络数据集的各种属性或查询网络数据集的属性、元素等。

语法

attribute()

属性

名称 说明 数据类型

networkName

(只读)

网络名称。

String

sourceNames

(只读)

该网络参考的源名称。 此项的类型为字符串。

Iterable

方法

attribute(attribute_name)

返回指定属性名称的属性。

名称 说明 数据类型

attribute_name

The name of the network attribute.

String

返回值

数据类型 说明

Attribute

一个属性对象。

如果找不到该属性名称,则将返回 None

attributeUsage(attribute)

返回指定属性的使用类型。

名称 说明 数据类型

attribute

The attribute ID as an attribute object.

Attribute

返回值

数据类型 说明

AttributeUsage

属性用法枚举。

attributeParameters(attribute)

返回指定属性的参数。

名称 说明 数据类型

attribute

The attribute ID as an attribute object.

Attribute

返回值

数据类型 说明

AttributeParameter

属性参数的可迭代对象。

fromJunction(edge)

返回指定边的起始交汇点。

名称 说明 数据类型

edge

The edge that will get the from junction.

Edge

返回值

数据类型 说明

Junction

指定边的起始交汇点。

toJunction(edge)

返回指定边缘的终止交汇点。

名称 说明 数据类型

edge

The edge that will get the to junction.

Edge

返回值

数据类型 说明

Junction

指定边缘的终止交汇点。

atJunction(turn)

返回连接转弯的第一条和第二条边缘的交汇点。

名称 说明 数据类型

turn

An iterable consisting of turn with the first and second edges.

Turn

返回值

数据类型 说明

Junction

连接转弯的第一条和第二条边缘的交汇点。

turns(junction)

返回指定交汇点的转弯信息,该交汇点连接了每个转弯的第一条和第二条边缘。

名称 说明 数据类型

junction

The junction that will get the turns.

Junction

返回值

数据类型 说明

Turn

指定交汇点的转弯迭代,该交汇点连接了每个转弯的第一条和第二条边。

edges(element)

返回与指定元素相连的边源。

名称 说明 数据类型

element

The element the edges are connected to. The element can be a junction or a turn.

Object

返回值

数据类型 说明

Edge

与指定元素相连的边迭代。

edgePositions(edge)

返回指定边缘的源要素上的起始和终止位置。 该方法可使用源要素的数字化方向。

其值范围从 0.0 到 1.0。

名称 说明 数据类型

edge

The edge that will get the from and to positions.

Edge

返回值

数据类型 说明

tuple

指定边缘的源要素上的起始和终止位置。 该元组包含浮点值。

edgeAzimuths(edge)

返回指定边缘的起始方位角和终止方位角。

名称 说明 数据类型

edge

The edge that will get the from and to azimuths.

Edge

返回值

数据类型 说明

tuple

指定边缘的起始方位角和终止方位角。 该元组包含浮点值。

sourceInfo(element)

返回指定网络元素的源信息。

名称 说明 数据类型

element

The element that will get the source information. The element can be a Junction, an edge, or a turn.

Object

返回值

数据类型 说明

Integer

网络源 ID 和网络源对象 ID 的元组。

attributeValue(element, attribute, time_usage, local_time)

指定元素的属性值,包含可选时间。

名称 说明 数据类型

element

The element that the attribute value will be applied to. The element can be an edge, a junction, or a turn.

Object

attribute

The attribute that the value will be applied to.

Attribute

time_usage

The time usage type.

(默认值为 NetworkTimeUsage.Unused)

NetworkTimeUsage

local_time

The time that will be used with the specified element.

(默认值为 None)

DateTime

返回值

数据类型 说明

Object

指定元素在给定时间的属性值。 此项可以为整型、浮点型或布尔型。