MapBees logoMapBees

Blog

Closest: give every hex to its nearest store by drive time

Pick your stores, depots or clinics on the map and Closest colors every hex of the city by the one you can drive to soonest, up to an hour away, with the roads in the same colors. Here is how to use it on Melbourne with seven starting hexes, how to read the result, and - honestly - what it is not: not an exact catchment, and blind to the way real catchments overlap.

Tool guideBeginner friendlyMelbourne example

Seven starting hexes across Melbourne, and which one every hex can drive to soonest

Closest gives every hex of the city to the starting hex you can get to soonest - by car, on foot, by bike or by transit - and adds up what each one gets. Pick your stores, depots or clinics on the map, choose how far is too far, and the map colors every hex, and the roads through it, by the one that gets there first.

Say a courier runs seven depots across greater Melbourne and delivers to pharmacies and hospitals, to bars, and to people living in flats and townhouses. Which depot should serve which suburbs, and how unevenly does the work fall? With Up to set to a 60-minute drive, Closest gives depot A, in the west, central Melbourne as well: 70% of the city's bars, 52% of its flats and townhouses and 38% of its pharmacies, drugstores and hospitals. Depot G, down the Mornington Peninsula, gets 3% of the pharmacies and 1% of the homes.

Closest

Melbourne, seven starting hexes, Driving, Up to 60 min: every hex in the color of the starting hex it can be driven to soonest, and the roads in the same colors. Map © Mapbox © OpenStreetMap.

When you would use it

Whenever several places share a city and people go to the one that is quickest to get to, Closest shows who that is, hex by hex:

Depots and deliveries

Which depot serves which suburbs, so every drop goes out from the one that gets there soonest.

Stores and branches of a chain

Which of your stores is the nearest for each neighborhood, and how many residents or homes each one is nearest to.

Clinics and services

Who is closest to which clinic, school or office - on foot, by bike, by car or by transit.

Gaps in a network

The gray Farther than row counts what no starting hex gets to within your limit: where a new place would fill a hole.

Your own list

Start from your stores in Market Share, or from a file of your own points that stays in your browser.

Before Split evenly

Closest shows the split the roads make; Split evenly shows an even one. The same starting hexes work in both.

How to use it, step by step

Closest is in the Divide tool, beside Explore, Territory and Market Share in the tool menu: pick Divide, then Closest in the menu right next to it.

Where to click

  1. Tool menu
  2. Divide
  3. Closest
  4. Pick on the map
  5. Driving
  6. Up to: 60 min
  7. Show closest
Divide has two sections; Closest is the second.
  1. Pick the starting hexes. Press Pick on the map and click once at each store, depot or clinic - 2 to 24 of them. Each click picks a starting hex and gives it a letter, A, B, C and so on. Or start from your stores in Market Share, or from your own points.
  2. Pick the travel mode. Driving, Walking, Cycling or Transit.
  3. Set Up to. How far is too far, from 5 to 60 minutes. Anything farther from every starting hex lands in the gray Farther than row.
  4. Pick the Totals. What to add up for each starting hex - residents, homes, places of any kind, your own data - as many as you like. They never change which hex is closest; the first one shades the map.
  5. Press Show closest. Each starting hex's travel times are measured live, and the map and the list fill in.

Every setting, in plain words

The Set up card for the Melbourne example: seven starting hexes, Driving, 60 minutes, three Totals.
  • Start from - where the starting hexes come from: clicks On the map, My stores from Market Share, or Your points from a file you added. In this example: On the map, 7 starting hexes.
  • Travel mode - how the minutes are counted: along the roads for driving and cycling, the paths for walking, and the timetables for transit. In this example: Driving.
  • Up to - the farthest a hex may be from its starting hex, 5 to 60 minutes in steps of 5. In this example: 60 min.
  • Totals - what each starting hex's hexes add up to. Combine adds several measures up into one. In this example: Drugstore + Hospital + Pharmacy, Bars & Nightlife, and Flat or apartment + Semi-detached / terrace / townhouse.
  • Divide inside - what gets divided: the box around the city, an area on the map, or one of your areas. In this example: the city's box.
  • Roads - above the card: Colored draws the roads in their starting hex's color over a paler fill, Gray draws them gray, Off hides them.

