Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Learning Open Source GIS: Spatial SQL w/ Postgres/PosGIS
Rating: 4.3 out of 5(118 ratings)
611 students
Created byArthur Lembo
Last updated 6/2023
English

What you'll learn

  • How to conduct spatial analysis with Postgres 11 and PostGIS
  • Traditional SQL statements
  • Spatial SQL statements
  • Creating spatial functions with SQL
  • How to create geographic models with SQL
  • PGAdmin IV to manage Postgres databases
  • QGIS Database module to manage Postgres databases
  • Join multiple tables together

Course content

7 sections25 lectures4h 46m total length
  • Introduction4:30

    Before we get started, you'll want to know what this course is all about, and in this lecture we are going to go over the goals and objectives, along with the expectations. 

    Make sure to download the files in the downloadable materials section.  This includes all of our data, along with the lecture notes so that you can copy/paste the SQL commands. 

  • Installing Postgres 115:55

    In this lecture you'll download postgres and install it on your local computer.

    Simply follow the video to download the software, and remember - Postgres will require the PostGIS extension included with the Stackbuilder.  Also, please make sure to note the username and password you enter (we recommend using postgres / postgres respectively. 

  • Installing QGIS 3.82:31

    In this lecture you'll download QGIS and install it on your local computer. The current directory for downloading QGIS is located at https://qgis.org/en/site/forusers/download.html

    Simply follow the video to download the software, and remember - QGIS is big! This is going to take some time to complete.

  • Our Data5:32

    --> MAKE SURE TO DOWNLOAD THE TOMPKINS.ZIP FILE IN INTRODUCTION SECTION --->

    We're not going to use some small, lame, "everything works perfectly" , training data set.  That's not realistic.  When you take a training course with small, perfect data, you won't have the necessary skills to apply your use of Postgres and PostGIS in the real world.   So, we'll use a real data set of raster, vector, and attribute data from Tompkins County, NY.  This is data for a 900 square mile county, and includes hundreds of megabytes of data.   When you are done with this course, you'll have confidence to know that you can work with your own data.

    To better understand the tasks ahead of us, we'll have a look at our data so that you understand the context of the different types of GIS processes we'll perform with Postgres.


    Make sure to download the tompkins.zip file and place that in a directory called c:\training\tompkins\  Like all of the courses in the Learning the FOSS4g Stack, we'll introduce you to the data set we'll be using. 

  • Loading our data11:50

    Because Postgres is a real enterprise class database, it doesn't work like a small time windows based application. This makes it very robust.  But, it also makes it a little more complicated at the outset.  The data is actually stored within the database, and accessible via an IP address (we'll be using 127.0.0.1).  The cool thing is, of course, is if you have a real server, you can expose that IP address to the outside world, and have users access the data remotely. 

    So, naturally, there will be some preparatory work to get this ready.  In this lecture, we'll load the data, and then check to make sure everything worked.

  • Important!!! - Fixing the .qgs file if you cannot connect to Postgres2:33

    If you try and open the pg_qgs.qgs or pg_qgs.qgz file, you may get an error. That is most likely due to the fact that I created the .qgs file using a different port connection than what you set up.  This can be frustrating.  But, it is an easy fix.  You simply have to modify the port number in the qgs file.  This short lecture will show you how to do that.

  • Setting up our system6:23

    One our data is in the database, we can start accessing it with different applications.  For this class, we'll use QGIS to access the  data.  However, we could just as easily have used ArcGIS, ArcPro, Manifold GIS, MapInfo, or a whole host of other products.  So, for this lecture we'll connect QGIS to our database and start visualizing the data. 

Requirements

  • Understanding of what a database is
  • Some exposure to GIS operations
  • Comfortable with using GIS software

Description

This course is part of an entire curriculum based on Free and Open Source GIS (FOSS4g) software, and represents one of the most comprehensive curriculum on FOSS4g. The curriculum are grouped into the categories of Desktop, Server, and Developer parts of the FOSS4g stack. For this course, you will learn the most popular open source database: Postgres 11. We'll start with a basic understanding of Postgres, introduce PostGIS as a spatial plug in, and begin to solve spatial problems using SQL. 

This course uses real data from Tompkins County, New York, and seamlessly integrates with other gisadvisor courses that will teach you QGIS, GDAL, Geoserver, and Python. You'll be working alongside me as we explore the capabilities of SQL, working with raster, vector, and attribute data. And most importantly, after you learn SQL and spatial SQL you willl simulate some real-world examples of GIS projects and spatial analysis.

Whether you need to learn SQL within Postgres and PostGIS for your job, or want to get spun up on FOSS4g to nail that big interview, this course will prepare you to work with the ins-and-outs of SQL and spatial SQL, and give you confidence as you interact with other GIS experts.

The curriculum is designed so that you can start with either this course, or any of the other courses. They will refer back and forth with one another, and because we are camping out in the same geographic area, all the courses will use the same data. As you move through each course, you are going to have experience with all the different parts of the FOSS4g stack.

Who this course is for:

  • GIS professionals excited to add open source software to their skillset.
  • Computer analysts looking to expand their skill into the open source GIS arena.
  • Students who want to learn what a SQL is, and how it can be used to solve spatial problems.
  • Professionals who know how to use other GIS software, but want to learn how to use SQL to solve problems.
  • Data analysts looking to integrate spatial solutions to their problem solving capabilities.