Download - Geoinformation IV

Transcript
Page 1: Geoinformation IV

Institut für Kartographie und GeoinformationProf. Dr. Lutz Plümer

Geoinformation IVGIS-Seminar

SQL und Simple Features

Page 2: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

2 2

Übersicht

• SQL - relationale Datenbanken ... was ist das?• kurze Wiederholung: Simple Features• Feature Tables

– Speicherungsarten

• Anfragen an die Geometrie durch Methoden

Page 3: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

3 3

SQL - was ist das?

• Strucured Query Language

• Standard für relationale Datenbanken

• IBM: SEQUEL (1970) SQL (ab 1980)

• Sprache zur Definition und Manipulation von

relationalen Datenbanken

Page 4: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

4 4

Relationale Datenbank

• 2-dimensionale MatrixPunktnummer X-Koordinate Y-Koordinate

1 0,00 0,00 2 0,00 100,00 3 100,00 100,00 4 100,00 0,00

Beispieltabelle:

• Inhalte:– Spalten: Attribute– Jede Zeile ein Feature

• Eigenschaften– jede Spalte beinhaltet ein Attribut und hat einen

Attributnamen– die Wertebereiche der Eintragungen sind elementar und

nicht weiter zerlegbar

– Reihenfolge der Spalten ist beliebig

– Alle Zeilen (Tupel) sind paarweise verschieden

Page 5: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

5 5

Simple Features

Übersicht:

Erinnerung:Geoinformation 4,

Vorlesung 10

Geometrie-Klassen-Hierarchie (OGC)

Page 6: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

6 6

Simple Features

0-, 1- oder 2-dim. Geometrien

• Point• MultiPoint• Curve• Line• LineString• MultiLineString• MultiCurve• LinearRing• Polygon• MultiPolygon

• Surface

• MultiSurface

• Geometry Collection

0-dimensional

1-dimensional

2-dimen-sional

Page 7: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

7 7

Feature Table

• Features sind räumliche Objekte• Feature Tables ähneln im Aufbau den vorhin

beschriebenen relationalen Datenbanken• Jedes Feature wird in einer Zeile dargestellt

• Darstellung und Speicherung der Simple Features wurde vom Open GIS Consortium (OGC) entwickelt

Page 8: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

8 8

Feature Table

Es gibt drei Speicherungsarten der Feature Tables

• SQL 92, unter Anwendung von

a) numerischen

b) binären

SQL-Typen zur Speicherung der Geometrie

• SQL 92, mit Geometrietypen

Page 9: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

9 9

Beispiel 1: SQL92 - numerische Implementation (1)

GID ESEQ ETYPE SEQ X0 Y0 X1 Y1 X2 Y2 X3 Y3 X4 Y4

1 1 3 1 0 0 0 30 30 30 30 0 0 0

1 2 3 1 10 10 10 20 20 20 20 10 10 10

2 1 3 1 30 0 30 30 60 30 60 0 30 0

2 2 3 1 40 5 40 20 45 20 45 15 50 15

2 2 3 2 50 15 50 5 40 5 Nil Nil Nil Nil

3 1 3 1 0 30 0 60 30 60 30 30 0 30

4 1 3 1 30 30 30 60 60 60 60 30 30 30

GID: geometry identifier

ESEQ: element sequence number

ETYPE: primitive type -> Geometrietyp• 1 - Point• 2 - LineString• 3 - Polygon•...

SEQ: sequence number

(60,30)(0,30)

(0,60) (60,60)(30,60)

GID 1

GID 3

GID 2

GID 4

ESEQ 2 ESEQ 2

(0,0) (30,0) (60,0)

Page 10: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

10 10

Beispiel 1: SQL92 - numerische Implementation (2)

GID ESEQ ETYPE SEQ X0 Y0 X1 Y1 X2 Y2 X3 Y3 X4 Y4

1 1 3 1 0 0 0 30 30 30 30 0 0 0

1 2 3 1 10 10 10 20 20 20 20 10 10 10

2 1 3 1 30 0 30 30 60 30 60 0 30 0

2 2 3 1 40 5 40 20 45 20 45 15 50 15

2 2 3 2 50 15 50 5 40 5 Nil Nil Nil Nil

3 1 3 1 0 30 0 60 30 60 30 30 0 30

4 1 3 1 30 30 30 60 60 60 60 30 30 30

(0,0) (30,0) (60,0)

(60,30)(0,30)

(0,60) (60,60)(30,60)

