CreateIsoRoute Method
Description
Create a MultiLineString Item (or a LineString Item) covering all connected places which can be reached from a position, within a given cost. When the cost is related to time, this query is often called an Isochrone.
Syntax
Visual Basic |
---|
Public Function CreateIsoRoute( _ ByVal x As Double, _ ByVal y As Double, _ ByVal z As Double, _ ByVal r As Double, _ ByVal isoVal As Double, _ ByVal formula As String, _ ByVal filter As String, _ ByVal locusNoGo As String _ ) As Integer |
Parameters
- x
-
The x position to start from.
- y
-
The y position to start from.
- z
-
The z position to start from.
- r
-
The maximum distance from the start point to linear geometry. The topological algorithm will spread out from the closest Item found. The distance from the point to the closest Item is not included in the cost calculation. Ideally, the start point should be on an item.
- isoVal
-
The maximum cost to incur during route finding.
- formula
-
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.
Note: See Property Expression Syntax for details.
- filter
-
Optionally specifies a named Filter which all Items must pass to be considered as part of a route.
- locusNoGo
-
Optionally specifies a named Spatial Filter through which no route may pass.
The named Spatial Filter used ("NoGo" in the following examples) will normally have its testing mode set to exclude any Items which cross it, using a call similar to the following:
CreateLocusFromItem("NoGo",SIS_GT_INTERSECT,SIS_GM_GEOMETRY)
Remarks
This method can find a route over any geometry, not just Link/Node topology, by specifying an empty string for this argument. In this case, length is used as the cost.
Available: GEO D OM OD OV SISpy
Group:
This example converts length travelled at 30 mph to minutes, i.e. '5280' feet in a mile, '3.2808' feet in a metre.
sis.CreateIsoRoute (2000, 1500, 10, 30, 15, "_length#/((30*5280/3.2808)/60)", "links", "NoGo" )