Side of Street Routing
Side of Street routing looks to navigate the driver to a stop on the same side of the street as the direction of travel. To achieve this, the side of the street must be known and identified by CoPilot. Once this is known, CoPilot will then look to provide navigation to this street side, which may require additional mileage.
The additional distance that CoPilot will look to navigate can be preset via a configuration setting or by using SDK App and SDK Libraries APIs.
Setting Side of Street Routing #
Side of street routing is disabled by default as it is not used by all customers. There are three ways to enable it and to set that additional distance within which CoPilot will search for a way to route to the appropriate side of the street:
- You can enable it globally by adding the following configuration to the CoPilot user.cfg file:
"RoutingSideStreetMileCostX1000" value, noted
in the table below, determines how far CoPilot will look for a viable route.
- You can
StopSideAdherenceLevelwhen you create a stop with StopBuilder.
- In CoPilot 10.14.0.325 or higher, you can set a
StopSideAdherenceLevelin a Vehicle Routing Profile in CoPilot SDK Libraries and CoPilot SDK.
Hierarchy for how these values will be used:
- If a StopBuilder stop is sent in with a
StopSideAdherenceLevel, that leg of the trip will operate with that
- If the StopBuilder has no
StopSideAdherenceLeveldefined, and the Vehicle Routing Profile does have a
StopSideAdherenceLeveldefined, CoPilot will operate with that level.
- If neither the stop nor the routing profile sets an adherence level, you can set the user.cfg value
“RoutingSideStreetMileCostX1000”as the default value for any profiles that do not have a value sent.
For side of street routing to be used, it must be a two-way road. A one-way road using side of street information would break the routing logic, as there is only one direction that you are able to use to arrive at an address on a one-way street.
CoPilot will calculate a route based on the routing profile set in CoPilot. It will also take into account the degree of strictness defined by one of the methods above—the
StopSideAdherenceLevel or the user.cfg value under “RoutingSideStreetMileCostX1000”. The value set for the side of street routing is likely to have a significant effect on the routing. Details of the compliance levels can be found below:
|Setting||Description||SDK Libraries Value||SDK App Value|
|Off (Default)||Will not reroute according to side of the street.||SIDEOFSTREET_OFF||0|
|Minimal||Will increase the route by up to a maximum of ¼ mile to avoid ending up on the wrong side of the street.||SIDEOFSTREET_MINIMAL||250|
|Moderate||Will increase the route by up to a maximum of 1/2 mile to avoid ending up on the wrong side of the street.||SIDEOFSTREET_MODERATE||500|
|Average||Will increase the route by up to a maximum of 1 mile to avoid ending up on the wrong side of the street.||SIDEOFSTREET_AVERAGE||1000|
|Strict||Will increase the route by up to a maximum of 5 miles to avoid ending up on the wrong side of the street.||SIDEOFSTREET_STRICT||5000|
|Adhere||Will increase the route by up to a maximum of 10 miles to avoid ending up on the wrong side of the street.||SIDEOFSTREET_ADHERE||10000|
|Strong Adhere||Will route the driver by any possible means to reach the correct side of the street.||SIDEOFSTREET_STRONGADHERE||1000000|
Please note, only the values provided in the table above should be used for side of street routing.
For example, if the value is set to SIDEOFSTREET_STRONGADHERE, this is the strictest level of compliance to ensure that a driver does not end up on the wrong side of a street. If the side of street can be determined, then CoPilot will look for alternate routes to reach the destination on the correct side. This may extend the route significantly.
There are a number of factors which CoPilot will take into account:
CoPilot will take into consideration if the side of the street is known. If it is, CoPilot will provide a detour within the limits of the adherence value. The application of this penalty will encourage CoPilot to look at alternate routes to route to the correct side of the street. If the alternate routes increase the distance too much and there is no plausible path to the assigned side of the street without exceeding the configured limit, CoPilot will route to the wrong side of the road.
Geocoding - Determining Side of Street #
Side of the Street routing requires accurate geocoding to allow CoPilot to identify the correct direction the address should be approached from. If CoPilot cannot identify the side of the street, or has conflicting information, it would be unwise to increase the driver’s route in situations of uncertainty. The side of the street is determined from the address details or latitude/longitude coordinates that are provided when geocoding a destination.
If only the address is provided, CoPilot will look to identify the side of the street for that specific address. If there aren’t enough address details for CoPilot to identify which side of the street the destination is on, it will not use the side of street logic to route to the destination.
When using coordinates to geocode an address, a threshold distance is used to determine the side of the street for the address. Currently, this threshold is set to 10 feet. Once the lat/long provided identifies the road segment that it relates to, if the distance between the road and the lat/long is over 10 feet perpendicular to the road, CoPilot assumes a high level of confidence in the side of the street accuracy. If the lat/long is under 10 feet from the identified road segment, CoPilot will not provide side of street routing due to a low level of confidence.
The distance of greater than 10 feet is used to determine a high level of confidence because a distance of less than 10 feet is more easily confused with the other side of the street.
When both the address and coordinates are provided, CoPilot will use both to independently identify the side of the street to which it believes the user is trying to navigate. The result will determine if side of street routing will be used. There are four possible outcomes:
- Two matching side of street results. In this scenario, both the address and the coordinates provide the same side of the street. CoPilot should use this information to provide side of street routing within the defined routing parameters.
- Conflicting side of street results. If opposite side of street information is returned from the input address information, CoPilot will not use side of street routing. A configuration setting was introduced in CoPilot 10.9.0.1180 that can be set to favor one result or the other in these cases. (See below)
- One success, one no result. If one of the inputs provides a side of street and the other input does not return a side of street, CoPilot will use the side of the street that has been identified.
- Two no results. If neither the coordinates or address can identify the side of the street for the address, CoPilot will not use side of street routing.
Side of Street ‘Tiebreak’ Configuration #
Feature Available in CoPilot 10.9.0.1180 and Higher
By default, CoPilot will only use the side of street for routing purposes if the side of street from the coordinates and address match. If these values do not match, side of street will not be taken into account while routing.
If you would like CoPilot to choose one over the other when these values do not match, you can add the following configuration to the CoPilot user.cfg file:
[User Settings] "SideOfStreetMatchType"=0
If the config value is set to 1 (prefer address) CoPilot will use the side of street that was determined using the address. If the value is set to 2 (prefer coordinates), CoPilot will use the side of street that was determined using the coordinates.
For example, a config value of 1 (prefer address) allows you to set the exact location of the stop using coordinates, but also use the address to determine the side of street.
The example below demonstrates how the side of street tiebreak configuration can work using two houses on opposite sides of the street—“14 John Dr” and “15 John Dr”. In this case, we are routing to the same coordinates but using the address to determine the side of street.
Below is the route for 15 John Drive.
Below is the route for 14 John Drive. As you can see, the coordinates we are routing to stay in the same place, but we route so that the stop is always on the right side of the street.
CopilotMgr.setConfigurationSetting(ConfigurationSetting.create(ConfigurationSetting.SIDE_OF_STREET_MATCH_TYPE, ConfigurationSetting.PREFER_ADDRESS)); double latOrigin = 39.769464; double lonOrigin = -75.067845; double latDest = 39.767826; double lonDest = -75.068576; String addressSideA = "15 John Dr"; String addressSideB = "14 John Dr"; Stop originStop = StopBuilder.fromLatLon(new Coordinate(latOrigin, lonOrigin)).geocode(GeocodeSearchType.BEST_MATCH).get(0); Stop stopSideA = StopBuilder.fromLatLon(new Coordinate(latDest, lonDest)).setSideOfStreetAdherence(StopSideAdherenceLevel.STRONGLY_ADHERE).setStreetAddress(addressSideA).geocode(GeocodeSearchType.BEST_MATCH).get(0); Stop stopSideB = StopBuilder.fromLatLon(new Coordinate(latDest, lonDest)).setSideOfStreetAdherence(StopSideAdherenceLevel.STRONGLY_ADHERE).setStreetAddress(addressSideB).geocode(GeocodeSearchType.BEST_MATCH).get(0); StopList slSideARouting = new StopList(); slSideARouting.add(originStop); slSideARouting.add(stopSideA); StopList slSideBRouting = new StopList(); slSideBRouting.add(originStop); slSideBRouting.add(stopSideB); RouteMgr.addStops(RouteEnums.AddStopPurpose.NEW_TRIP, slSideARouting, RouteEnums.RoutePreviewMode.PREVIEW_TRIP_MAP); double dRouteDistSideARouting = RouteMgr.getRouteLegs(false).get(0).getDistance(); RouteMgr.removeAllStops(); UIMgr.showDialog(UIMgr.Dialog.MAP_NAVIGATION_VIEW); RouteMgr.addStops(RouteEnums.AddStopPurpose.NEW_TRIP, slSideBRouting, RouteEnums.RoutePreviewMode.PREVIEW_TRIP_MAP); double dRouteDistSideBRouting = RouteMgr.getRouteLegs(false).get(0).getDistance(); RouteMgr.removeAllStops(); UIMgr.showDialog(UIMgr.Dialog.MAP_NAVIGATION_VIEW);
Discussion Points #
- When the side of the street for the destination has been identified, CoPilot will always be able to route to that side of the street. #
Once the side of the street is known, the only limiting factor will be the distance CoPilot will detour to return to the address on the correct side of the street. For example, if this configuration was set to Strongly Adhere, CoPilot would always find a detour. The route calculation time, route distance and travel time for this journey may increase dramatically.
- CoPilot will only use distance as a penalty, never time. #
Time will never be used due to time and distance not being consistent in different environments. A detour of 2 miles in a rural setting may only take 7 minutes, yet in a city center such as London or New York, their delay is likely to be double or triple the time. If there is also traffic present, it is possible the time taken increases even more. Within the current implementation only one configuration is available across all environments. This should be taken into consideration when selecting the configuration value.
- CoPilot u-turn cost must be set to an appropriate distance. #
CoPilot offers the ability to customize the acceptable detour distance before CoPilot will request the driver makes a u-turn. The appropriate setting of this cost is essential to the side of street logic.
For example, if the u-turn cost is very low, e.g 200m and CoPilot is approaching from the wrong direction, it may navigate the driver to the address, continue past the address by 200m and request the driver makes a u-turn. This would occur if there is not an alternative route available that increases the distance by less than 200m and navigates the user to the appropriate side of the road.
- When using Side of Street routing, CoPilot may use lower class roads to ensure the address is approached from the correct direction. #
This should be noted for truck customers. If a high threshold level is defined, it increases the likelihood of a lower class road being used. CoPilot favours different roads depending on the vehicle type. If the optimal route is not being used and side of street routing enforces CoPilot to seen an alternate route, CoPilot may start to use lower classes of roads. CoPilot Truck may also not use the shortest road, if there are alternates available that are more suitable.
- If the map data does not include the address numbers found on the different sides of the street. CoPilot will be unable to use Side of Street routing with the input of an address. #
If the address is passed with a lat/long due to the address numbers not being held, CoPilot will rely on the lat/long providing the side of street. There is a dependency on the data having the information available to allow for side of street routing.
- Accurate use of Coordinates to identify the side of the street will identify the side of the street even if it is not held within the address data. #
Coordinates will provide the side of the street requested based on the distance between the coordinate and the identified road segment. As a result the map data does not require specific address details for the side of the street as it is not using the address, instead it is using the geographical location of the coordinate. This relies on the lat/long being 10 feet away from the road, if a lat/long is provided and gives the location of the road, side of street routing will not be used.
Example Scenarios #
A number of examples have been included below. The aim of these scenarios is to illustrate how side of street routing would work and the types of routes that would be returned.
Scenario 1: Same Road, Opposite Side #
This example shows how CoPilot has identified the side of the street that the destination is on. It has then looked to reroute CoPilot to navigate around Ettl Circle and increase the distance of the trip before navigating the driver to the correct side of the street.
In this example, we can see how by using the side of street routing, the distance required to travel has increased significantly.
Scenario 2: Same Road, Same Side #
In the scenario above we can see that the origin of a trip and the destination are on the same side of the road. CoPilot has identified the side of the street for the address and provided a route. Despite side of street routing being introduced, we still see that CoPilot provides the shortest route and will not increase the length of the route without the specific need.
Scenario 3: Same Road, Opposite Side (Urban) #
Above we can see an example where the destination is on the opposite side of the road from the start point. Leaving the starting point at the bottom of the image, the route continues north towards 695 Pennington Avenue. Where CoPilot would usually continue to take the higher class road towards the destination, the side of street logic directs CoPilot down onto some local streets to arrive at the destination. This results in CoPilot navigating the driver to the destination and removes the need to cross over the road.
In relation to this scenario, discussion point 4 is relevant. In this example, we see a lower class road being used. This may be deemed unsuitable for a larger vehicle, in scenario 3 we see the route navigate from the image labeled 1 below, through a smaller, more residential area as seen in image labeled 2.