NetworkQuery
Résumé
This object provides access to a network dataset's properties, attributes, attribute values, and elements.
Discussion
A NetworkQuery object is provided as a parameter to the attach method, and other methods can use self.networkQuery to this object. A NetworkQuery object can be used to get various properties of a network dataset or query a network dataset for attributes, elements, and so on.
Propriétés
| Nom | Explication | Type de données |
|---|---|---|
|
networkName (Lecture seule) |
The name of the network. |
String |
|
sourceNames (Lecture seule) |
The names of the sources referenced by the network. This is of type string. |
Iterable |
Méthodes
attribute(attribute_name)
Returns an attribute of the specified attribute name.
| Nom | Explication | Type de données |
|---|---|---|
|
attribute_name |
The name of the network attribute. |
String |
Valeur de retour
| Type de données | Explication |
|---|---|
|
Attribute |
An attribute object. If the attribute name is not found, |
attributeUsage(attribute)
Returns the usage type of the specified attribute.
| Nom | Explication | Type de données |
|---|---|---|
|
attribute |
The attribute ID as an attribute object. |
Attribute |
Valeur de retour
| Type de données | Explication |
|---|---|
|
AttributeUsage |
An attribute usage enumeration. |
attributeParameters(attribute)
Returns the parameters of the specified attribute.
| Nom | Explication | Type de données |
|---|---|---|
|
attribute |
The attribute ID as an attribute object. |
Attribute |
Valeur de retour
| Type de données | Explication |
|---|---|
|
AttributeParameter |
An iterable of attribute parameters. |
fromJunction(edge)
Returns the from junction for the specified edge.
| Nom | Explication | Type de données |
|---|---|---|
|
edge |
The edge that will get the from junction. |
Edge |
Valeur de retour
| Type de données | Explication |
|---|---|
|
Junction |
The from junction for the specified edge. |
toJunction(edge)
Returns the to junction for the specified edge.
| Nom | Explication | Type de données |
|---|---|---|
|
edge |
The edge that will get the to junction. |
Edge |
Valeur de retour
| Type de données | Explication |
|---|---|
|
Junction |
The to junction for the specified edge. |
atJunction(turn)
Returns the junction that connects the first and second edges of the turn.
| Nom | Explication | Type de données |
|---|---|---|
|
turn |
An iterable consisting of turn with the first and second edges. |
Turn |
Valeur de retour
| Type de données | Explication |
|---|---|
|
Junction |
The junction that connects the first and second edges of the turn. |
turns(junction)
Returns the turns for the specified junction where the junction connects the first and second edges of each turn.
| Nom | Explication | Type de données |
|---|---|---|
|
junction |
The junction that will get the turns. |
Junction |
Valeur de retour
| Type de données | Explication |
|---|---|
|
Turn |
An iterable of turns for the specified junction where the junction connects the first and second edges of each turn. |
edges(element)
Returns the edges that are connected to the specified element.
| Nom | Explication | Type de données |
|---|---|---|
|
element |
The element the edges are connected to. The element can be a junction or a turn. |
Object |
Valeur de retour
| Type de données | Explication |
|---|---|
|
Edge |
An iterable of edges that are connected to the specified element. |
edgePositions(edge)
Returns the from and to positions along the source feature for the specified edge. This method uses the digitization direction of the source feature.
The values can range from 0.0 to 1.0
| Nom | Explication | Type de données |
|---|---|---|
|
edge |
The edge that will get the from and to positions. |
Edge |
Valeur de retour
| Type de données | Explication |
|---|---|
|
tuple |
The from and to positions along the source feature for the specified edge. The tuple consists of float values. |
edgeAzimuths(edge)
Returns the from and to azimuths for the specified edge.
| Nom | Explication | Type de données |
|---|---|---|
|
edge |
The edge that will get the from and to azimuths. |
Edge |
Valeur de retour
| Type de données | Explication |
|---|---|
|
tuple |
The from and to azimuths for the specified edge. The tuple consists of float values. |
sourceInfo(element)
Returns source information for the specified network element.
| Nom | Explication | Type de données |
|---|---|---|
|
element |
The element that will get the source information. The element can be a Junction, an edge, or a turn. |
Object |
Valeur de retour
| Type de données | Explication |
|---|---|
|
Integer |
A tuple of network source ID and network source object ID. |
attributeValue(element, attribute, time_usage, local_time)
The attribute value for a specified element, with optional time.
| Nom | Explication | Type de données |
|---|---|---|
|
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. The default value is NetworkTimeUsage.Unused. |
NetworkTimeUsage |
|
local_time |
The time that will be used with the specified element. The default value is None. |
DateTime |
Valeur de retour
| Type de données | Explication |
|---|---|
|
Object |
The attribute value for a specified element at a given time. This could be an integer, a float or a boolean. |