← Blog

How CityWalker calculates coverage

Your coverage percentage is a single number, but it is built from many small pieces. Here is what a segment is, and the math that turns them into the figure on your map.

A city, sliced into segments

CityWalker does not treat a street as one long line. The moment a city is on your device, every street is split into short pieces, each around 15 metres long. Each piece is called a segment.

A segment is the smallest unit of progress in the app. It is a short stretch of street with a start point, an end point, a length in metres, and one state: walked, or not walked. A city is made of many thousands of these pieces.

Why split streets up?

CityWalker could have tracked whole streets, marking a road done once you have walked it. But streets vary wildly in length. A short side street and a long main road would each count the same, which does not reflect the walking involved.

Progress would also be all-or-nothing. Walk half of a long street and it still would not count, because the whole street is not finished. Segments solve this. Walk half of it and half of its segments flip to walked. Your progress moves the moment you cover new ground, not only when you complete an entire road.

This length works well. Short enough that you are credited for the exact stretch you covered, long enough to keep the rendering fast.

Turning segments into a percentage

Each segment has its own length in metres. This matters. Your coverage is not a count of segments. It is based on distance.

To calculate coverage for a city, CityWalker adds up two numbers:

The coverage is:

coverage % = walked metres ÷ total metres × 100

Because it is weighted by distance, every metre of street counts the same. A small back-alley contributes the same per metre as a main road. Walking one long street moves the bar by the same amount as walking several short ones that add up to the same distance.

Regions get their own number

Large cities are split into regions. The same calculation runs for each one: walked metres against total metres, counting only the segments inside that region. That is how each region shows its own percentage next to the city-wide one. The math is the same. Only the segments being counted change.


One thing this post does not cover: how a segment actually flips from not-walked to walked. That is the work of matching your GPS trace against the right pieces of street. A different story, for a later post.

Questions, or something not adding up on your map? Email me.