# PostGIS: Free Open Source Spatial Database

Source: https://www.youtube.com/watch?v=e3XG_A2KUhg
Recap page: https://rapidrecap.app/video/e3XG_A2KUhg
Generated: 2026-01-23T09:04:23.403+00:00

---
## Quick Overview

The video demonstrates how to use Elestio to deploy a fully managed PostGIS spatial database instance on PostgreSQL, which is then connected to QGIS for visualizing and querying the spatial data, showing the entire workflow from cloud deployment to spatial analysis.

**Key Points:**
- The demonstration begins by deploying a PostGIS 3.6.1 instance via the Elestio platform, selecting the Netcup provider and a MEDIUM-2C-4G service plan (0:07-1:08).
- After deployment, Elestio sends an email confirming the service is ready and provides access credentials for both the Admin UI (PGAdmin) and the database root user (1:21).
- The user connects to the deployed PostgreSQL database using PGAdmin (2:10) and restores the provided 'nyc_data.backup' file into the 'postgres' database (3:11-3:30).
- Once data is restored, the user connects QGIS to the new PostGIS instance using the credentials obtained from Elestio (4:09-4:34).
- After connecting QGIS, the user visualizes multiple layers, including NYC neighborhoods, census blocks, streets, and homicide locations, demonstrating the successful integration of the spatial database with the GIS client (4:46-5:27).
- The video concludes by running a spatial SQL query in PGAdmin to count homicides per neighborhood, showcasing PostGIS's capability to handle spatial operations directly within the database (5:57-6:53).

![Screenshot at 0:08: The 'About PostGIS' documentation is displayed, outlining key features like Spatial Data Storage, Indexing, Functions, and Geometry Processing, which are the core capabilities being utilized in the tutorial.](https://ss.rapidrecap.app/screens/e3XG_A2KUhg/00-00-08.jpg)

**Context:** This tutorial guides users through setting up and utilizing PostGIS, an open-source extension for PostgreSQL that adds support for storing, indexing, and querying geospatial data. The demonstration uses the Elestio managed DevOps platform to quickly provision the database server, followed by using PGAdmin to load sample NYC crime and geography data, and finally connecting QGIS to visualize and analyze the spatial information.

## Detailed Analysis

The video provides a complete walkthrough of deploying a PostGIS spatial database using the Elestio platform and subsequently visualizing the loaded data in QGIS. The process starts at 0:00 with the presenter introducing the need for spatial database capabilities. At 0:08, the features of PostGIS are briefly shown via documentation. The deployment phase begins at 0:38, where the user navigates to Elestio, chooses PostGIS, selects a cloud provider (Netcup), region (Nuremberg), and a MEDIUM-2C-4G plan, finalizing the service creation at 1:20. Upon completion, an email confirms readiness, providing both the PGAdmin URL and database credentials (1:21). The user then logs into the Elestio dashboard to retrieve the database root credentials (1:35). Next, the user connects to the remote PostgreSQL server via PGAdmin (2:10) using the host, port, username ('root'), and password provided by Elestio (2:29). After successfully registering the server, the user follows the PostGIS documentation (3:03) to restore the sample data from an 'nyc_data.backup' file into the 'postgres' database (3:11). Following the successful restoration (3:37), the user opens QGIS (4:06) and establishes a new PostgreSQL connection using the same credentials (4:12). Once connected, the user loads several layers from the restored database, including homicide points, census blocks, streets, and neighborhoods (4:46). The visualization step shows the spatial data overlaid on the NYC map (5:07). Finally, the video demonstrates leveraging PostGIS spatial SQL functions within PGAdmin by executing a query to count the number of homicides per neighborhood geometry, proving the spatial data is accessible and queryable (5:57-6:53).

### Deployment via Elestio

- Selecting PostGIS service
- Choosing Netcup provider and MEDIUM-2C-4G plan
- Service creation confirmation and credential receipt (0:08-1:22)

### Data Restoration in PGAdmin

- Retrieving database credentials from Elestio dashboard
- Connecting PGAdmin to the remote PostGIS server using host/port/user/pass
- Restoring the 'nyc_data.backup' file to the 'postgres' database (2:10-3:37)

### Connecting QGIS to PostGIS

- Navigating to PostgreSQL connection settings in QGIS
- Inputting connection details (host, port 35432, database 'postgres', user 'postgres')
- Testing and finalizing the connection (4:09-4:34)

### Spatial Data Visualization

- Loading multiple layers including homicide points, census blocks, streets, and neighborhoods from the connected database into QGIS
- Visual confirmation of the overlaid spatial data for NYC (4:46-5:27)

### Spatial SQL Query Example

- Running a query in PGAdmin to count homicides using the ST_Within function to check intersection with neighborhood geometries
- Displaying the resulting count of homicides aggregated per neighborhood (5:57-6:53)

![Screenshot at 0:07: The Elestio interface showing the selection of PostGIS as the service to deploy, before specifying provider and plan details.](https://ss.rapidrecap.app/screens/e3XG_A2KUhg/00-00-07.jpg)
![Screenshot at 1:24: The welcome email from Elestio confirming 'Your Service is Ready!' for the new PostGIS instance, including links to the PGAdmin Web UI.](https://ss.rapidrecap.app/screens/e3XG_A2KUhg/00-01-24.jpg)
![Screenshot at 2:22: The Elestio service overview screen displaying the copied database host address, port \(35432\), and the 'root' username.](https://ss.rapidrecap.app/screens/e3XG_A2KUhg/00-02-22.jpg)
![Screenshot at 4:12: The 'Create a new PostgreSQL Connection' dialog in QGIS, showing where the service details copied from Elestio are being entered.](https://ss.rapidrecap.app/screens/e3XG_A2KUhg/00-04-12.jpg)
![Screenshot at 5:16: The QGIS layer panel displaying the loaded spatial layers from the PostGIS database, including homicide points, streets, census blocks, and neighborhoods.](https://ss.rapidrecap.app/screens/e3XG_A2KUhg/00-05-16.jpg)
