geodatenmanagement und -visualisierung mit oracle spatial technologies

57
1 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Upload: karin-patenge

Post on 08-Jul-2015

302 views

Category:

Technology


1 download

DESCRIPTION

Der Foliensatz gibt einen Überblick darüber, wie und welche räumlichen Daten in der Oracle Datenbank gepflegt und ausgewertet werden können. Darüber hinaus zeigt er die Nutzung von Oracle Maps für die Visualisierung von räumlichen Daten in Form von Karten auf. Bei Interesse gern auch weiterlesen auf dem deutschsprachigen Oracle Spatial Blog (http://oracle-spatial.blogspot.com).

TRANSCRIPT

Page 1: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

1 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Page 2: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

2 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Geodaten-Management in der Oracle DB

Geodaten-Visualierung mit Oracle MapViewer

Karin Patenge | [email protected]

Oracle Deutschland B.V. & Co. KG

Page 3: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

3 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Agenda

• Oracle Spatial Technologies

– Geodatenmanagement in der Oracle Datenbank

– Räumliche Abfragen und Analysen

– Visualisierung von Geodaten mit Hilfe von

Oracle Fusion Middleware MapViewer (inkl. Oracle Maps)

• Weiterführende Informationen

Page 4: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

4 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Oracle Spatial Technologies

Überblick

Page 5: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

5 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

ORACLE Spatial TechnologiesAus Sicht der Datenbank

Vektordaten (2D)

Räumlicher Index (R-Tree)

Koordinatentransformation

Räumliche Abfragen

Routing

Vector Performance Accelerator

Geocoding

Geodienste

Vektordaten (3D, 4D)

Spatial

Locator

Georaster, Rasteralgebra

Topologie & Netzwerkmodelle

Räumliche Verschneidungen

Räumliche Analysen und Mining

Punktwolken, TINs

Details: http://docs.oracle.com/cd/E16655_01/appdev.121/e17896/sdo_locator.htm#SPATL340

Page 6: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

6 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Spatial Technologies

• Oracle Locator: Funktionalität der Oracle DB

(Alle Editionen)

• Oracle Spatial and Graph: Oracle DB EE

Option

• Oracle FMW MapViewer / MAPS: Java

Applikation und Map Rendering für das Karten-

Rendering als Bestandteil der Oracle Fusion

Middleware (FMW). JavaScript Library. Caching

von gerenderten Kartenkacheln.

• MapBuilder: Kostenfreie Java Anwendung für

das Kartenlayout (Signaturen/Layout, Base

Maps, Themes)

• Karteninhalte: Im Oracle Data Format von

externen Anbietern (Nicht Oracle!)

Lösungssicht

MapViewer

Oracle Locator

Oracle Spatial

JDBC

Fusion Middleware

HTTP

MapViewer / MAPS

Oracle Spatial

Oracle Database

Raster 3DNetworks

SOA

Page 7: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

7 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Oracle Database (Full Use)

Geodaten

Räumliche Abfragen

Räumliche Indizes

Verschneidungen

Daten-Manipulationen

Räumliches Mining

J2EE compliant

Application Server

Kartendarstellung

Geodienste

Routenberechnung

Konkrete Lösungsapplikation

Fachliche Lösungen

Oracle BI / Apps /

mobile Anwendungen ...

Map-Viewer

Geo-dienste

3rd Party

Geodaten

Sach-daten

Andere

Fachliche Kompo-nenten

Page 8: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

8 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

(Geo-)Datenmanagement in der Oracle DB

Integrierter Zugriff auf Geo-, Fach- und Sachdaten

Page 9: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

9 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Einheitliches Datenmanagement

• Management komplexer Daten

– Datentypen, Methoden & mehr

• Zugriff über standardisierte

Schnittstellen

• Plattformunabhängig

• Skalierbar

• Sicher

• Robust

Page 10: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

10 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Oracle Technology Network

http://docs.oracle.com/cd/E16655_01/nav/portal_7.htm

Page 11: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

12 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Was ist Oracle Spatial and Graph (inkl. Locator)

• Spatial

– Schema MDSYS mit objekt-relationalen Datentypen für Vektor- und Rasterdaten,

Punktwolken und TINs

– Räumlicher Index (Domain Index)

– Räumliche Metadaten inklusive Koordinatensysteme

– Räumliche Operatoren und Funktionen inklusive räumliche Analyse

– Werkzeuge und Tuning-Funktionen

– Topologisches Datenmodell und Methoden

– Netzwerkdatenmodell und Methoden

– Geodienste-Unterstützung

• Semantische Netze (Graph)

Page 12: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

13 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Architektur

Page 13: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

14 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Geodaten-Unterstützung in jeder Oracle DBGeometrische Elemente (OGC Simple Features)

Punkt

Polygon

Polygon

"mit Loch"

Linenzug

Optimiertes

Polygon

Kreisbogen

Zus.ges.

Linienzug

Parametrisierte

Kurve

Zus.ges.

Polygon

Page 14: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

15 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Simple Features konform

ID FEATURE_NAME GEOMETRY ...

NUMBER VARCHAR2 SDO_GEOMETRY ...

Tabellendefinition

SDO_GTYPE NUMBER

SDO_SRID NUMBER

SDO_POINT SDO_POINT_TYPE

SDO_ELEM_INFO SDO_ELEM_INFO_ARRAY

SDO_ORDINATES SDO_ORDINATE_ARRAY

Der Datentyp SDO_GEOMETRY

Page 15: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

16 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Tabelle mit Geometriedaten

• Syntax:

• Datentyp: SDO_GEOMETRY

Punkte (GPS-Koordinaten)

create table standorte (

id number,

standort_name varchar2(100),

gps_loc sdo_geometry

);

insert into geom_tab_2d values(

1,

‚'Standort Automat'

sdo_geometry(

2001, -- 2-dimensionaler Punkt

4326, -- WGS84 als Koordinatensystem

sdo_point_type(12.7,52.0,0),

null, -- Verwendung für Linien, Polygone

null)); -- dito

Page 16: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

17 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Parametrisierte Kurven

• Repräsentation nahezu beliebiger Freiform-Geometrien

– Kontrollpunkte und Knoten "steuern" die Form der Kurve

– Darstellung komplexer Objekte mit wenigen Daten

• Typische Beispiele: Kurven, Autobahnzufahrten

• Unterstützung in der Datenbank

– Abbildung als SDO_GEOMETRY

– WKT/WKB/GML Konvertierungsfunktionen

– Räumliche Indizierung / Spatial Operators

– Validierungen

– Funktionen zur Konvertierung in "klassische" Linienzüge

(Approximation)

– Nicht unterstützt für geodätische Koordinatensysteme

Non-Uniform Rational B-Spline (NURBS)

Page 17: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

18 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

NURBS Beispiel

• Syntax: SDO_GEOMETRY(

2002, -- Zweidimensionaler Linienzug

31468, -- Koordinatensystem

NULL,

SDO_ELEM_INFO_ARRAY(

1, 2, 3 -- 1,2,3 = NURBS-Kurve

),

SDO_ORDINATE_ARRAY (

3, -- Grad der Kurve (3=Kubisch) "d"

7, -- Es gibt 7 Kontrollpunkte "m"

0, 0, 1, -- 1. Kontrollpunkt

-50, 100, 1, -- :

20, 200, 1,

50, 350, 1,

80, 200, 1,

90, 100, 1,

30, 0, 1, -- 7. Kontrollpunkt

11, -- Der Knotenvektor hat 11 Elemente = d + m + 1

0, 0, 0, 0, -- Normalisierter Knotenvektor

0.25, 0.5, 0.75, -- Start bei 0 - Ende bei 1

1, 1, 1, 1 -- Ansteigend

)

)

Page 18: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

19 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Metadaten für Simple Features

• USER_SDO_GEOM_METADATA

• Syntax: insert into user_sdo_geom_metadata (

table_name,

column_name,

diminfo,

srid)

values (

'GEOM_TAB_2D',

'geometry',

sdo_dim_array(

sdo_dim_element('Lon',-180,180,0.005),

sdo_dim_element('Lat',-90,90,0.005)),

4326);

Page 19: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

20 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Räumlicher Index

• R-Tree Index

– Approximierung der einzelnen Geometrien

über Minimal Bounding Box

• Aufbau:

• Syntax:create index geom_tab_2d_six on geom_tab_2d (geometry)

indextype is mdsys.spatial_index;

Page 20: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

21 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Koordinatensysteme

• Über 4.000 Koordinatensysteme

– Geodätisch

– Kartesisch als Projektion

– Kartesisch ("Non-Earth")

– Eigene Koordinatensysteme möglich

– Tabelle MDSYS.CS_SRS

– GPS-Koordinatensystem SRID = 4327 (Spatial Reference ID)

• EPSG-Unterstützung

• PL/SQL-Paket SDO_CS

• Automatische Koordinatensystem-Transformationen

Page 21: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

22 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Oracle Spatial: DreidimensionalGeometrische Elemente

Oberflächen

Körper

einfach zusammengesetzt Triangulated Irregular Network (TIN)

einfach zusammengesetzt Punktwolke (Point Cloud)

Page 22: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

23 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Topologien, Netzwerke und LRS

• Topologien

– Datenmodell zur Speicherung von Topologien (TDM)

– Unterstützung für topologische Beziehungen

– Basis für Konsistenzprüfung topol. Daten

• Netzwerke

– Datenmodell zur Speicherung von Netzwerken (NDM)

– Explizite Speicherung von Knoten und Kanten

– Zusätzliche Attributierung der Kanten und Knoten

– Analyseoperationen

– Network Data Model Editor

• Lineare Bezugssysteme

Page 23: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

24 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Linear ReferencingBeispiel: Dynamische Berechnung von Streckenabschnitten

Page 24: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

25 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Geokodierung in der Datenbank

• Umwandlung von Adressen (oder Points of Interest) in

Koordinaten und umgekehrt (REVERSE GEOCODING)

select sdo_gcdr.geocode(

'ODF_EU_Q312',

sdo_keywordarray('Riesstr. 25','München'),

'DE',

'DEFAULT') as geocode

from dual

/

Page 25: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

26 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Routing in der Datenbank

• Dynamische Link-Kosten

• Kosten eines Links nun abhängig

vom Zeitpunkt des Erreichens

• Entsprechende Daten im

Netzwerk

• Out-of-the-Box Unterstützung:

– Nokia Traffic Patterns (ODF)

Zeitbasierte Netzwerkanalyse

Page 26: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

27 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Routing in der DatenbankBeispiel: Schnellste mögliche Route

Page 27: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

28 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Räumliche Abfragen und Analysen

Fokus: Vektordaten

Page 28: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

29 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Räumliche Anfragen und Analysen

• Standard-Anfragesprache SQL

– Geobasis-, Geofach- und Sachdaten gemeinsam anfragen

• Über 400 räumliche Operatoren und Funktionen u.a. für

– Räumliche Analyse

– Von der Adresse zur Koordinate und umgekehrt (Geocoding, Reverse Geocoding)

– Spatial Mining

• Über 4000 räumliche Bezugssysteme

– Automatische Koordinatentransformation

– EPSG-Unterstützung

– Eigene Bezugssysteme können definiert werden

• Weitere Zugriffe über PL/SQL, Java API

– Vollständig dokumentiert

Page 29: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

30 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Räumliche Funktionen

• Topologische Operatoren

– Inside Contains

– Touch Disjoin

– Covers Covered By

– Equal Overlap Boundary

• Distanz-Operatoren

– Within Distance

– Nearest Neighbor

In SQL

Inside

Within Distance

Page 30: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

31 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Räumliche Funktionen

• Verschneidungen (Auswahl)– Union

– Difference

– Intersect

– XOR

– Buffer

– Centroid

– ConvexHull / ConcaveHull

• Berechnungen (Auswahl)– Length

– Area

– Distance

– Volume

Union

XOR

Intersect

Original

Difference

Page 31: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

32 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Beliebige Abfragen

• Welche Kunden mit Umsatz sind in Brandenburg?

select name, umsatz

from customers c, geo_laender gl

where sdo_anyinteract(c.geometry, gl.geometry) = 'TRUE'

and gl.feature_name='Brandenburg'

and umsatz is not null and umsatz > 0;

Page 32: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

33 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Ad-hoc Koordinatentransformation

Page 33: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

34 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Räumliche BerechnungenWo ist der Mittelpunkt von Deutschland?

Daten bereitgestellt von GfK GeoMarketing

Page 34: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

35 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Räumliche BerechnungenIn welchem Bundesland liegt der Mittelpunkt?

Daten bereitgestellt von GfK GeoMarketing

Page 35: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

36 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Räumliche BerechnungenLängen- und Breitengrad zum Mittelpunkt anzeigen

Daten bereitgestellt von GfK GeoMarketing

Page 36: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

37 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Räumliche BerechnungenNearest Neighbor

Daten bereitgestellt von GfK GeoMarketing

Page 37: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

38 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Geocoding

Referenz-Daten bereitgestellt von NAVTEQ

Page 38: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

39 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Reverse Geocoding

Referenz-Daten bereitgestellt von NAVTEQ

Page 39: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

40 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Visualisierung von Geodaten

Page 40: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

41 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

JDBC

Map Cache Server

Oracle

Database

Oracle Application

Server / WebLogic

Server / Standalone

OC4J / Glassfish

Client(Browser)

Application

XML/HTTPJavaScript Map API

MapBuilder

FOI Server

Map Rendering Engine

Geobasisdaten

Geofachdaten

Sachdaten

Geocoding-Daten

Map

Cache

Kartendefinitionen:

Styles, Themes,

Base Maps

Oracle MapViewer / MAPSArchitektur

Page 41: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

42 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

JDBC

Map Cache Server

Oracle

Database

Oracle Application

Server / WebLogic

Server / Standalone

OC4J / Glassfish

Client(Browser)

Application

XML/HTTPJavaScript Map API

MapBuilder

FOI Server

Map Rendering Engine

Geobasisdaten

Geofachdaten

Sachdaten

Geocoding-Daten

Map

Cache

Kartendefinitionen:

Styles, Themes,

Base Maps

Oracle MapViewer / MAPSIntegration externer Datenquellen

Page 42: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

43 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Oracle MapViewer / MAPSKartendienste - Provider und Client gleichermassen

Beispiel: MapViewer als Client eines Kartendienstes (WMS - DNM ) der Landesvermessung und Geobasisinformation Brandenburg

Page 43: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

44 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Oracle MapViewer / MAPS

• Base Map (Tile Layers)

– Statisch

– Kacheln im Map Cache

• Theme based FOI*

– Interaktiv

– Abfrage an die Datenbank

• User Defined FOI

– Interaktiv

– Anwendungsspezifisch

• Information Window

– Informationen zu FOIs

• Fixed Figures

– Elemente mit fester Position

Aufbau einer Karte

*FOI = Feature of Interest

Page 44: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

45 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

MapViewer als Kartendienst Client

• HowTo

– http://www.oracle.com/webfolder/technetwork/de/community/apex/tipps/geo-

osm/index.html

• Schritte in der MapViewer Konsole

– Data Source anlegen

– Map Tile Layer anlegen

– Map Tile Layer prefetch (erzeugt Cache mit Kartenkacheln in den

einzelnen Zoom-Stufen)

Kartendienst von OpenStreetMap als Base Map verwenden

Page 45: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

46 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

MapViewer als Kartendienst ClientView / Edit Map Tile Layer (OpenStreetMap Beispiel)

Page 46: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

47 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Oracle MAPS API Reference + Tutorials

• Online verfügbar in jeder MapViewer Installation.

Beispiel: http://slc02okf.oracle.com/mvdemo/

Page 47: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

48 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Oracle MapViewer/MAPS in Anwendung

Page 48: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

49 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Fluglärmkarten (öffentlich) mit MapViewerFraport (http://framap.fraport.de)

Page 49: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

50 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Beispiele für Integration Spatial Technologies

in das Oracle Portfolio

Page 50: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

51 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

MapViewer und BI auf mobilem Endgerät

Page 51: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

52 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Page 52: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

53 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Page 53: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

54 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Weiterführende Informationen

Page 54: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

55 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Links

• Oracle Locator und Spatial

– OTN

http://www.oracle.com/us/products/database/options/spatial/overview/index.html

– Blogs http://oracle-spatial.blogspot.com , https://blogs.oracle.com/oraclespatial/

– Forum https://forums.oracle.com/forums/forum.jspa?forumID=76

• Oracle Fusion Middleware MapViewer

– OTN http://www.oracle.com/us/products/middleware/overview/index.html

– Blog http://oracle-maps.blogspot.com

– Forum https://forums.oracle.com/forums/forum.jspa?forumID=727

Page 55: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

56 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Q&A

Page 56: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

57 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Page 57: Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies

58 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.