SlideShare una empresa de Scribd logo
1 de 64
Descargar para leer sin conexión
DE-9IM in Details using ST Relate: In Picture and SQL
Kristian Torp
Department of Computer Science
Aalborg University
people.cs.aau.dk/˜torp
torp@cs.aau.dk
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
Goals
Learn 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
Note
Will focus on 2D geometries
Concepts are general
Code 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 2
Bou. F F 1
Ext. 1 0 2
Example (As SQL)
select ST Relate (
ST MakeBox2D( ST Point (2 ,2) , ST Point ( 8 , 4 ) ) ,
ST MakeLine ( ST Point (1 ,1) , ST Point ( 6 , 1 ) ) )
−−> Actually returns DE−9IM Matrix 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 2
Bou. 1 0 1
Ext. 2 1 2
Example (As SQL)
select 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 2
Bou. F 1 1
Ext. 2 1 2
Example (As SQL)
select 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 2
Bou. F F 1
Ext. F F 2
Example (As SQL)
select 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 2
Bou. F F 1
Ext. 2 1 2
Example (As SQL)
select 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 F
Bou. F 1 F
Ext. F F 2
Example (As SQL)
select 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 2
Bou. F F 1
Ext. 1 0 2
Example (As SQL)
select 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 2
Bou. 0 F 1
Ext. 1 0 2
Example (As SQL)
select 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 2
Bou. F F 1
Ext. F F 2
Example (As SQL)
select 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 2
Bou. 1 0 1
Ext. F F 2
Example (As SQL)
select 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 2
Bou. 0 F 1
Ext. 1 0 2
Example (As SQL)
select 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 2
Bou. F 0 1
Ext. 1 0 2
Example (As SQL)
select 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 2
Bou. F 0 1
Ext. F F 2
Example (As SQL)
select 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 2
Bou. F 0 1
Ext. F F 2
Example (As SQL)
select 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 2
Bou. F F 1
Ext. 0 F 2
Example (As SQL)
select 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 2
Bou. F F 1
Ext. F F 2
Example (As SQL)
select 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 2
Bou. 0 F 1
Ext. F F 2
Example (As SQL)
select 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 1
Bou. F F 0
Ext. 1 0 2
Example (As SQL)
select 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 1
Bou. F 0 0
Ext. 1 0 2
Example (As SQL)
select 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 1
Bou. 0 F 0
Ext. 1 0 2
Example (As SQL)
select 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 F
Bou. F 0 F
Ext. F F 2
Example (As SQL)
select 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 1
Bou. F F 0
Ext. 0 F 2
Example (As SQL)
select 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 1
Bou. F F 0
Ext. F F 2
Example (As SQL)
select 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 1
Bou. 0 F 0
Ext. F F 2
Example (As SQL)
select 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 Points
ST 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

Más contenido relacionado

La actualidad más candente

Phụ thuộc hàm và các dạng chuẩn - dhcntt
Phụ thuộc hàm và các dạng chuẩn - dhcnttPhụ thuộc hàm và các dạng chuẩn - dhcntt
Phụ thuộc hàm và các dạng chuẩn - dhcnttanhhuycan83
 
ERD - Database Design
ERD - Database DesignERD - Database Design
ERD - Database Designyht4ever
 
Khái niệm thông tin và dữ liệu
Khái niệm thông tin và dữ liệuKhái niệm thông tin và dữ liệu
Khái niệm thông tin và dữ liệuminhhai07b08
 
Apprendre Solr en deux heures
Apprendre Solr en deux heuresApprendre Solr en deux heures
Apprendre Solr en deux heuresSaïd Radhouani
 
Phân tích thiết kế HTTT chương 1
Phân tích thiết kế HTTT chương 1Phân tích thiết kế HTTT chương 1
Phân tích thiết kế HTTT chương 1vtt167
 
Introduction aux RDF & SPARQL
Introduction aux RDF & SPARQLIntroduction aux RDF & SPARQL
Introduction aux RDF & SPARQLOpen Data Support
 
Intégration des données avec Talend ETL
Intégration des données avec Talend ETLIntégration des données avec Talend ETL
Intégration des données avec Talend ETLLilia Sfaxi
 
Recommendation Systems Basics
Recommendation Systems BasicsRecommendation Systems Basics
Recommendation Systems BasicsJarin Tasnim Khan
 
