π†πžπ¨π¬π©πšπ­π’πšπ₯ π€πˆ π€π πžπ§π­π¬ & π€πˆ 𝐌𝐨𝐝𝐞π₯𝐬: 𝐀 𝐒𝐒𝐦𝐩π₯𝐞 π„π±πšπ¦π©π₯𝐞

Okay, so I wanted to extend our first article on AI agents and AI models and take a very gentle technical deeper dive.

Let’s ask a very simple geospatial question:

“What’s the straight-line distance between the Eiffel Tower and the Louvre Museum?”

Here is the python code we can use to answer this question (note, to use this code .. right-click on image .. save as .. and save the image locally .. next drop this into ChatGPT and use this prompt: Can you pull the python from this image and give me that code):

To help explain what is happening here, let’s refer back to the analogy we used in our previous article.

How It Works

Agent (Waiter Role): The geospatial_agent function acts as the coordinator:

  • Takes a natural language query (locations as strings).
  • Delegates tasks to specialized “chefs” (geocoding and distance models).
  • Returns a human-readable answer.

Geospatial Models (Chefs):

  • Geocoding Model: Uses geopy.Nominatim to convert text addresses to coordinates.
  • Distance Model: Uses geopy.geodesic to calculate accurate distances between coordinates.

Infrastructure: Free OpenStreetMap APIs (no API key required for small-scale use).

If you wanted both the simple text answer (3.28 km) shown above, and an interactive map ….

Here is that code:

That is a nice gentle introduction. In our next post we will dive a little deeper, and move off the green runs to the blue!

In the next article in the series we dive a little deeper: Geospatial AI Agents & AI Models: Introducing Prithvi – A Real Geospatial Model

Matt SheehanΒ is a Geospatial 2.0 expert. He publishes a weekly Spatial-Next Newsletter which dives deeper into advances in the geospatial world, providing important news, opinions, new research and spotlights innovators. Subscribe to the newsletterΒ here.

Leave a Reply

Discover more from Spatial-Next

Subscribe now to keep reading and get access to the full archive.

Continue reading