geodatenmanagement und -visualisierung mit oracle spatial technologies
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
1 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
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
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
4 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Oracle Spatial Technologies
Überblick
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
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
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
8 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
(Geo-)Datenmanagement in der Oracle DB
Integrierter Zugriff auf Geo-, Fach- und Sachdaten
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
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
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)
13 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Architektur
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
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
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
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)
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
)
)
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);
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;
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
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)
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
24 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Linear ReferencingBeispiel: Dynamische Berechnung von Streckenabschnitten
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
/
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
27 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Routing in der DatenbankBeispiel: Schnellste mögliche Route
28 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Räumliche Abfragen und Analysen
Fokus: Vektordaten
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
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
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
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;
33 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Ad-hoc Koordinatentransformation
34 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Räumliche BerechnungenWo ist der Mittelpunkt von Deutschland?
Daten bereitgestellt von GfK GeoMarketing
35 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Räumliche BerechnungenIn welchem Bundesland liegt der Mittelpunkt?
Daten bereitgestellt von GfK GeoMarketing
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
37 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Räumliche BerechnungenNearest Neighbor
Daten bereitgestellt von GfK GeoMarketing
38 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Geocoding
Referenz-Daten bereitgestellt von NAVTEQ
39 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Reverse Geocoding
Referenz-Daten bereitgestellt von NAVTEQ
40 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Visualisierung von Geodaten
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
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
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
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
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
46 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
MapViewer als Kartendienst ClientView / Edit Map Tile Layer (OpenStreetMap Beispiel)
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/
48 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Oracle MapViewer/MAPS in Anwendung
49 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Fluglärmkarten (öffentlich) mit MapViewerFraport (http://framap.fraport.de)
50 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Beispiele für Integration Spatial Technologies
in das Oracle Portfolio
51 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
MapViewer und BI auf mobilem Endgerät
52 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
53 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
54 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Weiterführende Informationen
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
56 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Q&A
57 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
58 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.