Date post: | 14-Apr-2017 |
Category: |
Technology |
Upload: | torp42 |
View: | 152 times |
Download: | 1 times |
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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