Reading the result

The top of the list says which starting hex is closest to the most of the first Total, and which to the least: A is closest to the most Drugstore + Hospital + Pharmacy (712), G to the least (55) - 13× as much. Then each Total for the whole city, and a row per starting hex with its amount, its share of all, and how many hexes it got.

The summary and the first three starting hexes. Each row is named after the starting hex's letter and the neighborhood most of its hexes are in.

The letter and its name

A · City of Brimbank: A's starting hex, named after the neighborhood most of its hexes fall in. G has no name: most of its hexes are outside every named neighborhood.

Amount and share

712 · 38% of all. Every hex counts once, so the shares of all the starting hexes and the gray row add up to 100%.

Hexes

How big its part of the city is. A has 12,509 hexes, F 3,972 - nearest is not the same as even.

Hexes farther than Up to from every starting hex are counted in the gray row at the bottom of the list, and drawn faint gray on the map. In Melbourne, 3,088 hexes are more than an hour's drive from all seven starting hexes, and they hold very little: 18 pharmacies, drugstores and hospitals and 1,664 flats and townhouses.

Farther than 60 min: what no starting hex gets to within the limit.

Hover any hex for its starting hex, how many minutes away it is, and its own amounts.

A hex near Glen Waverley: D's, 15 to 30 minutes by car, with 22 flats and townhouses and no pharmacy or bar of its own.

With Roads: Colored the streets take the color of the starting hex they run through, so the borders follow the road network rather than straight lines - closer in, you can see where one depot's roads hand over to the next.

Closer in, south-east Melbourne: the roads change color where one starting hex hands over to the next. The small dark red specks inside D's blue are hexes that went to F (see What Closest is not). Map © Mapbox © OpenStreetMap.

The Melbourne result, worked through

Melbourne, 7 starting hexes, Driving, Up to 60 min
Flats and townhouses in the city's box
564,736
Closest to A (west, City of Brimbank)52% of all
291,671
Closest to D (south-east, City of Greater Dandenong)20% of all
115,012
Closest to the other five together28% of all
156,389
Farther than 60 min from every starting hexunder 1%
1,664
A's share of the city's bars
70%

A's starting hex is in the west, yet the city's center falls to it: by car A gets there in the same 15-minute step as the others or sooner, and within a step the nearer one in a straight line wins. With the center come most of the bars and flats. A courier would give depot A more vans, or move a depot nearer the center.

How Closest decides, in plain words

  1. Each starting hex's catchment, in four steps. Up to is cut into four equal steps - 60 minutes becomes 15, 30, 45 and 60 - and each starting hex's catchment is measured at all four, by the travel mode you picked. A hex counts as inside a step when at least a fifth of it is.
  2. The smallest step wins. A hex goes to the starting hex that gets to it in the smallest step: one A gets to within 15 minutes and B only within 30 goes to A.
  3. A tie goes to the nearer one in a straight line, then to the earlier letter. Each starting hex always keeps its own hex.
  4. Past Up to, a hex no starting hex gets to goes to the gray Farther than row.

In GIS this is called a network Voronoi diagram, or network partitioning: the city divided by who is nearest along the roads, rather than as the crow flies.

What Closest is not

Not an exact catchment

