How to Handel Spatial Relationships of GIS Objects in PostGIS | PostgreSQL | 16 |

Опубликовано: 18 Май 2026
на канале: GIS Schools
635
18

Material for Practice: https://gisschools.com/course_details...

In this tutorial, we delve into the world of spatial relationships of GIS (Geographic Information System) objects using PostGIS in PostgreSQL. We explore the concepts and theory behind spatial relationships and how they are handled within databases.

Chapters:
0:00:31.599 - Exploring Special Relationships in GIS
0:00:47.039 - Using Conditions to Check Spatial Relationships
0:02:01.240 - Using ST_Intersect Function
0:02:14.400 - Examining Results with ST_Intersect
0:02:37.319 - Applying ST_Disjoint Function
0:02:53.000 - Exploring ST_Contains Function
0:03:48.360 - Using ST_Crosses Function
0:04:30.240 - Implementing ST_Within Function
0:05:09.360 - Applying ST_Overlaps Function

-------- queries ---------------

SELECT ST_Intersects('POINT(0 0)'::geometry, 'LINESTRING ( 2 0, 0 2 )'::geometry);

SELECT ST_Contains('POINT(0 0)'::geometry, 'LINESTRING ( 2 0, 0 2 )'::geometry);

SELECT ST_Within(a,a) As smallinsmall,
ST_Within(a, b) As smallinbig,
ST_Within(b,a) As biginsmall,
ST_Within(ST_Union(a, b), b) as unioninbig,
ST_Within(b, ST_Union(a, b)) as biginunion,
ST_Equals(b, ST_Union(a, b)) as bigisunion
FROM (
SELECT ST_Buffer(ST_GeomFromText('POINT(50 50)'), 20) As a,
ST_Buffer(ST_GeomFromText('POINT(50 50)'), 40) As b
) As foo;

--------------------------------------------------------------------
#Relationships #Geometry #Geography #ST_Intersects #ST_Disjoint
#ST_Covers #ST_Within #ST_Equals #ST_Crosses #ST_DWithin
#ST_Overlaps #ST_Touches #ST_DFullyWithin #ST_Contains


Complete Course : Learn Spatial Databases with PostGIS and QGIS

1) How to Install PostgreSQL | Learn Spatial Databases with PostGIS and QGIS
   • How to Install PostgreSQL | Learn Spatial ...  

2) How to Install PostGIS | Learn Spatial Databases with PostGIS and QGIS
   • How to Install PostGIS | Learn Spatial Dat...  

3) How to Import/Export Shapefile into Databases with PostGIS Manager
   • How to Import/Export Shapefile into Databa...  

4) How to Import / Export Shapefile from QGIS DB Manager into PostGIS
   • How to Import / Export Shapefile from QGIS...  

5) Working with PostGIS By using pgAdmin and QGIS DB Manager
   • Working with PostGIS By using pgAdmin and ...  

6) PostgreSQL Backup and Restore Spatial Database with PGAdmin4
   • PostgreSQL Backup and Restore Spatial Data...  

7) Postgres: SQL SELECT Statement | PostGIS and QGIS | Eng Subtitles
   • Postgres: SQL SELECT Statement | PostGIS a...  

8) PostgreSQL: The WHERE clause | Learn Spatial DB with PostGIS and QGIS
   • PostgreSQL: The WHERE clause | Learn Spati...  

9) Aggregate Functions and GROUP BY | Learn Spatial DB with PostGIS, QGIS
   • Aggregate Functions and GROUP BY  | Learn ...  

10) Multi Table Joins in PostgreSQL | Learn Spatial DB with PostGIS, QGIS
   • Multi Table Joins  in  PostgreSQL | Learn ...  

11) The CASE Statement, DataType and Operators in Postgres | PostGIS, QGIS
   • The CASE Statement, DataType and Operators...  

12) Spatial Reference ID and Geometry Field in PostGIS | PostgreSQL, QGIS
   • Spatial Reference ID and Geometry Field in...  

13) Spatial Queries - Working with Geometries PostGIS | PostgreSQL | QGIS
   • Spatial Queries - Working with Geometries ...  

14) Measurements Area, Length in PostGIS | Geography vs Geometry
   • Measurements  Area, Length in PostGIS | Ge...  

15) Find latitude, Longitude (X,Y) from Multi-Geometry in PostGIS
   • Find latitude, Longitude (X,Y) from Multi-...  

16) How to Handel Spatial Relationships of GIS Objects in PostGIS | PostgreSQL
   • How to Handel Spatial Relationships of GIS...  

17) Spatial Joins with Multi-Table in PostGIS | PostgreSQL
   • Spatial Joins with Multi-Table in PostGIS ...  

18) Geometry Processing Functions and Spatial Joins in PostGIS | QGIS
   • Geometry Processing Functions and Spatial ...  

19) Step-by-Step: Create Spatial Tables & Add Geometry Columns in PostGIS with QGIS
   • Step-by-Step: Create Spatial Tables & Add ...  

20) How to Create Spatial and Attribute Indexes in PostGIS with QGIS
   • How to Create Spatial and Attribute Indexe...  

21) How to Add Geometry to a Feature Using the INSERT Statement in PostGIS with QGIS
   • How to Add Geometry to a Feature Using the...  
------------------------------------------
-----Searching Topics:------
------------------------------------------

QGIS Layer Filter and Spatial Query,
Introduction to spatial queries in SQL Server 2012,
Intersection Geometry | PostGIS,
QGIS Quick Tip - Spatial Query,
Getting started with PostGIS - Installation,
Spatial Database Tips for PostGIS, Oracle, & SQL Server,
Coordinate Systems and SQL - Spatial SQL with Postgres/PostGIS,
Geospatial Queries In MongoDB - Working With Location Based Data,
Spatial Queries SQL Server - Queries About Locations,
Spatial Query and Analysis in GIS in HINDI,

------------------------------------------
------------Contact Me:------
------------------------------------------
Email: [email protected]
Website: https://gisschools.com/
Facebook:   / gisandittools  
Instagram:   / sohailgoheer  


Welcome to my YouTube channel GIS Schools
Please Subscribe to my Chanel ‪@GISSchools‬