GID 1

GID 3

GID 2

GID 4

ESEQ 2 ESEQ 2

SEQ 2SEQ 1

Darstellung der Geometrie

Page 11: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

11 11

Beispiel 2: SQL92 - binäre Implementation

GID XMIN YMIN XMAX YMAX Geometry

1 0 0 30 30 <Well-Known-Binary-Geometry>

2 30 0 60 30 <WKBGeometrie>

3 0 30 30 60 <WKBGeometrie>

4 30 30 60 60 <WKBGeometrie>

X,Y -> Min, Max:Definition der bounding box

WKBGeometrie:

Stellt die Geometrie als eine

Sequenz von unsigned

integer oder double dar.

(60,30)(0,30)

(0,60) (60,60)(30,60)

GID 1

GID 3

GID 2

GID 4

ESEQ 2 ESEQ 2

(0,0) (30,0) (60,0)

Page 12: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

12 12

SQL92 mit Geometrietypen

• Zu jedem Geometrietyp wird eine Tabelle definiert, die nur Objekte des einen Geometrietyps enthält

• basiert auf der Geometrie Klassen Hierarchie vom OGC• Anwendung von Methoden möglich

Page 13: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

13 13

Anfragen

• Anfragen an die Geometrie werden in SQL durch vorgefertigte Methoden getätigt• Diese Methoden können nur im SQL 92 mit Geometrietypen benutzt werden• Es gibt Methoden, die

– für alle Geometrien gelten Basis-Methoden– nur auf spezielle Geometrien angewendet werden können

• Ausgaben sind im WKBGeometry Format

Page 14: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

14 14

Anfrage in SQL

• Ein Anfrage in SQL92 -Form sieht folgendermaßen aus:

Beispiel: Schnitte von Flurstücken mit einer Straße:

SELECT Parcel.Name, Parcel.Id FROM Parcels, Street

WHERE Intersects(Parcels.Location, Street.centerline) = 1

• Ausgabe: Alle Flurstücke, die von dieser Straße geschnitten werden

Page 15: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

15 15

Basis-Methoden

• Dimension ( ):Integer - Dimension des Objektes (0, 1 od. 2)• GeometryType ( ):String - Name der Geometrie• SRID ( ):Integer - ID für das Spatial Reference

System• Envelope( ):Geometry - Bounding Box als Polygon• AsText( ):String - textuelle Repräsentation• AsBinary( ):Binary - binäre Repräsentation• IsEmpty( ):Integer - 1: true, 0: false, -1: unknown• IsSimple( ):Integer - 1: true, 0: false, -1: unknown• Boundary( ):Geometry - Grenze

Anfrage Ausgabe

Page 16: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

16 16

Test-Methoden für räumliche Beziehungen

• Equals():Integer - Gleichheit mit einer anderen Geometrie• Disjoint():Integer - Menge der gemeinsamen Punkte = 0 • Intersects():Integer - Schnitt mit einer anderen G.• Touches():Integer - Berührung mit einer anderen G. • Crosses():Integer - Kreuzung mit einer anderen G.• Within():Integer - innerhalb einer anderen Geometrie• Contains():Integer - Enthält eine andere G. • Overlaps():Integer - Überlappung mit einer anderen G.• Relate():Integer - Beziehung mit einer anderen G.

(Beispiele siehe unter anderem Vorlesung 10, GIS III 2001)

Ausgabe ist immer 1 für „true“, 0 für „false“ oder -1 für „unknown“!

Test Beziehung

Page 17: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

17 17

Methoden, die Spatial Analysis unterstützen (1)

• Distance():Double - kürzeste Distanz zu einer anderen Geometrie

• Buffer():Geometry - Repräsentation aller Punkte, die einen kleineren oder gleichen

Abstand wie den angegebenen von der Geometrie haben.

• ConvexHull( ):Geometry - Repräsentation der konvexen Hülle• Intersection():Geometry - Repräsentation des Schnitts

(AB)• Union():Geometry - Repräsentation der Vereinigten

Punktmenge (AB)

Anfrage Ausgabe

Page 18: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

18 18

Methoden, die Spatial Analysis unterstützen (2)

• Difference():Geometry - Repräsentiert die Geometrie der nichtgemeinsamen Punkte (A-B)

• SymDifference():Geometry - ist gleich der Vereinigung minus dem Schnitt ((A-B)(B-A))

Anfrage Ausgabe

Page 19: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

19 19

Methoden - GeometryCollection

