Click or drag to resize

RoutingStrategyLinkEdits Property

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
A set of link edits that, for selected links, will override the default speed that is used when calculating a route.

Namespace:  Telogis.GeoBase.Routing
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public CompiledLinkEdits LinkEdits { get; set; }

Property Value

Type: CompiledLinkEdits
Remarks

To use this feature, create a LinkEditDatabase and create appropriate LinkEdit objects using the CreateLinkEdit method. Once ready, call Compile to create a CompiledLinkEdits object that can be assigned to this property.

Alternatively, a CompiledLinkEdits can be created from a pre-existing LinkEditDatabase file by calling CompiledLinkEdits.Create.

This property can not be used with a GeoStreamRepository.

Examples
C#
public MyForm() {
    InitializeComponent();
    // Set up a link edit database, edit the link(s) and compile the edits database...

    // ......
    // Create a link edit database in local memory.
    Telogis.GeoBase.Routing.LinkEdit.LinkEditDatabase myLinkEditDatabase =
        new Telogis.GeoBase.Routing.LinkEdit.LinkEditDatabase();
    // Then create a link selection. This example specifies a single link.
    Telogis.GeoBase.Routing.LinkEdit.LatLonSelection myLatLonSelection =
        new Telogis.GeoBase.Routing.LinkEdit.LatLonSelection(new LatLon(33.632024, -117.815720));
    // Then create a link edit. Set the link speed to a maximum of 15MPH.
    myLinkEditDatabase.CreateLinkEdit(myLatLonSelection, 15, Telogis.GeoBase.SpeedUnit.MilesPerHour);
    // Compile the link edit database ready to be applied to a routing strategy.
    Telogis.GeoBase.Routing.LinkEdit.CompiledLinkEdits myCompiledLinksDatabase = myLinkEditDatabase.Compile();
    // .....

    // Then....
    // Create a route and apply the link edit database to its strategy. 
    Telogis.GeoBase.Routing.Route someRoute = new Telogis.GeoBase.Routing.Route();
    someRoute.Strategy.LinkEdits = myCompiledLinksDatabase; 
}
See Also