TopoFindRoute Method
Description
Creates a Named Seed object by route-finding between two Node Items within a dataset.
Syntax
Visual Basic |
---|
Public Function TopoFindRoute( _ ByVal seed As String, _ ByVal idNode1 As Long, _ ByVal idNode2 As Long, _ ByVal nDataset As Long, _ ByVal propertyName As String, _ ByVal filter As String, _ ByVal locusNoGo As String _ ) As Integer |
Parameters
- seed
- The name of the new Named Seed object.
- idNode1
- The start Node of the route.
- idNode2
- The end Node of the route.
- nDataset
- The serial number of the topological dataset. The serial number can be obtained from the Dataset property of an overlay, or from the GetDataset, FindExternalDataset or TopoGetNamedSeedDataset methods.
- propertyName
- The expression, or simple property, to use in the route finding calculation as the "cost" of a Link item. For example, using the simple property Length will find the shortest route, and using the expression "_length#/Speed#", provided each Link has a user-defined Speed# property, will find the quickest route. Any expression may be used, although if a string expression is used it must be a string representation of a numeric value. See Property Expression Syntax for details.
- filter
- Optionally specifies a named Filter which all Link Items must pass to be considered as part of the route.
- locusNoGo
- Optionally specifies a named Spatial Filter through which the route cannot pass.
Return Type
False
on failure.Remarks
Available: GEO D OD SISpy
Group:
Example
The named Spatial Filter used will normally have its testing mode set to exclude any Link Items which cross it, using a call similar to the following:
CreateLocusFromItem("SpatialFilter",SIS_GT_INTERSECT,SIS_GM_GEOMETRY)