• Posts
  • Spatial Lab
  • Modern GIS Accelerator
  • The Spatial SQL Book

Get the newsletter

Join 71,000+ geospatial experts growing their skills and careers. Get updates on the most cutting edge updates in modern GIS and geospatial every week.

Edit Content
  • LinkedIn
  • YouTube
Uncategorized

PostGIS and QGIS in 4 minutes

December 15, 2021 Matt Forrest Comments Off on PostGIS and QGIS in 4 minutes

QGIS provides an excellent interface to get started with PostGIS, and (if you are a Mac user) you can start with PostGIS using Postgres.app very fast! Check out the video and follow along using this guide.

Download and install Postgres.app

First, head over to this site to download and install Postgres.app. This is a complete PostgreSQL database with PostGIS as well that is ready to use on your Mac.

Create a new database and install PostGIS

Next, you will need to create a new database. You can most likely use the standard settings but you can always customize if you want. Next, double click on the database you plan to use in the Postgres.app interface. This will open a terminal window where you can install PostGIS using this command:

CREATE EXTENSION postgis;

Do not forget the semi-colon! Once you run this, PostGIS will be ready to use.

Connect PostGIS to QGIS

Connecting your new database to QGIS is actually a really easy process! Just open Layer > Add Layer > Add PostGIS Layer. From there you can enter the details about your database and connect it.

Add data to your database

QGIS also provides great tools for you to add data to your database. Navigate to Database > DB Manager and then select your database. From there you can click on Import Layer/File… to add a layer from your QGIS project of a file on your computer.

Query your data!

Finally, you can start to query your data using the same DB Manager, and then adding layers as views or creating new tables!

Check out some other resources

If you are interested in learning more, check out this guide where I have my favorite spatial SQL guides and resources:

Learn Spatial SQL
40+ Spatial SQL Resources and Guides
One of the top questions I get asked is what my favorite resources are for learning any given topic, and spatial SQL is always near the top of that list It’s no secret that I am a big fan of spatial SQL (see my past posts on the topic). It’s speed, scale, and ability to analyze data is incredible and it has helped me solve complex problems that I never could have imagined before. All while giving me complete flexibility over my workflow. One of the challenges is that when you are learning a new toolkit in your geospatial stack,…
  • Modern GIS
  • Spatial SQL
Matt Forrest

Post navigation

Previous
Next

Search

Categories

  • Article (24)
  • Essay (1)
  • Podcast (3)
  • Tutorial (5)

Recent posts

  • Get Featured in the 2025 Geospatial Landscape Report (Submit Your Company Today)
  • Apache Sedona Tutorial: Scalable Spatial Joins and Geospatial Processing with Spark
  • BigQuery vs. Wherobots: What a 23-Second Difference in Spatial SQL Really Reveals

Tags

aggregations Apache Airflow Apache Iceberg Apache Sedona bigquery Cloud GIS Cloud Optimized GeoTIFF duckdb geoparquet geospatial gis Modern GIS postgis Python snowflake Spatial SQL sql zip codes

Related posts

Article

Scaling GIS Workflows with COGs, Airflow, and Apache Iceberg

April 25, 2025 Matt Forrest Comments Off on Scaling GIS Workflows with COGs, Airflow, and Apache Iceberg

TOP OF THE STACK What we need to do with COGs COGs (Cloud-Optimized GeoTIFFs) are one of the most promising tools we have for making raster data truly cloud-native. They let you stream just the pieces you need, work remotely, and plug into modern geospatial systems without downloading giant files. But after working closely with […]

Article

From Desktop GIS to Cloud: A Beginner’s Roadmap to Modern GIS Tool

March 7, 2025 Matt Forrest Comments Off on From Desktop GIS to Cloud: A Beginner’s Roadmap to Modern GIS Tool

Modern GIS is changing fast. If you’ve been working with QGIS, ArcGIS, or any other desktop GIS tool, you’ve probably hit some limitations—datasets getting too big, processing times slowing down, and collaboration becoming a challenge. The good news? The cloud offers a way forward. But how do you make that transition? How do you go […]

Article

The Top 11 Open GeoParquet Datasets: Making big geospatial data easy

January 18, 2024 Matt Forrest Comments Off on The Top 11 Open GeoParquet Datasets: Making big geospatial data easy

In the dynamic field of geospatial technology, the evolution of data formats plays a pivotal role in shaping how we interact with and interpret spatial information. The advent of GeoParquet has marked a significant milestone, offering a more efficient and accessible way to handle large spatial datasets. This blog post delves into a comprehensive exploration […]

Spatial Lab
  • Join the Spatial Lab community
Courses
  • Learn Modern GIS with courses and certifications
Spatial SQL
  • Get the Spatial SQL book today
Join Us

© Matt Forrest 2024. All Rights Reserved.