Cours Base de données relationnelles
Cours Base de données relationnellesCours Base de données relationnelles
Cours Base de données relationnellesAymen Kasmi
 
Cursor & Function trong SQL Server
Cursor & Function trong SQL ServerCursor & Function trong SQL Server
Cursor & Function trong SQL ServerHuy Vũ
 
Chương 2. Các khái niệm trong CSDL
Chương 2. Các khái niệm trong CSDL Chương 2. Các khái niệm trong CSDL
Chương 2. Các khái niệm trong CSDL Hoa Le
 
Mô hình hóa yêu cầu
Mô hình hóa yêu cầuMô hình hóa yêu cầu
Mô hình hóa yêu cầuNguyen Tran
 
Data Wrangling with dplyr and tidyr Cheat Sheet
Data Wrangling with dplyr and tidyr Cheat SheetData Wrangling with dplyr and tidyr Cheat Sheet
Data Wrangling with dplyr and tidyr Cheat SheetDr. Volkan OBAN
 
Data Warehouse Design Project
Data Warehouse Design ProjectData Warehouse Design Project
Data Warehouse Design ProjectPradeep Yamala
 

La actualidad más candente (20)

Phụ thuộc hàm và các dạng chuẩn - dhcntt
Phụ thuộc hàm và các dạng chuẩn - dhcnttPhụ thuộc hàm và các dạng chuẩn - dhcntt
Phụ thuộc hàm và các dạng chuẩn - dhcntt
 
ERD - Database Design
ERD - Database DesignERD - Database Design
ERD - Database Design
 
Luận văn: Phương pháp tấn công chữ ký số: Rsa,Elgamal,Dss
Luận văn: Phương pháp tấn công chữ ký số: Rsa,Elgamal,DssLuận văn: Phương pháp tấn công chữ ký số: Rsa,Elgamal,Dss
Luận văn: Phương pháp tấn công chữ ký số: Rsa,Elgamal,Dss
 
Phương pháp tham lam
Phương pháp tham lamPhương pháp tham lam
Phương pháp tham lam
 
Khái niệm thông tin và dữ liệu
Khái niệm thông tin và dữ liệuKhái niệm thông tin và dữ liệu
Khái niệm thông tin và dữ liệu
 
Apprendre Solr en deux heures
Apprendre Solr en deux heuresApprendre Solr en deux heures
Apprendre Solr en deux heures
 
Phân tích thiết kế HTTT chương 1
Phân tích thiết kế HTTT chương 1Phân tích thiết kế HTTT chương 1
Phân tích thiết kế HTTT chương 1
 
Introduction aux RDF & SPARQL
Introduction aux RDF & SPARQLIntroduction aux RDF & SPARQL
Introduction aux RDF & SPARQL
 
Intégration des données avec Talend ETL
Intégration des données avec Talend ETLIntégration des données avec Talend ETL
Intégration des données avec Talend ETL
 
Recommendation Systems Basics
Recommendation Systems BasicsRecommendation Systems Basics
Recommendation Systems Basics
 
Cours Base de données relationnelles
Cours Base de données relationnellesCours Base de données relationnelles
Cours Base de données relationnelles
 
Partie3BI-DW-OLAP2019
Partie3BI-DW-OLAP2019Partie3BI-DW-OLAP2019
Partie3BI-DW-OLAP2019
 
Etl -
Etl -Etl -
Etl -
 
Data Warehouse
Data WarehouseData Warehouse
Data Warehouse
 
Cursor & Function trong SQL Server
Cursor & Function trong SQL ServerCursor & Function trong SQL Server
Cursor & Function trong SQL Server
 
Chương 2. Các khái niệm trong CSDL
Chương 2. Các khái niệm trong CSDL Chương 2. Các khái niệm trong CSDL
Chương 2. Các khái niệm trong CSDL
 
Les systèmes de recommandations
Les systèmes de recommandationsLes systèmes de recommandations
Les systèmes de recommandations
 
Mô hình hóa yêu cầu
Mô hình hóa yêu cầuMô hình hóa yêu cầu
Mô hình hóa yêu cầu
 
