A Beginners Guide to 3D Geospatial AI – How to Create a 3D Map showing Flood Predictions for San Francisco
Matt Sheehan
Demystifying the convergence of Geospatial, AI, and Spatial Computing ~ Unlocking geospatial's potential at Versar
So I have been writing a series of introductory, technical articles with a Geospatial 2.0 focus. By that I mean combining new geospatial data (in our case Sentinel satellite data), Geospatial AI (AI agents and AI models; notably Prithvi).
So why do this?
I have a commercial focus, but have been most effective in my various roles by having an understanding of the technology. So this is part of my learning process, a process I thought worth sharing with you.
What have we covered so far?
I had originally not planned to write an article series, but after completing the first post, I realised more meat was needed on the bones. This will be article number 5. Geospatial AI is complex, so throughout this series I have used a restaurant analogy. Generative AI, specifically ChatGPT, DeepSeek and Grok, helped me flush out my thoughts.
In article 4, I pulled many of the pieces together and showed how to use Sentinel data, and process it with geospatial AI to predict areas of flood risk in New Orleans. I shared the code. As with this example, if you wish to run the Python code use Google Colab.
3D Geospatial AI
So what is the logic behind writing this article?
I harp on about 3D as being a key part of Geospatial 2.0. So far all of our output has been 2D maps. I wanted to see if we could output a 3D map. Grok has proven to be an amazing generative AI tool to help flush out the python code required.
So what have we done differently here to what I shared in our last post? We have leveraged Cesium. I took the same core code base, and output an html file which uses the Cesium API.
Below I have shared a zip file which includes both the python and the html it produced. Now one key thing to note, and you will see this in the animation above, in 2D (see article 4) validating the models output was visually challenging, in 3D that is far easier. For San Francisco at least, I have questions about the accuracy of the models output. Further investigation needed.
So why publish this article given what I suspect in terms of accuracy?
I am more interested in sharing the process, in other words the pieces of the puzzle. Troubleshooting the model is a deeper dive, one we will save for another day.
As mentioned the code is shared below. Note, you will need to have api access to the data and Cesium (both free). The html file must be run from a web server; in my case that is https://127.0.0.1:8080/San_Francisco_Water_Map_3D_share.html
So are we now done?
Well, as I mentioned at the start, this series seems to have taken on a new life of its own. I have one more article planned, very ambitious but hugely relevant to the long term future of geospatial, and that is blockchain. My goal is to take the output of the geospatial AI analysis (a set of polygons you will see in the html file) and store them on the blockchain.
The fun never ends!
Try this Yourself
Link to zip containing the code here.
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.
Thanks for sharing, Matt!