Closest is a quick, honest picture of who is nearest, not a measured catchment for each hex. The minutes come in four steps, so with Up to at 60 a hex 16 minutes from A and 29 minutes from B is a tie, decided by the straight line - it can go to the slower one. A hex counts as inside when a fifth of it is. Where a catchment comes back in separate pieces, only its largest piece counts, so a few hexes can go to a farther starting hex - the small specks of another color you may see inside an area. Driving assumes typical traffic, not rush hour (Territory's Rush-hour shrink shows how much a drive loses at a busy hour). And the times are measured live each time, so a run next week can move a few hexes along the borders.

It ignores overlap - and overlap is how people really choose

Real catchments overlap. Someone halfway between two pharmacies uses both; people pick a store for its size, its brand or the habit of passing it, not only because it is a minute closer. The more correct picture shares each hex between the places people can get to, weighted by how attractive and how far each one is. Closest does not: every hex goes, whole, to one starting hex, and a hex one minute closer to A than to B counts entirely for A. For shared demand, use Market Share, which splits each hex's demand between your stores and your competitors' with the Huff model, or draw each place's own catchment in Territory and see where they overlap.

The data has its own limits too. Places come from Overture Maps (release 2026-08-19), and a place missing from the data is missing from the totals; flats and townhouses come from ABS Census 2021, and each hex's figure is an estimate for that hex. Treat Closest as a first answer to “who is nearest”, then check the borders that matter.

Take the result with you

  • Copy to Areas puts each starting hex's hexes in the Territory tool as an area, where each gets the full dashboard of residents, places and buildings.
  • GeoJSON downloads one shape per starting hex with its letter, name, hexes and totals; CSV downloads one row per hex: h3,closest,closest_name.
  • Share the map with the link button. The link carries the recipe - the travel mode, Up to, the Totals and the starting hexes picked on the map - and Closest is measured again when it opens; starting hexes from your stores or your points stay in your browser.

Closest or Split evenly?

Both are in the Divide tool and share the same starting hexes; they answer different questions.

Closest

Who gets to each hex soonest? The areas follow the roads, and their sizes are whatever travel time makes them - A got 52% of the homes here.

Split evenly

How do I share the city fairly? Every area holds about the same amount of what you pick, whatever the drive.

A common path is both: see with Closest how lopsided the nearest split is, then use Split evenly to draw areas that share the work evenly.

Open Melbourne's seven starting hexes by car

The whole idea, in eight lines

  • Closest gives every hex to the starting hex you can get to soonest, from 2 to 24 starting hexes.
  • By Driving, Walking, Cycling or Transit, with Up to from 5 to 60 minutes.
  • Totals add up anything that adds up - residents, homes, places, your own data - for each starting hex.
  • Melbourne, 7 starting hexes, 60 minutes by car: A gets 52% of the flats and townhouses and 70% of the bars.
  • Minutes come in four steps of Up to; within a step the nearer one in a straight line wins.
  • Roads drawn in their starting hex's color show where one hands over to the next.
  • It is not an exact catchment and ignores overlap; for shared demand use Market Share.
  • Copy to Areas, download GeoJSON or CSV, or share a link that measures it again.

Quick questions

What does Closest do?

It gives every hex of the city to the starting hex you can get to soonest - by driving, walking, cycling or transit, up to a limit from 5 to 60 minutes - and totals what each one gets: residents, places or homes. Hexes farther than the limit from every starting hex are counted apart.

Is it the same as a drive-time catchment?

No. A catchment is everything one place can get to in a time, and two places' catchments overlap. Closest splits the city with a hard line instead: every hex belongs to exactly one starting hex, the one that gets there soonest.

Does Closest count overlapping catchments?

No, and that is its main limit. Real customers split their spending between places they can get to, so a hex between two stores is shared. Market Share models that shared demand with the Huff model; Closest gives the whole hex to one starting hex.

How exact are the drive times?

Close, not exact. Up to 60 minutes is measured in four steps of 15, so a hex 16 minutes away and one 29 minutes away count the same; where a catchment comes in separate pieces only the largest counts; and the drive assumes typical traffic, not rush hour. Use it to see the shape of the city, not to promise a delivery time.

How many starting hexes can I use, and how far?

2 to 24 starting hexes, each in its own hex, and Up to from 5 to 60 minutes in steps of 5 for every travel mode. Melbourne in this example used 7 starting hexes and 60 minutes by car.

Can I start from my own list of stores?

Yes. Start from On the map, from your stores in Market Share, or from Your points - a file of your own points that stays in your browser. The first 24 become the starting hexes.

See it on a real map

Open Melbourne's seven starting hexes by a 60-minute drive, then move them, add your own stores or change the travel mode.

About the author

Tinkal Gogoi(LinkedIn profile, opens in a new tab)Founder & Location Data Engineer

Builds MapBees's location-intelligence pipeline end to end — census and Overture Maps ingestion, H3 hex scoring, and the map interface — and writes the methodology behind every number on the site.