Data Wrangling with dplyr and tidyr Cheat Sheet
Data Wrangling with dplyr and tidyr Cheat SheetData Wrangling with dplyr and tidyr Cheat Sheet
Data Wrangling with dplyr and tidyr Cheat Sheet
 
Data Warehouse Design Project
Data Warehouse Design ProjectData Warehouse Design Project
Data Warehouse Design Project
 

Destacado

Spatial Indexing
Spatial IndexingSpatial Indexing
Spatial Indexingtorp42
 
SQLBits X SQL Server 2012 Spatial Indexing
SQLBits X SQL Server 2012 Spatial IndexingSQLBits X SQL Server 2012 Spatial Indexing
SQLBits X SQL Server 2012 Spatial IndexingMichael Rys
 
Enabling Access to Big Geospatial Data with LocationTech and Apache projects
Enabling Access to Big Geospatial Data with LocationTech and Apache projectsEnabling Access to Big Geospatial Data with LocationTech and Apache projects
Enabling Access to Big Geospatial Data with LocationTech and Apache projectsRob Emanuele
 
Spatial Data processing with Hadoop
Spatial Data processing with HadoopSpatial Data processing with Hadoop
Spatial Data processing with HadoopVisionGEOMATIQUE2014
 
Geo tagging & spatial indexing of text-specified data
Geo tagging & spatial indexing of text-specified dataGeo tagging & spatial indexing of text-specified data
Geo tagging & spatial indexing of text-specified dataShiv Shakti Ghosh
 
Thesis Powerpoint
Thesis PowerpointThesis Powerpoint
Thesis Powerpointneha47
 
Thesis Power Point Presentation
Thesis Power Point PresentationThesis Power Point Presentation
Thesis Power Point Presentationriddhikapandya1985
 

Destacado (10)

Spatial Indexing
Spatial IndexingSpatial Indexing
Spatial Indexing
 
VO Course 11: Spatial indexing
VO Course 11: Spatial indexingVO Course 11: Spatial indexing
VO Course 11: Spatial indexing
 
SQLBits X SQL Server 2012 Spatial Indexing
SQLBits X SQL Server 2012 Spatial IndexingSQLBits X SQL Server 2012 Spatial Indexing
SQLBits X SQL Server 2012 Spatial Indexing
 
Enabling Access to Big Geospatial Data with LocationTech and Apache projects
Enabling Access to Big Geospatial Data with LocationTech and Apache projectsEnabling Access to Big Geospatial Data with LocationTech and Apache projects
Enabling Access to Big Geospatial Data with LocationTech and Apache projects
 
Spatial Data processing with Hadoop
Spatial Data processing with HadoopSpatial Data processing with Hadoop
Spatial Data processing with Hadoop
 
RTree Spatial Indexing with MongoDB - MongoDC
RTree Spatial Indexing with MongoDB - MongoDC RTree Spatial Indexing with MongoDB - MongoDC
RTree Spatial Indexing with MongoDB - MongoDC
 
Thesis powerpoint
Thesis powerpointThesis powerpoint
Thesis powerpoint
 
Geo tagging & spatial indexing of text-specified data
Geo tagging & spatial indexing of text-specified dataGeo tagging & spatial indexing of text-specified data
Geo tagging & spatial indexing of text-specified data
 
Thesis Powerpoint
Thesis PowerpointThesis Powerpoint
Thesis Powerpoint
 
Thesis Power Point Presentation
Thesis Power Point PresentationThesis Power Point Presentation
Thesis Power Point Presentation
 

Similar a The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL

Temporal Databases: Data Models
Temporal Databases: Data ModelsTemporal Databases: Data Models
Temporal Databases: Data Modelstorp42
 
Methods to test an e-learning Web application.
Methods to test an e-learning Web application.Methods to test an e-learning Web application.
Methods to test an e-learning Web application.telss09
 
Dklopfenstein Designcon08
Dklopfenstein Designcon08Dklopfenstein Designcon08
Dklopfenstein Designcon08D Klopfenstein
 
Introduction to DTD
Introduction to DTDIntroduction to DTD
Introduction to DTDtorp42
 
Formal semantics for Cypher queries and updates
Formal semantics for Cypher queries and updatesFormal semantics for Cypher queries and updates
Formal semantics for Cypher queries and updatesopenCypher
 