• NumGeometries( ):Integer - die Anzahl der enthaltenen Geometrien

• GeometryN():Geometry - die N-te Geometrie in der Collection

Anfrage Ausgabe

Page 20: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

20 20

Methoden - Point

• X( ):Double - X-Koordinate• Y( ):Double - Y-Koordinate

Anfrage Ausgabe

Page 21: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

21 21

Methoden - Curve

• Length( ):Double - Länge der Kurve• StartPoint( ):Point - Startpunkt• EndPoint( ):Point - Endpunkt• IsClosed( ):Integer - 1: „true“, wenn Startpunkt=Endpunkt

0: „false“ oder -1: „unknown“• IsRing( ):Integer - 1: „true“, falls closed und simple !

0: „false“ oder -1: „unknown“

„simple“: kein Punkt wird doppelt durchlaufen, mit Ausnahme des Start- und Endpunktes!

Anfrage Ausgabe

Page 22: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

22 22

Methoden - LineString, Line, LinearRing

• NumPoints( ):Integer - Anzahl der Punkte im LineString• PointN(N:Integer):Point - Punkt n aus LineString l

Anfrage Ausgabe

Page 23: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

23 23

Methoden - MultiCurve

• IsClosed( ):Integer - 1: „true“, wenn Startpunkt=Endpunkt 0: „false“ oder -1: „unknown“

• Length( ):Double - Länge der Kurve

Anfrage Ausgabe

Page 24: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

24 24

Methoden - Surface

• Area( ):Double - Fläche des Surface• Centroid( ):Point - Schwerpunkt• PointOnSurface( ):Point - Punkt der garantiert im Surface

liegt

Anfrage Ausgabe

Page 25: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

25 25

Methoden - Polygon

• ExteriorRing( ):LineString - umgebender Ring• NumInteriorRing( ):Integer - Anzahl der inneren Ringe• InteriorRingN():LineString - N-te innere Ring

Anfrage Ausgabe

Page 26: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

26 26

Abschlusswort

• Simple Features vom OGC nur zweidimensional• Zukunft: komplexe Geometrien Spatial Schema

Page 27: Geoinformation IV

Institut für Kartographie und GeoinformationProf. Dr. Lutz Plümer

Vielen Dank für eure Aufmersamkeit!

Noch Fragen?

Page 28: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

28 28

Line, LineString, LinearRing

einfach nicht einfach geschl./einf.

s

e

s s s

e

e e

geschl./nicht einf.

• ein Linestring ist eine Kurve (Curve), wenn zwischen den Punkten linear interpoliert wird

• besteht ein LineString aus exakt zwei Punkten, so wird er als Line bezeichnet

• Ist ein LineString „einfach“ und „geschlossen“, so wird er als LinearRing bezeichnet

Page 29: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

29 29

Curve

• 1-dimensional• Sequenz von Punkten zwischen denen linear

interpoliert wird

Page 30: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

30 30

MultiCurve

• 1 – dimensionale Geometrie• Elemente dieser Subklasse sind Kurven• Die Klasse wird als „einfach“ bezeichnet, wenn alle Elemente „einfach“

sind • Schnittpunkte dürfen nur in der Begrenzung zweier Elemente

vorkommen• Begrenzung dieser Klasse sind all diejenigen Punkte, welche in einer

ungeraden Anzahl der Teilelemente vorkommen• MultiCurve gilt als „geschlossen“, wenn alle Teilelemente „geschlossen“

sind

Page 31: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

31 31

MultiLineString

• MultiCurve = MultiLineString, wenn Elemente LineStrings – (lineare Interpolation zwischen den Punkten)

s1

e1 s2

e2

einfachGrenzen = {s1,e2}

s1

s1e1 e1

s2 s2e2 e2

nicht einfachGrenzen = {s1,e1}

geschlossenGrenzen = {Ø}

s1 s1e2

e1

Page 32: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

32 32

Polygon

• ebene Oberfläche, definiert durch eine äußere und 0 oder mehrere innere Grenzen– jede innere Grenze legt ein „Loch“ im Polygon fest

• die Grenzen bestehen aus LinearRings• mehrere Grenzen dürfen sich nicht schneiden

– Berührpunkte sind gestattet

Polygon mit einem ... zwei ...bzw. drei Ringen

Page 33: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

33 33

MultiPolygon 1

• Subklasse, deren Elemente Polygone sind

• Kennzeichen :

