Science Cafe Posts

Saif, SEES Earth System Explorer 2025

How I Made an AOI Route Planner—and How You Can Too

The Problem

You've got a list of AOI coordinates. Google Maps will show them to you, but it won't tell you the best order to visit them. If you’ve got more than a few points, this becomes a mess—guesswork, wasted time, and unnecessary backtracking. 

We need a tool that will plan the most efficient route for us instead of figuring things out ourselves. That’s what this does, here’s how: 

The Solution

This problem is a textbook example of the classic Traveling Salesman Problem (TSP):
How can we find the shortest route that visits each location (in our case, AOI coordinates) once and returns to the start?

Visualization of the TSP (left: map of points, right: solution) 

But with 37 points, that’s 37! (or 1.38 × 10⁴³) possible routes—more combinations than seconds since the Big Bang. Even at a trillion routes per second, it would still take over 400 billion years to check them all.

So instead, I used a two-step approach that generates a near-optimal solution in seconds:

First, a “Greedy Nearest Neighbor” algorithm: Start at one point, then repeatedly travel to the closest unvisited one (we determine what’s closest by using real driving distances from external routing APIs). Simple, but gives a solid starting draft.

Second, 2-Opt Optimization: Go through that first draft and iteratively (one-by-one) swap route segments if doing so shortens the overall distance. These small tweaks add up to a much shorter path. 

For this AOI, Greedy alone gave me a total drive of around 30.3 km. After running 2-Opt, that dropped to 26.7 km. That’s a 11.9% reduction!

While Greedy and 2-Opt don’t guarantee the perfect solution (nothing does at this scale), they’re fast, typically within 5–10% of optimal, and certainly better than the alternative of going through every point North-to-South East-to-West (which, in my case, would’ve been ~40% longer).

Bringing it to Life

To get started, I prompted different LLMs to build a working version of the tool. I outlined exactly what I needed: upload coordinates, calculate real driving distances, and optimize the stop order. I tried both Bolt.new and Lovable, then picked the one that got closest to what I had in mind.

For those interested in prompting, here’s the exact one I used to generate the MVP. 

From there, I used GPT-4o to clean up the interface and add some useful features—like opening the route directly in Google Maps, removing individual stops, and including public WiFi locations (now optional).

Afterwards, I deployed the tool using Netlify. It connects directly to GitHub (which Bolt integrates with), auto-deploys changes, and runs a backend to fetch Google Places API data—all for free! You can try the app here: https://sees-route-planner.netlify.app

Final Thoughts

This wasn’t some genius-level project. It was just a clear problem, a few good tools, and the patience to figure things out.

That’s the real takeaway: if something’s broken or inefficient, you can fix it—fast—if you know how to work with what’s available to you.

Thanks to the SEES mentor team for giving this project a spotlight. If this comes out to anything, I hope it pushes someone else to stop waiting and just build.



​​​​​​​About the author, Saif is a rising senior from the Cedar Park, TX area. This virtual internship is part of a collaboration between the Institute for Global Environmental Strategies (IGES) and the NASA Texas Space Grant Consortium (TSGC) to extend the TSGC Summer Enhancement in Earth Science (SEES) internship for U.S. high school (http://www.tsgc.utexas.edu/sees-internship/). This guest blog shares the NASA SEES Earth System Explorers virtual internship in 2025.

More Blog Entries