Ep 10: Measuring quest progress
Lately, I've been enjoying taking more walks around nearby neighbourhoods: running little errands, visiting friends and picking up books from the local library. Gogomi, my 'sauntering assistant', has been tracking these walks pretty well. It sends notifications to my phone whenever I check out unexplored roads—well, most of the time. There's still the occasional edge case or bug to iron out, but hey, it's a work in progress!


While Gogomi does a great job tracking my walks on new terrain, I realized it could be even cooler if it gave me a sense of overall progress. Recently, I set myself an ambitious goal: to walk all of Vancouver. And this led to an interesting question: how could I measure my progress on this quest? More specifically, how much of Metro Vancouver's road network have I actually covered?
Breaking it down
To tackle this challenge, I decided to break down the vast expanse of Metro Vancouver into its constituent cities (Vancouver, Burnaby, New Westminster, etc.) and examine all neighbourhoods within each city.
This approach requires processing a substantial amount of geospatial data, so I'm starting 'small' with just the city of Vancouver and its neighbourhoods. Fortunately, the city provides this information on their website, including the geospatial data for neighbourhood boundaries. I downloaded their GeoJSON files and ensured all map projections were consistent with the rest of Gogomi's framework.

Calculating Road Coverage
With the polygons for each neighbourhood defined, I was one step closer to tracking my progress. Since my quest is to walk all the roads, the next step was to gather information about the road network within each neighbourhood.
OpenStreetMap proved to be an excellent source for this data. It's a crowdsourced project that provides comprehensive geospatial information and has contributed significantly to advancements in consumer geospatial technology.
I wrote some functions to extract the geometries of all road segments in a given region (from OpenStreetMap). For example, when applied to the 'Mount Pleasant' neighbourhood boundary, the result looks like:

With the road network geometries in hand, integrating this data into Gogomi became straightforward. I can now perform spatial comparisons between the road geometries and my walk paths (stored as buffered linestrings in a database). This allows me to calculate the overlap and approximate how much of each road I've covered.
And based on specific thresholds I define, Gogomi can label a road as 'covered'. For instance, a road might be considered 'covered' when some part of it overlaps with my recorded walks. This flexible approach allows for fine-tuning what 'coverage' means.


It may not be the most precise method, but I think it makes a great approximation. I've set up Gogomi to run this progress calculation automatically each time it detects a new walk, incrementally storing the updated coverage results for each neighbourhood in the database

To make checking my progress even easier, I created a new Siri shortcut. It fetches this coverage information and displays it in a convenient pop-up. Here's what it looks like:

Mm! I'm so close to covering half of the main road network in Downtown. Seeing the stats motivates me to 'make number go up', haha. Of course, to verify this system works, I need to test it in the real world.
Real-World Test
I took a walk Downtown earlier today, specifically targeting some unexplored parts of Coal Harbour, and Gogomi picked up on them! My phone buzzed and:

The coverage calculation is working as intended. It says I covered 1.22% more of Downtown's road network on this walk, excellent!
Conclusion
Gogomi can now track my coverage across all neighbourhoods in Vancouver. As these individual areas add up, it'll give me a comprehensive view of my progress for the entire city. This is a major milestone for my project — noice!
Moving forward, I'm excited to explore more of Vancouver's streets and watch my coverage percentages climb. Who knows what interesting places I'll discover along the way?