Examples Implementing Black-Box Discrete Optimization Benchmarking Survey for...
Examples Implementing Black-Box Discrete Optimization Benchmarking Survey for...Examples Implementing Black-Box Discrete Optimization Benchmarking Survey for...
Examples Implementing Black-Box Discrete Optimization Benchmarking Survey for...University of Maribor
 
Design, test and mathematica modeling of parabolic trough solat collectors (P...
Design, test and mathematica modeling of parabolic trough solat collectors (P...Design, test and mathematica modeling of parabolic trough solat collectors (P...
Design, test and mathematica modeling of parabolic trough solat collectors (P...Marco Sotte
 
IRJET- Data Dimension Reduction for Clustering Semantic Documents using S...
IRJET-  	  Data Dimension Reduction for Clustering Semantic Documents using S...IRJET-  	  Data Dimension Reduction for Clustering Semantic Documents using S...
IRJET- Data Dimension Reduction for Clustering Semantic Documents using S...IRJET Journal
 
Combinational logic circuits
Combinational logic circuitsCombinational logic circuits
Combinational logic circuitsAswiniT3
 
A Mechanism for IPAD Weight Scale
A Mechanism for IPAD Weight ScaleA Mechanism for IPAD Weight Scale
A Mechanism for IPAD Weight ScaleDoruk Angun
 
IRJET- Implementation of Reversible Radix-2 FFT VLSI Architecture using P...
IRJET-  	  Implementation of Reversible Radix-2 FFT VLSI Architecture using P...IRJET-  	  Implementation of Reversible Radix-2 FFT VLSI Architecture using P...
IRJET- Implementation of Reversible Radix-2 FFT VLSI Architecture using P...IRJET Journal
 
[Paper Introduction] A Context-Aware Topic Model for Statistical Machine Tran...
[Paper Introduction] A Context-Aware Topic Model for Statistical Machine Tran...[Paper Introduction] A Context-Aware Topic Model for Statistical Machine Tran...
[Paper Introduction] A Context-Aware Topic Model for Statistical Machine Tran...NAIST Machine Translation Study Group
 
IRJET- VLSI Architecture for Reversible Radix-2 FFT Algorithm using Programma...
IRJET- VLSI Architecture for Reversible Radix-2 FFT Algorithm using Programma...IRJET- VLSI Architecture for Reversible Radix-2 FFT Algorithm using Programma...
IRJET- VLSI Architecture for Reversible Radix-2 FFT Algorithm using Programma...IRJET Journal
 
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docxDescriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docxcuddietheresa
 
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docxDescriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docxcarolinef5
 
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docxDescriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docxdonaldp2
 
Design of Processing Element (PE3) for Implementing Pipeline FFT Processor
Design of Processing Element (PE3) for Implementing Pipeline FFT Processor Design of Processing Element (PE3) for Implementing Pipeline FFT Processor
Design of Processing Element (PE3) for Implementing Pipeline FFT Processor ijcisjournal
 
Microprocessor Based Design and operations
Microprocessor Based Design and operationsMicroprocessor Based Design and operations
Microprocessor Based Design and operationszelalem2022
 
Methodology for Managing Dynamic Collections on Semantic Semi-Structured XMLs
Methodology for Managing Dynamic Collections on Semantic Semi-Structured XMLsMethodology for Managing Dynamic Collections on Semantic Semi-Structured XMLs
Methodology for Managing Dynamic Collections on Semantic Semi-Structured XMLsIRJET Journal
 
Bitmap Indexes for Relational XML Twig Query Processing
Bitmap Indexes for Relational XML Twig Query ProcessingBitmap Indexes for Relational XML Twig Query Processing
Bitmap Indexes for Relational XML Twig Query ProcessingKyong-Ha Lee
 

Similar a The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL (20)

Temporal Databases: Data Models
Temporal Databases: Data ModelsTemporal Databases: Data Models
Temporal Databases: Data Models
 
Methods to test an e-learning Web application.
Methods to test an e-learning Web application.Methods to test an e-learning Web application.
Methods to test an e-learning Web application.
 
Dklopfenstein Designcon08
Dklopfenstein Designcon08Dklopfenstein Designcon08
Dklopfenstein Designcon08
 
Introduction to DTD
Introduction to DTDIntroduction to DTD
Introduction to DTD
 
Formal semantics for Cypher queries and updates
Formal semantics for Cypher queries and updatesFormal semantics for Cypher queries and updates
Formal semantics for Cypher queries and updates
 
Examples Implementing Black-Box Discrete Optimization Benchmarking Survey for...
Examples Implementing Black-Box Discrete Optimization Benchmarking Survey for...Examples Implementing Black-Box Discrete Optimization Benchmarking Survey for...
Examples Implementing Black-Box Discrete Optimization Benchmarking Survey for...
 
Design, test and mathematica modeling of parabolic trough solat collectors (P...
Design, test and mathematica modeling of parabolic trough solat collectors (P...Design, test and mathematica modeling of parabolic trough solat collectors (P...
Design, test and mathematica modeling of parabolic trough solat collectors (P...
 
IRJET- Data Dimension Reduction for Clustering Semantic Documents using S...
IRJET-  	  Data Dimension Reduction for Clustering Semantic Documents using S...IRJET-  	  Data Dimension Reduction for Clustering Semantic Documents using S...
IRJET- Data Dimension Reduction for Clustering Semantic Documents using S...
 
Combinational logic circuits
Combinational logic circuitsCombinational logic circuits
Combinational logic circuits
 
A Mechanism for IPAD Weight Scale
A Mechanism for IPAD Weight ScaleA Mechanism for IPAD Weight Scale
A Mechanism for IPAD Weight Scale
 
IRJET- Implementation of Reversible Radix-2 FFT VLSI Architecture using P...
IRJET-  	  Implementation of Reversible Radix-2 FFT VLSI Architecture using P...IRJET-  	  Implementation of Reversible Radix-2 FFT VLSI Architecture using P...
IRJET- Implementation of Reversible Radix-2 FFT VLSI Architecture using P...
 
[Paper Introduction] A Context-Aware Topic Model for Statistical Machine Tran...
[Paper Introduction] A Context-Aware Topic Model for Statistical Machine Tran...[Paper Introduction] A Context-Aware Topic Model for Statistical Machine Tran...
[Paper Introduction] A Context-Aware Topic Model for Statistical Machine Tran...
 
IRJET- VLSI Architecture for Reversible Radix-2 FFT Algorithm using Programma...
IRJET- VLSI Architecture for Reversible Radix-2 FFT Algorithm using Programma...IRJET- VLSI Architecture for Reversible Radix-2 FFT Algorithm using Programma...
IRJET- VLSI Architecture for Reversible Radix-2 FFT Algorithm using Programma...
 
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docxDescriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
 
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docxDescriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
 
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docxDescriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
 
Design of Processing Element (PE3) for Implementing Pipeline FFT Processor
Design of Processing Element (PE3) for Implementing Pipeline FFT Processor Design of Processing Element (PE3) for Implementing Pipeline FFT Processor
Design of Processing Element (PE3) for Implementing Pipeline FFT Processor
 
Microprocessor Based Design and operations
Microprocessor Based Design and operationsMicroprocessor Based Design and operations
Microprocessor Based Design and operations
 
Methodology for Managing Dynamic Collections on Semantic Semi-Structured XMLs
Methodology for Managing Dynamic Collections on Semantic Semi-Structured XMLsMethodology for Managing Dynamic Collections on Semantic Semi-Structured XMLs
Methodology for Managing Dynamic Collections on Semantic Semi-Structured XMLs
 
Bitmap Indexes for Relational XML Twig Query Processing
Bitmap Indexes for Relational XML Twig Query ProcessingBitmap Indexes for Relational XML Twig Query Processing
Bitmap Indexes for Relational XML Twig Query Processing
 

Más de torp42

SQL/XML on Oracle
SQL/XML on OracleSQL/XML on Oracle
SQL/XML on Oracletorp42
 
XML on SQL Server
XML on SQL ServerXML on SQL Server
XML on SQL Servertorp42
 
Entity-Relationship Diagrams ERD
Entity-Relationship Diagrams ERDEntity-Relationship Diagrams ERD
Entity-Relationship Diagrams ERDtorp42
 
Introduction to XPath
Introduction to XPathIntroduction to XPath
Introduction to XPathtorp42
 
Introduction to XML and Databases
Introduction to XML and DatabasesIntroduction to XML and Databases
Introduction to XML and Databasestorp42
 
Temporal Databases: Modifications
Temporal Databases: ModificationsTemporal Databases: Modifications
Temporal Databases: Modificationstorp42
 
Temporal Databases: Queries
Temporal Databases: QueriesTemporal Databases: Queries
Temporal Databases: Queriestorp42
 

Más de torp42 (7)

SQL/XML on Oracle
SQL/XML on OracleSQL/XML on Oracle
SQL/XML on Oracle
 
XML on SQL Server
XML on SQL ServerXML on SQL Server
XML on SQL Server
 
Entity-Relationship Diagrams ERD
Entity-Relationship Diagrams ERDEntity-Relationship Diagrams ERD
Entity-Relationship Diagrams ERD
 
Introduction to XPath
Introduction to XPathIntroduction to XPath
Introduction to XPath
 
Introduction to XML and Databases
Introduction to XML and DatabasesIntroduction to XML and Databases
Introduction to XML and Databases
 
Temporal Databases: Modifications
Temporal Databases: ModificationsTemporal Databases: Modifications
Temporal Databases: Modifications
 
Temporal Databases: Queries
Temporal Databases: QueriesTemporal Databases: Queries
Temporal Databases: Queries
 

Último

Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 

Último (20)

Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 

The DE-9IM Matrix in Details using ST_Relate: In Picture and SQL

  • 1. DE-9IM in Details using ST Relate: In Picture and SQL Kristian Torp Department of Computer Science Aalborg University people.cs.aau.dk/˜torp torp@cs.aau.dk 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
  • 2. 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
  • 3. Learning Goals Goals Learn 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 Note Will focus on 2D geometries Concepts are general Code 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
  • 4. 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
  • 5. 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
  • 6. 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
  • 7. 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
  • 8. 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
  • 9. 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
  • 10. ST Relate Example Example (As Picture) Example (DE-9IM Matrix) Int. Bou. Ext. Int. F F 2 Bou. F F 1 Ext. 1 0 2 Example (As SQL) select ST Relate ( ST MakeBox2D( ST Point (2 ,2) , ST Point ( 8 , 4 ) ) , ST MakeLine ( ST Point (1 ,1) , ST Point ( 6 , 1 ) ) ) −−> Actually returns DE−9IM Matrix as FF2FF1102 Kristian Torp (Aalborg University) DE-9IM in Details using ST Relate: In Picture and SQL November 22, 2015 10 / 64
  • 11. 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
  • 12. 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
  • 13. ST Relate, Polygon/Polygon, One Example (As Picture) Example (DE-9IM Matrix) Int. Bou. Ext. Int. 2 1 2 Bou. 1 0 1 Ext. 2 1 2 Example (As SQL) select 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
  • 14. 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
  • 15. ST Relate, Polygon/Polygon, Two Example (As Picture) Example (DE-9IM Matrix) Int. Bou. Ext. Int. F F 2 Bou. F 1 1 Ext. 2 1 2 Example (As SQL) select 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
  • 16. 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
  • 17. ST Relate, Three Example (As Picture) Example (DE-9IM Matrix) Int. Bou. Ext. Int. 2 1 2 Bou. F F 1 Ext. F F 2 Example (As SQL) select 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
  • 18. 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
  • 19. ST Relate, Polygon/Polygon, Four Example (As Picture) Example (DE-9IM Matrix) Int. Bou. Ext. Int. F F 2 Bou. F F 1 Ext. 2 1 2 Example (As SQL) select 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
  • 20. 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
  • 21. ST Relate, Polygon/Polygon, Five Example (As Picture) Example (DE-9IM Matrix) Int. Bou. Ext. Int. 2 F F Bou. F 1 F Ext. F F 2 Example (As SQL) select 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
  • 22. 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
  • 23. 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
  • 24. ST Relate, Polygon/Linestring, One Example (As Picture) Example (DE-9IM Matrix) Int. Bou. Ext. Int. F F 2 Bou. F F 1 Ext. 1 0 2 Example (As SQL) select 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
  • 25. 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
  • 26. ST Relate, Polygon/Linestring, Two Example (As Picture) Example (DE-9IM Matrix) Int. Bou. Ext. Int. 1 0 2 Bou. 0 F 1 Ext. 1 0 2 Example (As SQL) select 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
  • 27. 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
  • 28. ST Relate, Polygon/Linestring, Three Example (As Picture) Example (DE-9IM Matrix) Int. Bou. Ext. Int. 1 0 2 Bou. F F 1 Ext. F F 2 Example (As SQL) select 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
  • 29. 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
  • 30. ST Relate, Polygon/Linestring, Four Example (As Picture) Example (DE-9IM Matrix) Int. Bou. Ext. Int. F F 2 Bou. 1 0 1 Ext. F F 2 Example (As SQL) select 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
  • 31. 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
  • 32. ST Relate, Polygon/Linestring, Five Example (As Picture) Example (DE-9IM Matrix) Int. Bou. Ext. Int. 1 F 2 Bou. 0 F 1 Ext. 1 0 2 Example (As SQL) select 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
  • 33. 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
  • 34. ST Relate, Polygon/Linestring, Six Example (As Picture) Example (DE-9IM Matrix) Int. Bou. Ext. Int. F F 2 Bou. F 0 1 Ext. 1 0 2 Example (As SQL) select 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
  • 35. 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
  • 36. ST Relate, Polygon/Linestring, Seven Example (As Picture) Example (DE-9IM Matrix) Int. Bou. Ext. Int. 1 0 2 Bou. F 0 1 Ext. F F 2 Example (As SQL) select 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
  • 37. 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
  • 38. ST Relate, Polygon/Linestring, Eight Example (As Picture) Example (DE-9IM Matrix) Int. Bou. Ext. Int. 1 F 2 Bou. F 0 1 Ext. F F 2 Example (As SQL) select 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
  • 39. 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
  • 40. 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
  • 41. ST Relate, Polygon/Point, One Example (As Picture) Example (DE-9IM Matrix) Int. Bou. Ext. Int. F F 2 Bou. F F 1 Ext. 0 F 2 Example (As SQL) select 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
  • 42. 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
  • 43. ST Relate, Polygon/Point, Two Example (As Picture) Example (DE-9IM Matrix) Int. Bou. Ext. Int. 0 F 2 Bou. F F 1 Ext. F F 2 Example (As SQL) select 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
  • 44. 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
  • 45. ST Relate, Polygon/Point, Three Example (As Picture) Example (DE-9IM Matrix) Int. Bou. Ext. Int. F F 2 Bou. 0 F 1 Ext. F F 2 Example (As SQL) select 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
  • 46. 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
  • 47. 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
  • 48. ST Relate, Linestring/Linestring, One Example (As Picture) Example (DE-9IM Matrix) Int. Bou. Ext. Int. F F 1 Bou. F F 0 Ext. 1 0 2 Example (As SQL) select 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
  • 49. 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
  • 50. ST Relate, Linestring/Linestring, Two Example (As Picture) Example (DE-9IM Matrix) Int. Bou. Ext. Int. F F 1 Bou. F 0 0 Ext. 1 0 2 Example (As SQL) select 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
  • 51. 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
  • 52. ST Relate, Linestring/Linestring, Three Example (As Picture) Example (DE-9IM Matrix) Int. Bou. Ext. Int. 1 0 1 Bou. 0 F 0 Ext. 1 0 2 Example (As SQL) select 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
  • 53. 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
  • 54. ST Relate, Linestring/Linestring, Four Example (As Picture) Example (DE-9IM Matrix) Int. Bou. Ext. Int. 1 F F Bou. F 0 F Ext. F F 2 Example (As SQL) select 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
  • 55. 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
  • 56. 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
  • 57. ST Relate, Linestring/Point, One Example (As Picture) Example (DE-9IM Matrix) Int. Bou. Ext. Int. F F 1 Bou. F F 0 Ext. 0 F 2 Example (As SQL) select 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
  • 58. 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
  • 59. ST Relate, Linestring/Point, Two Example (As Picture) Example (DE-9IM Matrix) Int. Bou. Ext. Int. 0 F 1 Bou. F F 0 Ext. F F 2 Example (As SQL) select 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
  • 60. 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
  • 61. ST Relate, Linestring/Point, Three Example (As Picture) Example (DE-9IM Matrix) Int. Bou. Ext. Int. F F 1 Bou. 0 F 0 Ext. F F 2 Example (As SQL) select 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
  • 62. 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
  • 63. 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
  • 64. Summary: ST Relate Main Points ST 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