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

January 1, 20212 min read

Making a Map Search Faster by Simplifying the Path FirstMaking a Map Search Faster by Simplifying the Path First

Cutting redundant points from a route made one map algorithm almost 88 times quicker.

  • Conference
  • Publications

Written by

  • SRShirasaka RenIT & Infrastructure · Student Member

In this article

  1. 01How RouteBoxer works
  2. 02What happened when points were removed

Map applications answer more questions than directions. A travel app also wants to know what sits near the road you are about to take, so it can suggest a restaurant, a fuel station, or a landmark. On an Android map, that surrounding area search is handled by an algorithm called RouteBoxer, and it has a scaling problem.

Map apps need the shape of a route, not every point. Image: Santeri Viinamäki, CC BY-SA 4.0, via Wikimedia Commons.
Fig. 01Map apps need the shape of a route, not every point. Image: Santeri Viinamäki, CC BY-SA 4.0, via Wikimedia Commons.

01/02

How RouteBoxer works

RouteBoxer receives a list of geographic points that describe a path, plus a distance to search away from it. It lays a grid of rectangles over the area that covers the whole path, then walks along the path and marks every rectangle the route passes near. The result is a set of boxes the app can query for nearby places.

The cost scales with the number of points it has to traverse. Feed it a recording from a phone that captured a coordinate every second, and the grid work becomes unacceptably slow.

Route searches cover an area around the path. Image: SatGuide, public domain, via Wikimedia Commons.
Fig. 02Route searches cover an area around the path. Image: SatGuide, public domain, via Wikimedia Commons.

02/02

What happened when points were removed

The researchers inserted a simplification step ahead of the search. The Douglas-Peucker algorithm redraws a path using fewer points while keeping its shape, discarding coordinates that sit close to a straight line between their neighbours. A curvy recorded track becomes a handful of well placed corners.

The measured effect was large. Simplification removed up to 99 percent of the points in a path. The original RouteBoxer calculation ran up to 87.8 times faster. Precision stayed above 92.6 percent, meaning the boxes still covered the route well enough to be useful.

The lesson generalises beyond this one algorithm. When a routine is slow because of how much it receives, the cheapest fix is often to send it less rather than to rewrite it.

Source

  1. Aryo Pinandito and Chandrawati Putri Wulandari (2021). Integrating Douglas-Peucker Line Simplification into Routeboxer Algorithm on a Map-Based Android Application. Proceedings of the 5th International Conference on Sustainable Information Engineering and Technology.

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

Next articleReading Time Is the Hidden Variable in Concept Mapping(Keep scrolling)(Read it next)(Loading)