Click or drag to resize

LinkEditDatabaseCreateLinkEdit Method

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Adds a new link edit to the database, and returns it.

Namespace:  Telogis.GeoBase.Routing.LinkEdit
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public LinkEdit CreateLinkEdit(
	ILinkEditSelection selection,
	int speed,
	SpeedUnit unit
)

Parameters

selection
Type: Telogis.GeoBase.Routing.LinkEditILinkEditSelection
The ILinkEditSelection that selects the links to be edited.
speed
Type: SystemInt32
The speed to apply.
unit
Type: Telogis.GeoBaseSpeedUnit
The units for speed.

Return Value

Type: LinkEdit
The LinkEdit that was added to the database.
Remarks

When applied, speeds will be converted into miles per hour and rounded down to the largest integer value that is no larger than the specified speed. A negative speed can be applied, and indicates that the original speed from strategy's RoutingProfile will be used. The maximum speed that can be specified is 254mph.

If the returned LinkEdit object is changed, the change will only be applied to the database if UpdateLinkEdit is called.

Examples
C#
public MyForm() {
    InitializeComponent();
    // 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);
    // Next, compile the database using the LinkEditDatabase.Compile method, ready to
    // be applied to a route strategy...
}
See Also