MGMLaboratory
Back

Menu

01Home
02About Us
03Projects
04Publications
05Member
06Articles
07Contact

Let's Talk

Open in Mail app

Socials

Malang (ID) --:--Privacy PolicyTerms of Service

October 24, 20232 min read

Cutting the Points That Slow Down a Route FinderCutting the Points That Slow Down a Route Finder

Simplifying route geometry before the search can cut processing time by four fifths.

  • Conference
  • Publications

Written by

  • SRShirasaka RenIT & Infrastructure · Student Member

In this article

  1. 01Two algorithms, one pipeline
  2. 02Why it matters

Public transport apps promise to find you a route in seconds. Under the hood, many of them run Dijkstra's algorithm, which walks through a network of stops and connections looking for the shortest way from A to B. It is reliable and well understood. It is also slow once the network gets big, because it keeps looking at every option it can reach.

A weighted graph of the kind Dijkstra's algorithm searches. Image: Bensterbenk, CC0, via Wikimedia Commons.
Fig. 01A weighted graph of the kind Dijkstra's algorithm searches. Image: Bensterbenk, CC0, via Wikimedia Commons.

A team at Universitas Brawijaya asked a different question. What if the network were smaller before the search even began? Their answer was to run the Douglas-Peucker line simplification algorithm over the route geometry first, thinning out the points that add detail without adding meaning.

01/02

Two algorithms, one pipeline

Douglas-Peucker takes a line and drops points that sit very close to the straight line between their neighbours. What survives is a coarser shape that still follows the original path. Fewer points means fewer nodes for Dijkstra to work through.

  • The simplification step costs a little on its own: 0.5% extra memory and 5.13% extra processing time.
  • In exchange, the overall memory footprint fell by 72.56%.
  • Overall processing time fell by 80.83%.
Dijkstra's algorithm expanding outward from a start node. Image: Ibmua, public domain, via Wikimedia Commons.
Fig. 02Dijkstra's algorithm expanding outward from a start node. Image: Ibmua, public domain, via Wikimedia Commons.

The paper also checks that the drawn route still looks right. Aggressive simplification can turn a curving road into a straight line that cuts across buildings, so the authors tuned the process to keep the displayed path reasonably consistent with the real one. The visual cue survives, which matters because a route line that ignores the road is worse than a slow one.

02/02

Why it matters

Route finding is a feature users notice only when it is slow. Shaving four fifths off the processing time is the difference between a map that responds while you type and one that makes you wait. The overhead is paid once per simplify operation, while the savings apply to every search that follows.

Angkot on a Malang street. Image: Annidafattiya, CC0, via Wikimedia Commons.
Fig. 03Angkot on a Malang street. Image: Annidafattiya, CC0, via Wikimedia Commons.

Source

  1. Pinandito, Kharisma, and Akbar (2023). Improving Route-Finding Performance of Dijkstra Algorithm and Maintaining Path Visual Cue Using Douglas-Peucker Algorithm. Proceedings of the 8th International Conference on Sustainable Information Engineering and Technology.

    DOI10.1145/3626641.3626941 (opens in a new tab)

Next articleDesktop, Mobile or Web: Timing the Same Accounting Task Three Ways(Keep scrolling)(Read it next)(Loading)