Learning the FOSS4g Stack: Python for Geospatial
- 5.5 hours on-demand video
- 8 downloadable resources
- Full lifetime access
- Access on mobile and TV
- Certificate of Completion
Get your team access to 4,000+ top Udemy courses anytime, anywhere.Try Udemy for Business
- You will learn how to write basic Python scripts.
- You will also learn how to integrate Python packages that have GIS functionality.
- As a bonus, this course will also show how to use Arcpy, and integrate ArcGIS with FOSS4g.
- And you'll learn how to integrate SQL, PostGIS, and SpatiaLite.
- Students should be comfortable with computers and GIS software
- It would help if you've done a little programming, but even if you haven't we've got you covered. Students with Python experience can skip the introductory sections, and jump right to the spatial stuff.
If you are in the field of GIS, you're probably hearing everyone talking about Python, whether it's Arcpy in ArcGIS or special Python packages for doing things like geocoding. In this course I am going to show you how to write Python code to perform spatial analysis. The course isn't so much about learning Python, but rather how to integrate different spatial libraries within your Python code. Using the course videos, you will work alongside of me to learn how I go about cobbling together Python code and various packages to solve spatial problems. I'll provide you with all the data that I demonstrate in the course.
Of course, we'll have a brief overview of Python. But after the brief refresher, we will dive into using Python with Open Source GIS and commercial GIS software. Most courses only go over a single GIS program's use of Python. But in this class, you'll get exposed to all kinds of different GIS software products, and learn how to tie them all together with Python.
- Students who want to expand their geospatial skills to include Python programming.
- Students who want to learn how to integrate Python, QGIS, ArcGIS, Postgres, and cloud-based spatial data services togethe.r into a unified solution.
- Students looking to nail that next interview that requires you to know something about GIS and scripting.
In this section we are going to download QGIS 3.8. If you get a newer version, even better.
This lecture is going to give a brief overview of the data we'll be using for our course. Make sure to download the python.zip file, and then unzip it in a folder: c:\training\python
You'll have to restore the tompkins.backup file into Postgres if you wish to follow along with the coding.
In this lecture, you'll get introduced to Python as a scripting language. We won't be writing code just yet. For now, I want to describe the many flavors of Python and get you familiar with the interface. Also, I want to give us all a wake up call regarding some of the complexities when working with many different versions of Python.
Get ready. We're going to start writing python code - in this lecture, we'll stick to strings. The best thing you can do is follow along with the video, and then replicate the code. By typing it in yourself (rather than copy/pasting from a master copy), you are more likely to really pick up on the language.
We are going to write a very simple script to convert temperatures. This seems almost juvenile. But, even a simple program for temperature conversion requires us to interact with the user, introduce if/then statements, and also performing calculations. So, its a great jumping off point for the rest of our programming.
With python, and sqlite package, you can write a python script that will communicate directly with SQLite. That's pretty powerful stuff!
if you thought connecting to SQLite with python was impressive, wait til you see what comes next: adding spatial capabilities to SQLite with Spatialite. And, we can write a python script to not only perform impressive spatial analysis with SQLite, but we can also start interacting with the user.
Our last lecture introduced some interesting capabilities that numpy performs. For this lecture, we are going to tackle a very sophisticated mathematical concept: linear algebra. Don't panic, we aren't going to go deep. But, you'll see just how easy it is to perform matrix algebra for least squares adjustment - something we do a lot of in geospatial analysis.
This is probably what you've been waiting for: connecting to Postgres with python. And, not only are we going to connect to Postgres, we are going to start issuing PostGIS spatial commands to perform geospatial analysis. If you can do this, you are going to get noticed for your superior skills!
Not only can you connect to different libraries with python, but you can even connect to Microsoft Excel. And, if you can connect to Excel, you can integrate Excel functions with Postgres functions, with geospatial functions. It's going to start sounding redundant, but if you can do this, you'll really be seen as an expert in python.
Now we are going to expand our use of forms to Postgres! In this lecture, you'll learn how to create interactive forms with the user, and connect those forms with Postgres, allowing you to issue SQL and spatial SQL however you feel. You'll also notice that the codes is short, light weight, but very interactive. This will prove that you can create a Postgres/PostGIS form in a matter of minutes.