ArcObjects Library Reference (GeoDatabase)  

INetworkQuery Interface

Provides access to members that query the elements of the network dataset.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Members

Description
Method ClearIDCache Empties the contents of the index used for finding network elements by source.
Read-only property ComplexTurnCount Number of turn elements in the network dataset having more than two edge elements participating.
Method CreateForwardStar Creates a NetworkForwardStar object for traversing the network dataset.
Method CreateForwardStarAdjacencies Creates a NetworkForwardStarAdjacencies container object for forward star queries.
Method CreateNetworkElement Creates an uninitialized network element of the specified type for use in network dataset queries.
Read-only property EdgesByPosition Edge elements in the network dataset with a from and to position that includes the given position for the given source object.
Read-only property EdgesBySegment Edge elements in the network dataset with a from and to position included in the given range for the given source object.
Read-only property ElementCount Number of network elements of the given type in the network dataset.
Read-only property Elements Enumeration of all elements in the network dataset of the given type.
Read-only property ElementsByOID Elements in the network dataset corresponding to the given source object.
Read-only property ElementsByOIDs Elements in the network dataset corresponding to the given source objects.
Read-only property ElementsForSource Enumeration of all elements in the network dataset corresponding to the given source.
Read-only property MaxEID Highest element ID in the network dataset for the given element type.
Read-only property MaxValence Maximum number of edge elements connected to any single junction element.
Method PopulateIDCache Initializes the index used for quickly finding network elements for the given source ID.
Method QueryEdge Performs a network edge element query by element ID and edge direction and populates the given edge element object.
Method QueryJunction Performs a network junction element query by element ID and populates the given junction element object.
Method QueryTurn Performs a network turn element query by element ID and populates the given turn element object.

CoClasses that implement INetworkQuery

CoClasses and Classes Description
NetworkDataset A container for querying information about a network dataset.

Remarks

The INetworkQuery interface is used to retrieve the elements of the network dataset.  You can query for network elements by their element type, by the source that generated them, or by the Object IDs of their source features.

You can also query other elements that are immediately adjacent to given elements by using the NetworkForwardStar object.  This object allows you to repeatedly query the adjacent elements and their attribute values efficiently.

.NET Snippets

Display Network Adjacency in MessageBox |

.NET Samples

Network Analyst barrier location editor (Code Files: EditorForm) | Subset network evaluators (Code Files: SubsetHelperUI) |