• Die Innenräume und die Grenzen zweier Polygone dieser Klasse dürfen sich nicht schneiden

– Sie dürfen sich an einer begrenzten Anzahl von Punkten berühren

• MultiPolygon besteht aus einer geordneten, geschlossenen Ansammlung von Punkten

• Die inneren Bereiche dieser Klasse sind nicht zusammenhängend

• Die Anzahl der inneren Bereiche entspricht der Anzahl der Polygone

Page 34: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

34 34

MultiPolygon 2

• die Grenzen dieser Klasse bestehen aus einer Ansammlung geschlossener Kurven (LineString)

• Jede Grenze wird exakt einem Polygon zugeordnet, welches sich in der Klasse befindet

1 Polygon 3 Polygone 2 Polygone 2 Polygone

Page 35: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

35 35

Surface

• 2D – geometrisches Objekt• Zeichnet sich durch eine „äußere“ Grenze aus

– Darüber hinaus können mehrere „innere“ Grenzen bestehen

• Einfache Oberflächen (= Simple Surfaces) haben im 3D die gleiche Gestalt, wie ebene Oberflächen

• Polyhedral Surfaces erhält man, indem man einfache Oberflächen entlang ihrer Grenzen miteinander „vernäht“

• diese müssen dann nicht mehr eben sein (3D)

Page 36: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

36 36

MultiSurface

• 2D Ansammlungen von Oberflächen

• zwei verschiedene Oberflächen (Surfaces) dürfen sich nicht schneiden

– ansonsten kein Multisurface sondern Surface

• die Grenzen zweier Elemente können sich in einer begrenzten Anzahl von Punkten berühren

• MultiSurface wird als abstrakte Klasse bezeichnet

• Sie definiert verschiedene Vorgehensweisen für deren Unterklassen

Page 37: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

37 37

MultiGeometry

• Stellt eine Geometrie dar, die mehrere anderen Geometrien beeinhaltet

Page 38: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

38 38

Textuelle Repräsentation (WKB)

• Ausgabe ist für den Menschen lesbar• Beispiel: Ein String im geogr. Koordinatensystem

für die UTM-Zone 10 im NAD83

GEOGCS[‘GCS_North_American_1983’,DATUM[‘D_North_American_1983’,SPHEROID[‘GRS_1980’,6378137,298.257222101]],PRIMEM[‘Greenwich’,0],UNIT[‘Degree’,0.0174532925199433]]

Page 39: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

39 39

Binäre Repräsentation (WKB)

• Zahlencode• zur maschinellen Weiterverarbeitung• Beispiel:

B=1 T=3 NR=2 NP=3 X1 Y1 X2 Y2 X3 Y3 NP=3 X1 Y1 X2 Y2 X3 Y3

Ring 1 Ring 2

WKB Polygon

Page 40: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

40 40

Beispiel - NRW

Page 41: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

41 41

Beispiel - NRW: Envelope

Envelope( ):Geometry

Page 42: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

42 42

Beispiel - NRW: Envelope

Page 43: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

43 43

Beispiel - NRW: Envelope

Page 44: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

44 44

Beispiel - NRW: Envelope

Ausgabe:

Polygon, das die

bounding box

repräsentiert

Page 45: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

45 45

Beispiel - NRW: Boundary

Boundary( ):Geometry

Page 46: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

46 46

Beispiel - NRW: Boundary

Ausgabe:

Polgon, das die Grenze

NRW´s repräsentiert

Page 47: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

47 47

Beispiel - NRW: Buffer

Buffer():Geometry:Repräsentation aller Punkte, die

einen kleineren oder

gleichen Abstand wie den

angegebenen von der

Geometrie haben.

Z.B.: Umkreis von

X Kilometern

Page 48: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

48 48

Beispiel - NRW: Buffer

Buffer():Geometry:Repräsentation aller Punkte, die

einen kleineren oder

gleichen Abstand wie den

angegebenen von der

Geometrie haben.

Z.B.: Umkreis von

X Kilometern

X

Ausgabe wäre in

diesem Fall die

Geometrie des

grünen Kreises

Page 49: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

49 49

Beispiel - NRW

Page 50: Geoinformation IV

Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02Till Baberg - GIS-Seminar - SS 02 - SQL und Simple Features - 13.06.02

50 50

Beispiele

Intersection():Geometry

Union():Geometry

Difference():Geometry

SymDifference():Geometry

A BA B

A BA B

A B A B(A-B)(B-A)

A B A B

A-B B-A