Open any map app, tap a point on the screen and the app instantly tells you which country, county or postal district you're in. That instant answer rests on a solved algorithmic problem called point location.
The setting is a planar subdivision: the plane divided into a finite number of non-overlapping regions by straight-line edges. Think of a country map cut into states, a city cut into neighborhoods, or a game world cut into zones. Given any query point q, point location asks: which region contains q?
Naive search scans every region and tests whether q is inside — per query. For a one-off question that is fine. But a GIS system or game engine issues millions of queries against the same fixed map. With the right preprocessing the answer drops to per query — the same asymptotic cost as looking up a name in a sorted phone book — no matter how complex the map.
Comments
Loading comments...