Using Truck Attributes and Constraints
Vehicle Constraints
Vehicle constraints provide more detail about roads such as bridge heights and weight restrictions. This is of special interest to trucking fleets to ensure trucks are following safe and legal routes. These constraints are normally provided in a separate truck attribute GBFS file. Sample truck data can be found in the Sample Data section.
Vehicle Attributes
Vehicle attributes set the dimensions of your vehicle, such as height, weight and length. These are used by the routing engine to find a correct route based on where your vehicle is allowed to travel.
Constraints and Routing
The easiest way to see this in action is by using the MapExplorer sample application provided with GeoBase. Copy the NAVTEQ truck attribute data to your data directory:
C:\Program Files\Telogis\GeoBase\GeoBaseResources\data\gb.3.5
Start MapExplorer:
Start -> Programs -> GeoBase Developer’s Kit -> MapExplorer
One example location with truck attributes set is in Santa Ana, California. Search for the following LatLon in MapExplorer:
33.708480,-117.851883
Zoom in and right-click near the push-pin. Select Query Street Link to see the following Street Details:

This shows the constraints set for this segment of the road have a height restriction of 467cm for all vehicle types. This is due to the Costa Mesa Freeway overpass. When a vehicle attribute meets or exceeds this height the speed limit is set to 0 so that it will not be used by the routing engine. Note that not all road segments will have constraints set.
To test this constraint, create a route from:
574 E Dyer Rd, Santa Ana, Orange, California, 92707, USA
to:
1850 E Dyer Rd, Santa Ana, Orange, California, 92705, USA
A vehicle without any attributes can travel straight on Dyer Rd:

To enable truck attributes in MapExplorer, select Route (from the top menu) and then Truck Attributes and you are presented with the Truck Route Settings dialog. In the Height field, set the value to 466cm.

NOTE: This dialog must be left open for the attributes to be used during routing.
With the dialog still open, run Route -> Get Directions again. The route has not changed because the vehicle height is still below the restriction. Now set the height to 467cm and Route -> Get Directions to see that the vehicle must now avoid that road segment:

This can also be seen in the MobileNav sample application:


Coding Attributes and Constraints
Vehicle constraints are automatically used by the GeoBase routing engine based on the vehicle attributes you set.
Use a VehicleSpec object to set attributes on the Route object and then calculate the route. This example shows how to set vehicle attributes when routing between two RouteStops:
Route my_route = new Route(routeStop1,routeStop2); // configure the vehicle dimensions VehicleSpec vs = my_route.VehicleSpec; vs.VehicleType = VehicleType.Truck; vs.GrossWeight_kg = 37000; vs.NumberOfTrailers = 1; vs.KingpinToLastAxle_cm = 880; vs.Height_cm = 470; // about 15" high vs.Length_cm = 6500; // about 21" long // configure the vehicle load vs.SetLoadInfo(0, LoadType.Hazmat_3, 800); // 800 kg of paint my_route.VehicleSpec = vs; // now, when we ask for directions the route will consider // the vehicle attributes defined in our VehicleSpec Directions my_dirs = my_route.GetDirections();
Viewing Constraints on a Street Link
Use the GetConstraints function to get a list of ConstraintLinks. For example:
GeoCodeFull gcf = GeoCoder.ReverseGeoCodeFull(latlon); List<ConstraintLinks> constraints = new System.Collections.Generic.List<ConstraintLinks>(); constraints = (my_route.GetConstraints(((StreetLink)gcf.StreetLink).FirstPoint, ConstraintLinkDirection.FromReference, false));
What vehicle attributes and constraints are available?
Learn More
Tagged under: dotnet mobile geobase vehicle attributes and constraints routing map data navigation
1 Comments
- says: on 11/11/09
- NAVTEQ Transport(r) and Tele Atlas Logistics(r) sample data sets are available in the Download section