The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL
-
Upload
torp42 -
Category
Technology
-
view
152 -
download
1
Transcript of The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL
![Page 1: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/1.jpg)
DE-9IM in Details using ST Relate: In Picture and SQL
Kristian Torp
Department of Computer ScienceAalborg University
people.cs.aau.dk/˜[email protected]
November 22, 2015
daisy.aau.dk
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 1 / 64
![Page 2: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/2.jpg)
Outline
1 Introduction
2 Polygon/Polygon Examples
3 Polygon/Linestring Examples
4 Polygon/Point Examples
5 Linestring/Linesting Examples
6 Linestring/Point Examples
7 Summary
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 2 / 64
![Page 3: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/3.jpg)
Learning Goals
GoalsLearn the details of the DE-9IM Matrix
Understand how to use ST Relate to get the DE-9IM Matrix
See that ST Relate is the most general of the relationship functions
NoteWill focus on 2D geometries
Concepts are generalCode is sometimes PostgreSQL specific
PostgreSQL: ST Make2DBox, SQL Server : STMake2DBox
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 3 / 64
![Page 4: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/4.jpg)
Outline
1 Introduction
2 Polygon/Polygon Examples
3 Polygon/Linestring Examples
4 Polygon/Point Examples
5 Linestring/Linesting Examples
6 Linestring/Point Examples
7 Summary
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 4 / 64
![Page 5: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/5.jpg)
Interior, Boundary, Exterior of Geometries
Point Interior Boundary Exterior
Linestring Interior Boundary Exterior
Polygon Interior Boundary Exterior
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 5 / 64
![Page 6: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/6.jpg)
Overlap Result is a Point = 0D
Geometry 1 Geometry 2 Overlap? Overlap Result
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 6 / 64
![Page 7: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/7.jpg)
Overlap Result is a Linestring = 1D
Geometry 1 Geometry 2 Overlap? Overlap Result
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 7 / 64
![Page 8: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/8.jpg)
Overlap Result is a Polygon = 2D
Geometry 1 Geometry 2 Overlap? Overlap Result
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 8 / 64
![Page 9: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/9.jpg)
No Overlap = F
Geometry 1 Geometry 2 Overlap? Overlap Result
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 9 / 64
![Page 10: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/10.jpg)
ST Relate Example
Example (As Picture) Example (DE-9IM Matrix)
Int. Bou. Ext.
Int. F F 2Bou. F F 1Ext. 1 0 2
Example (As SQL)s e l e c t ST Relate (
ST MakeBox2D ( ST Point ( 2 , 2 ) , ST Point ( 8 , 4 ) ) ,ST MakeLine ( ST Point ( 1 , 1 ) , ST Point ( 6 , 1 ) ) )
−−> A c t u a l l y re tu rns DE−9IM Mat r i x as FF2FF1102
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 10 / 64
![Page 11: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/11.jpg)
Understanding ST Relate on PostGIS
Result of ST Relate
Value Description
0 A 0D overlap, i.e., result is point(s)1 A 1D overlap, i.e., result is linesting(s)2 A 2D overlap, i.e., result is polygon(s)F Geometries do not overlap F = False
Additional Result on other DBMS
Value Description
T Geometries overlap 0D, 1D or 2D T = True∗ Do not care if geometries overlap or not
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 11 / 64
![Page 12: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/12.jpg)
Outline
1 Introduction
2 Polygon/Polygon Examples
3 Polygon/Linestring Examples
4 Polygon/Point Examples
5 Linestring/Linesting Examples
6 Linestring/Point Examples
7 Summary
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 12 / 64
![Page 13: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/13.jpg)
ST Relate, Polygon/Polygon, One
Example (As Picture) Example (DE-9IM Matrix)
Int. Bou. Ext.
Int. 2 1 2Bou. 1 0 1Ext. 2 1 2
Example (As SQL)s e l e c t ST Relate (
ST MakeBox2D ( ST Point ( 1 , 1 ) , ST Point ( 5 , 4 ) ) ,ST MakeBox2D ( ST Point ( 3 , 2 ) , ST Point ( 9 , 5 ) ) )
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 13 / 64
![Page 14: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/14.jpg)
ST Relate, Polygon/Polygon, One, Details
Int/Int Int/Bou Int/Ext
Bou/int Bou/Bou Bou/Ext
Ext/int Ext/Bou Ext/Ext
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 14 / 64
![Page 15: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/15.jpg)
ST Relate, Polygon/Polygon, Two
Example (As Picture) Example (DE-9IM Matrix)
Int. Bou. Ext.
Int. F F 2Bou. F 1 1Ext. 2 1 2
Example (As SQL)s e l e c t ST Relate (
ST MakeBox2D ( ST Point ( 1 , 1 ) , ST Point ( 7 , 3 ) ) ,ST MakeBox2D ( ST Point ( 3 , 3 ) , ST Point ( 9 , 5 ) ) )
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 15 / 64
![Page 16: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/16.jpg)
ST Relate, Polygon/Polygon, Two, Details
Int/Int Int/Bou Int/Ext
Bou/int Bou/Bou Bou/Ext
Ext/int Ext/Bou Ext/Ext
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 16 / 64
![Page 17: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/17.jpg)
ST Relate, Three
Example (As Picture) Example (DE-9IM Matrix)
Int. Bou. Ext.
Int. 2 1 2Bou. F F 1Ext. F F 2
Example (As SQL)s e l e c t ST Relate (
ST MakeBox2D ( ST Point ( 1 , 1 ) , ST Point ( 9 , 5 ) ) ,ST MakeBox2D ( ST Point ( 2 , 2 ) , ST Point ( 8 , 4 ) ) )
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 17 / 64
![Page 18: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/18.jpg)
ST Relate, Polygon/Polygon, Three, Details
Int/Int Int/Bou Int/Ext
Bou/int Bou/Bou Bou/Ext
Ext/int Ext/Bou Ext/Ext
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 18 / 64
![Page 19: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/19.jpg)
ST Relate, Polygon/Polygon, Four
Example (As Picture) Example (DE-9IM Matrix)
Int. Bou. Ext.
Int. F F 2Bou. F F 1Ext. 2 1 2
Example (As SQL)s e l e c t ST Relate (
ST MakeBox2D ( ST Point ( 1 , 1 ) , ST Point ( 4 , 3 ) ) ,ST MakeBox2D ( ST Point ( 6 , 3 ) , ST Point ( 9 , 5 ) ) )
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 19 / 64
![Page 20: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/20.jpg)
ST Relate, Polygon/Polygon, Four, Details
Int/Int Int/Bou Int/Ext
Bou/int Bou/Bou Bou/Ext
Ext/int Ext/Bou Ext/Ext
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 20 / 64
![Page 21: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/21.jpg)
ST Relate, Polygon/Polygon, Five
Example (As Picture) Example (DE-9IM Matrix)
Int. Bou. Ext.
Int. 2 F FBou. F 1 FExt. F F 2
Example (As SQL)s e l e c t ST Relate (
ST MakeBox2D ( ST Point ( 2 , 1 ) , ST Point ( 8 , 5 ) ) ,ST MakeBox2D ( ST Point ( 2 , 1 ) , ST Point ( 8 , 5 ) ) )
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 21 / 64
![Page 22: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/22.jpg)
ST Relate, Polygon/Polygon, Four, Details
Int/Int Int/Bou Int/Ext
Bou/int Bou/Bou Bou/Ext
Ext/int Ext/Bou Ext/Ext
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 22 / 64
![Page 23: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/23.jpg)
Outline
1 Introduction
2 Polygon/Polygon Examples
3 Polygon/Linestring Examples
4 Polygon/Point Examples
5 Linestring/Linesting Examples
6 Linestring/Point Examples
7 Summary
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 23 / 64
![Page 24: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/24.jpg)
ST Relate, Polygon/Linestring, One
Example (As Picture) Example (DE-9IM Matrix)
Int. Bou. Ext.
Int. F F 2Bou. F F 1Ext. 1 0 2
Example (As SQL)s e l e c t ST Relate (
ST MakeBox2D ( ST Point ( 2 , 2 ) , ST Point ( 8 , 4 ) ) ,ST MakeLine ( ST Point ( 1 , 1 ) , ST Point ( 6 , 1 ) ) )
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 24 / 64
![Page 25: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/25.jpg)
ST Relate, Polygon/Linestring, One, Details
Int/Int Int/Bou Int/Ext
Bou/Int Bou/Bou Bou/Ext
Ext/Int Ext/Bou Ext/Ext
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 25 / 64
![Page 26: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/26.jpg)
ST Relate, Polygon/Linestring, Two
Example (As Picture) Example (DE-9IM Matrix)
Int. Bou. Ext.
Int. 1 0 2Bou. 0 F 1Ext. 1 0 2
Example (As SQL)s e l e c t ST Relate (
ST MakeBox2D ( ST Point ( 2 , 2 ) , ST Point ( 8 , 4 ) ) ,ST MakeLine ( ST Point ( 1 , 3 ) , ST Point ( 6 , 3 ) ) )
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 26 / 64
![Page 27: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/27.jpg)
ST Relate, Polygon/Linestring, One, Details
Int/Int Int/Bou Int/Ext
Bou/Int Bou/Bou Bou/Ext
Ext/Int Ext/Bou Ext/Ext
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 27 / 64
![Page 28: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/28.jpg)
ST Relate, Polygon/Linestring, Three
Example (As Picture) Example (DE-9IM Matrix)
Int. Bou. Ext.
Int. 1 0 2Bou. F F 1Ext. F F 2
Example (As SQL)s e l e c t ST Relate (
ST MakeBox2D ( ST Point ( 2 , 2 ) , ST Point ( 8 , 4 ) ) ,ST MakeLine ( ST Point ( 3 , 3 ) , ST Point ( 7 , 3 ) ) )
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 28 / 64
![Page 29: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/29.jpg)
ST Relate, Polygon/Linestring, Three, Details
Int/Int Int/Bou Int/Ext
Bou/Int Bou/Bou Bou/Ext
Ext/Int Ext/Bou Ext/Ext
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 29 / 64
![Page 30: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/30.jpg)
ST Relate, Polygon/Linestring, Four
Example (As Picture) Example (DE-9IM Matrix)
Int. Bou. Ext.
Int. F F 2Bou. 1 0 1Ext. F F 2
Example (As SQL)s e l e c t ST Relate (
ST MakeBox2D ( ST Point ( 2 , 2 ) , ST Point ( 8 , 4 ) ) ,ST MakeLine ( ST Point ( 3 , 4 ) , ST Point ( 7 , 4 ) ) )
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 30 / 64
![Page 31: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/31.jpg)
ST Relate, Polygon/Linestring, Four, Details
Int/Int Int/Bou Int/Ext
Bou/Int Bou/Bou Bou/Ext
Ext/Int Ext/Bou Ext/Ext
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 31 / 64
![Page 32: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/32.jpg)
ST Relate, Polygon/Linestring, Five
Example (As Picture) Example (DE-9IM Matrix)
Int. Bou. Ext.
Int. 1 F 2Bou. 0 F 1Ext. 1 0 2
Example (As SQL)s e l e c t ST Relate (
ST MakeBox2D ( ST Point ( 2 , 2 ) , ST Point ( 8 , 4 ) ) ,ST MakeLine ( ST Point ( 1 , 3 ) , ST Point ( 9 , 3 ) ) )
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 32 / 64
![Page 33: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/33.jpg)
ST Relate, Polygon/Linestring, Five, Details
Int/Int Int/Bou Int/Ext
Bou/Int Bou/Bou Bou/Ext
Ext/Int Ext/Bou Ext/Ext
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 33 / 64
![Page 34: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/34.jpg)
ST Relate, Polygon/Linestring, Six
Example (As Picture) Example (DE-9IM Matrix)
Int. Bou. Ext.
Int. F F 2Bou. F 0 1Ext. 1 0 2
Example (As SQL)s e l e c t ST Relate (
ST MakeBox2D ( ST Point ( 2 , 2 ) , ST Point ( 8 , 4 ) ) ,ST MakeLine ( ST Point ( 2 , 1 ) , ST Point ( 8 , 2 ) ) )
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 34 / 64
![Page 35: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/35.jpg)
ST Relate, Polygon/Linestring, Six, Details
Int/Int Int/Bou Int/Ext
Bou/Int Bou/Bou Bou/Ext
Ext/Int Ext/Bou Ext/Ext
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 35 / 64
![Page 36: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/36.jpg)
ST Relate, Polygon/Linestring, Seven
Example (As Picture) Example (DE-9IM Matrix)
Int. Bou. Ext.
Int. 1 0 2Bou. F 0 1Ext. F F 2
Example (As SQL)s e l e c t ST Relate (
ST MakeBox2D ( ST Point ( 2 , 2 ) , ST Point ( 8 , 4 ) ) ,ST MakeLine ( ST Point ( 2 , 2 ) , ST Point ( 7 , 3 ) ) )
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 36 / 64
![Page 37: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/37.jpg)
ST Relate, Polygon/Linestring, Seven, Details
Int/Int Int/Bou Int/Ext
Bou/Int Bou/Bou Bou/Ext
Ext/Int Ext/Bou Ext/Ext
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 37 / 64
![Page 38: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/38.jpg)
ST Relate, Polygon/Linestring, Eight
Example (As Picture) Example (DE-9IM Matrix)
Int. Bou. Ext.
Int. 1 F 2Bou. F 0 1Ext. F F 2
Example (As SQL)s e l e c t ST Relate (
ST MakeBox2D ( ST Point ( 2 , 2 ) , ST Point ( 8 , 4 ) ) ,ST MakeLine ( ST Point ( 2 , 2 ) , ST Point ( 8 , 4 ) ) )
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 38 / 64
![Page 39: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/39.jpg)
ST Relate, Polygon/Linestring, Eight, Details
Int/Int Int/Bou Int/Ext
Bou/Int Bou/Bou Bou/Ext
Ext/Int Ext/Bou Ext/Ext
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 39 / 64
![Page 40: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/40.jpg)
Outline
1 Introduction
2 Polygon/Polygon Examples
3 Polygon/Linestring Examples
4 Polygon/Point Examples
5 Linestring/Linesting Examples
6 Linestring/Point Examples
7 Summary
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 40 / 64
![Page 41: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/41.jpg)
ST Relate, Polygon/Point, One
Example (As Picture) Example (DE-9IM Matrix)
Int. Bou. Ext.
Int. F F 2Bou. F F 1Ext. 0 F 2
Example (As SQL)s e l e c t ST Relate (
ST MakeBox2D ( ST Point ( 2 , 2 ) , ST Point ( 8 , 4 ) ) ,ST Point ( 5 , 1 ) )
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 41 / 64
![Page 42: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/42.jpg)
ST Relate, Polygon/Point, One, Details
Int/Int Int/Bou Int/Ext
Bou/Int Bou/Bou Bou/Ext
Ext/Int Ext/Bou Ext/Ext
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 42 / 64
![Page 43: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/43.jpg)
ST Relate, Polygon/Point, Two
Example (As Picture) Example (DE-9IM Matrix)
Int. Bou. Ext.
Int. 0 F 2Bou. F F 1Ext. F F 2
Example (As SQL)s e l e c t ST Relate (
ST MakeBox2D ( ST Point ( 2 , 2 ) , ST Point ( 8 , 4 ) ) ,ST Point ( 5 , 3 ) )
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 43 / 64
![Page 44: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/44.jpg)
ST Relate, Polygon/Point, Two, Details
Int/Int Int/Bou Int/Ext
Bou/Int Bou/Bou Bou/Ext
Ext/Int Ext/Bou Ext/Ext
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 44 / 64
![Page 45: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/45.jpg)
ST Relate, Polygon/Point, Three
Example (As Picture) Example (DE-9IM Matrix)
Int. Bou. Ext.
Int. F F 2Bou. 0 F 1Ext. F F 2
Example (As SQL)s e l e c t ST Relate (
ST MakeBox2D ( ST Point ( 2 , 2 ) , ST Point ( 8 , 4 ) ) ,ST Point ( 5 , 4 ) )
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 45 / 64
![Page 46: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/46.jpg)
ST Relate, Polygon/Point, Three, Details
Int/Int Int/Bou Int/Ext
Bou/Int Bou/Bou Bou/Ext
Ext/Int Ext/Bou Ext/Ext
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 46 / 64
![Page 47: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/47.jpg)
Outline
1 Introduction
2 Polygon/Polygon Examples
3 Polygon/Linestring Examples
4 Polygon/Point Examples
5 Linestring/Linesting Examples
6 Linestring/Point Examples
7 Summary
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 47 / 64
![Page 48: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/48.jpg)
ST Relate, Linestring/Linestring, One
Example (As Picture) Example (DE-9IM Matrix)
Int. Bou. Ext.
Int. F F 1Bou. F F 0Ext. 1 0 2
Example (As SQL)s e l e c t ST Relate (
ST MakeLine ( ST Point ( 1 , 3 ) , ST Point ( 6 , 3 ) ) ,ST MakeLine ( ST Point ( 5 , 2 ) , ST Point ( 9 , 2 ) ) )
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 48 / 64
![Page 49: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/49.jpg)
ST Relate, Linestring/Linestring, One, Details
Int/Int Int/Bou Int/Ext
Bou/Int Bou/Bou Bou/Ext
Ext/Int Ext/Bou Ext/Ext
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 49 / 64
![Page 50: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/50.jpg)
ST Relate, Linestring/Linestring, Two
Example (As Picture) Example (DE-9IM Matrix)
Int. Bou. Ext.
Int. F F 1Bou. F 0 0Ext. 1 0 2
Example (As SQL)s e l e c t ST Relate (
ST MakeLine ( ST Point ( 1 , 3 ) , ST Point ( 6 , 3 ) ) ,ST MakeLine ( ST Point ( 6 , 3 ) , ST Point ( 9 , 3 ) ) )
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 50 / 64
![Page 51: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/51.jpg)
ST Relate, Linestring/Linestring, Two, Details
Int/Int Int/Bou Int/Ext
Bou/Int Bou/Bou Bou/Ext
Ext/Int Ext/Bou Ext/Ext
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 51 / 64
![Page 52: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/52.jpg)
ST Relate, Linestring/Linestring, Three
Example (As Picture) Example (DE-9IM Matrix)
Int. Bou. Ext.
Int. 1 0 1Bou. 0 F 0Ext. 1 0 2
Example (As SQL)s e l e c t ST Relate (
ST MakeLine ( ST Point ( 1 , 3 ) , ST Point ( 6 , 3 ) ) ,ST MakeLine ( ST Point ( 4 , 3 ) , ST Point ( 9 , 3 ) ) )
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 52 / 64
![Page 53: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/53.jpg)
ST Relate, Linestring/Linestring, Three, Details
Int/Int Int/Bou Int/Ext
Bou/Int Bou/Bou Bou/Ext
Ext/Int Ext/Bou Ext/Ext
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 53 / 64
![Page 54: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/54.jpg)
ST Relate, Linestring/Linestring, Four
Example (As Picture) Example (DE-9IM Matrix)
Int. Bou. Ext.
Int. 1 F FBou. F 0 FExt. F F 2
Example (As SQL)s e l e c t ST Relate (
ST MakeLine ( ST Point ( 1 , 3 ) , ST Point ( 6 , 3 ) ) ,ST MakeLine ( ST Point ( 1 , 3 ) , ST Point ( 6 , 3 ) ) )
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 54 / 64
![Page 55: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/55.jpg)
ST Relate, Linestring/Linestring, Four, Details
Int/Int Int/Bou Int/Ext
Bou/Int Bou/Bou Bou/Ext
Ext/Int Ext/Bou Ext/Ext
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 55 / 64
![Page 56: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/56.jpg)
Outline
1 Introduction
2 Polygon/Polygon Examples
3 Polygon/Linestring Examples
4 Polygon/Point Examples
5 Linestring/Linesting Examples
6 Linestring/Point Examples
7 Summary
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 56 / 64
![Page 57: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/57.jpg)
ST Relate, Linestring/Point, One
Example (As Picture) Example (DE-9IM Matrix)
Int. Bou. Ext.
Int. F F 1Bou. F F 0Ext. 0 F 2
Example (As SQL)s e l e c t ST Relate (
ST MakeLine ( ST Point ( 2 , 3 ) , ST Point ( 8 , 3 ) ) ,ST Point ( 5 , 1 ) )
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 57 / 64
![Page 58: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/58.jpg)
ST Relate, Linestring/Point, One, Details
Int/Int Int/Bou Int/Ext
Bou/Int Bou/Bou Bou/Ext
Ext/Int Ext/Bou Ext/Ext
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 58 / 64
![Page 59: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/59.jpg)
ST Relate, Linestring/Point, Two
Example (As Picture) Example (DE-9IM Matrix)
Int. Bou. Ext.
Int. 0 F 1Bou. F F 0Ext. F F 2
Example (As SQL)s e l e c t ST Relate (
ST MakeLine ( ST Point ( 2 , 3 ) , ST Point ( 8 , 3 ) ) ,ST Point ( 5 , 3 ) )
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 59 / 64
![Page 60: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/60.jpg)
ST Relate, Linestring/Point, Two, Details
Int/Int Int/Bou Int/Ext
Bou/Int Bou/Bou Bou/Ext
Ext/Int Ext/Bou Ext/Ext
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 60 / 64
![Page 61: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/61.jpg)
ST Relate, Linestring/Point, Three
Example (As Picture) Example (DE-9IM Matrix)
Int. Bou. Ext.
Int. F F 1Bou. 0 F 0Ext. F F 2
Example (As SQL)s e l e c t ST Relate (
ST MakeLine ( ST Point ( 2 , 3 ) , ST Point ( 8 , 3 ) ) ,ST Point ( 8 , 3 ) )
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 61 / 64
![Page 62: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/62.jpg)
ST Relate, Linestring/Point, Three, Details
Int/Int Int/Bou Int/Ext
Bou/Int Bou/Bou Bou/Ext
Ext/Int Ext/Bou Ext/Ext
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 62 / 64
![Page 63: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/63.jpg)
Outline
1 Introduction
2 Polygon/Polygon Examples
3 Polygon/Linestring Examples
4 Polygon/Point Examples
5 Linestring/Linesting Examples
6 Linestring/Point Examples
7 Summary
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 63 / 64
![Page 64: The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL](https://reader031.fdocuments.net/reader031/viewer/2022030314/58899a011a28ab330e8b6e0f/html5/thumbnails/64.jpg)
Summary: ST Relate
Main PointsST Relate covers all the cases
ST Relate fairly complex to understand and use
Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 64 / 64