Más contenido relacionado Similar a Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies (20) Más de Karin Patenge (16) Geodatenmanagement und -Visualisierung mit Oracle Spatial Technologies1. 1 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
2. Geodaten-Management in der Oracle DB
Geodaten-Visualierung mit Oracle MapViewer
Karin Patenge | karin.patenge@oracle.com
Oracle Deutschland B.V. & Co. KG
2 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
3. 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
3 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
5. ORACLE Spatial Technologies
Aus Sicht der Datenbank
Vector Performance Accelerator
Vektordaten (2D)
Räumlicher Index (R-Tree)
Koordinatentransformation
Räumliche Abfragen
5 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Routing
Geocoding
Geodienste
Vektordaten (3D, 4D)
Spatial
Locator
Georaster, Rasteralgebra
Punktwolken, TINs
Topologie & Netzwerkmodelle
Räumliche Verschneidungen
Räumliche Analysen und Mining
Details: http://docs.oracle.com/cd/E16655_01/appdev.121/e17896/sdo_locator.htm#SPATL340
6. Spatial Technologies
Lösungssicht
• 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!)
6 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
HTTP
Fusion Middleware
MapViewer
MapViewer / MAPS
JDBC
Oracle Database
Oracle Locator
Oracle Spatial
Oracle Spatial
Raster Networks 3D
SOA
7. Oracle Database (Full Use)
Fachliche
Kompo-nenten
7 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Konkrete Lösungsapplikation
Fachliche Lösungen
Geodaten
Räumliche Abfragen
Räumliche Indizes
Verschneidungen
Daten-Manipulationen
Räumliches Mining
J2EE compliant
Application Server
Kartendarstellung
Geodienste
Routenberechnung
Oracle BI / Apps /
mobile Anwendungen ...
Map-
Viewer
Geo-dienste
3rd
Party
Geodaten
Sach-daten
Andere
8. (Geo-)Datenmanagement in der Oracle DB
Integrierter Zugriff auf Geo-, Fach- und Sachdaten
8 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
9. Einheitliches Datenmanagement
• Management komplexer Daten
– Datentypen, Methoden & mehr
• Zugriff über standardisierte
Schnittstellen
• Plattformunabhängig
• Skalierbar
• Sicher
• Robust
9 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
10. Oracle Technology Network
http://docs.oracle.com/cd/E16655_01/nav/portal_7.htm
10 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
11. 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)
12 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
13. Geodaten-Unterstützung in jeder Oracle DB
Geometrische Elemente (OGC Simple Features)
Punkt
Polygon
Linenzug
Polygon
"mit Loch"
14 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Optimiertes
Polygon
Kreisbogen
Zus.ges.
Linienzug
Parametrisierte
Kurve
Zus.ges.
Polygon
14. Der Datentyp SDO_GEOMETRY
Simple Features konform
ID FEATURE_NAME GEOMETRY ...
NUMBER VARCHAR2 SDO_GEOMETRY ...
15 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Tabellendefinition
SDO_GTYPE NUMBER
SDO_SRID NUMBER
SDO_POINT SDO_POINT_TYPE
SDO_ELEM_INFO SDO_ELEM_INFO_ARRAY
SDO_ORDINATES SDO_ORDINATE_ARRAY
15. Tabelle mit Geometriedaten
Punkte (GPS-Koordinaten)
• Syntax:
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
• Datentyp: SDO_GEOMETRY
16 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
16. Parametrisierte Kurven
Non-Uniform Rational B-Spline (NURBS)
• 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
17 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
17. 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
)
)
18 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
18. 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);
19 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
19. 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;
20 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
20. 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
21 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
21. Oracle Spatial: Dreidimensional
Geometrische Elemente
einfach zusammengesetzt Triangulated Irregular Network (TIN)
Oberflächen
Körper
einfach zusammengesetzt Punktwolke (Point Cloud)
22 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
22. 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
23 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
23. Linear Referencing
Beispiel: Dynamische Berechnung von Streckenabschnitten
24 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
24. 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
/
25 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
25. Routing in der Datenbank
Zeitbasierte Netzwerkanalyse
• 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)
26 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
26. Routing in der Datenbank
Beispiel: Schnellste mögliche Route
27 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
27. Räumliche Abfragen und Analysen
Fokus: Vektordaten
28 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
28. 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
29 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
29. Räumliche Funktionen
In SQL
• Topologische Operatoren
– Inside Contains
– Touch Disjoin
– Covers Covered By
– Equal Overlap Boundary
• Distanz-Operatoren
– Within Distance
– Nearest Neighbor
30 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Inside
Within Distance
30. Räumliche Funktionen
• Verschneidungen (Auswahl)
– Union
– Difference
– Intersect
– XOR
– Buffer
– Centroid
– ConvexHull / ConcaveHull
• Berechnungen (Auswahl)
– Length
– Area
– Distance
– Volume
31 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Union
Intersect
XOR
Original
Difference
31. 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;
32 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
33. Räumliche Berechnungen
Wo ist der Mittelpunkt von Deutschland?
34 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Daten bereitgestellt von GfK GeoMarketing
34. Räumliche Berechnungen
In welchem Bundesland liegt der Mittelpunkt?
35 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Daten bereitgestellt von GfK GeoMarketing
35. Räumliche Berechnungen
Längen- und Breitengrad zum Mittelpunkt anzeigen
36 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Daten bereitgestellt von GfK GeoMarketing
36. Räumliche Berechnungen
Nearest Neighbor
37 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Daten bereitgestellt von GfK GeoMarketing
37. Geocoding
38 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Referenz-Daten bereitgestellt von NAVTEQ
38. Reverse Geocoding
39 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Referenz-Daten bereitgestellt von NAVTEQ
40. Client
(Browser)
Oracle Application
Server / WebLogic
Server / Standalone
OC4J / Glassfish
Map
Cache
41 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
JDBC
Map Cache Server
Oracle
Database
Application
XML/HTTP
JavaScript Map API
FOI Server
Map Rendering Engine
MapBuilder
Geobasisdaten
Geofachdaten
Sachdaten
Geocoding-Daten
Kartendefinitionen:
Styles, Themes,
Base Maps
Oracle MapViewer / MAPS
Architektur
41. Client
(Browser)
Oracle Application
Server / WebLogic
Server / Standalone
OC4J / Glassfish
Map
Cache
42 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
JDBC
Map Cache Server
Oracle
Database
Application
XML/HTTP
JavaScript Map API
FOI Server
Map Rendering Engine
MapBuilder
Geobasisdaten
Geofachdaten
Sachdaten
Geocoding-Daten
Kartendefinitionen:
Styles, Themes,
Base Maps
Oracle MapViewer / MAPS
Integration externer Datenquellen
42. Oracle MapViewer / MAPS
Kartendienste - Provider und Client gleichermassen
Beispiel: MapViewer als Client eines Kartendienstes (WMS - DNM ) der Landesvermessung und Geobasisinformation Brandenburg
43 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
43. Oracle MapViewer / MAPS
Aufbau einer Karte
• 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
44 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
*FOI = Feature of Interest
44. MapViewer als Kartendienst Client
Kartendienst von OpenStreetMap als Base Map verwenden
• 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)
45 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
45. MapViewer als Kartendienst Client
View / Edit Map Tile Layer (OpenStreetMap Beispiel)
46 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
46. Oracle MAPS API Reference + Tutorials
• Online verfügbar in jeder MapViewer Installation.
Beispiel: http://slc02okf.oracle.com/mvdemo/
47 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
49. Beispiele für Integration Spatial Technologies
in das Oracle Portfolio
50 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
50. MapViewer und BI auf mobilem Endgerät
51 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
51. 52 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
52. 53 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
54. 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
55 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
55. 56 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Q&A
56. 57 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
57. 58 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.