The innards of route finders
We’re going to Lahti tomorrow for a concert in the Sibelius Hall. Since neither one of us has the foggiest idea where it is, we decided to use a mapping service to show us the route.
The route is (hopefully) OK, but there are some oddities that you have to be a programmer to understand. It all has to do with the internal model of how the roads are mapped in the program logic. The image on the right is a small snippet of the whole route. We are coming from the bottom and heading for the top. In this case the directions say (withou road names):
- …drive along road for some while
- turn left onto small road for 21 metres
- turn right onto road for quite some while…
The oddity is turning onto the small road for the 21 metres, as seen in the map as the part that crosses larger road. The small road is the one entering from the right. This image shows what I believe to be how the roads and their intersections are modeled in the system:
Update 17.2.2005 15:25 Passing through the place, the smaller road isn’t even noticeable. Another route finder creates a different route with much simpler directions. Ramps and such aren’t dissected. Although traffic circles cause problems with…
As you can see, the road the route follows doesn’t directly intersect with the larger road but connects to the smaller road for a while. Thus, we have the odd 21 metres on the smaller road in the directions. Ramps and such make the directions even odder, but they are harder to illustrate.
Sometimes it’s just so funny how the internal logic of a program is revealed to all of the users. Completely unintentionally I’d presume. I know that I’ve also been guilty of the same practise. In web applications, good URL design is one way to hide implementation details from the end user – bad URL design is exactly the opposite.