More Related Content Similar to Database@Home - Maps and Spatial Analyses: How to use them (20) Database@Home - Maps and Spatial Analyses: How to use them1. Copyright © 2020, Oracle and/or its affiliates
Maps and spatial analyses:
How to use them
Nick Salem
Distinguished Engineer
Neustar
Jayant Sharma
Product Manager
Oracle
Starts at Noon ET
2. 2 Copyright © 2020, Oracle and/or its affiliates | Confidential: Internal/Restricted/Highly Restricted [Date]
Jayant Sharma
Product Manager
About your presenters:
Nick Salem
Distinguished Engineer
Technical Chair, Oracle Spatial SIG
20 Oracle Certifications. Hiker, traveler.
3. Spatial Features for Developers
1 Overview
2 Use Cases
3 Features for developers
4 Neustar use case
5 Q&A
3 Copyright © 2020, Oracle and/or its affiliates
4. Copyright © 2020, Oracle and/or its affiliates4
Spatial
• Analyzing and relating information based on location
• Everything happens somewhere!
Are events occurring within a mile of each other? Which is the
nearest? Which tax zone is this in? Where can we deliver within
35 minutes? Which are in my sales territory? Is this built in a
flood zone?
5. Copyright © 2020, Oracle and/or its affiliates5
Spatial features of Oracle Database
Topologies
3D / LiDAR
Networks
Web Services (OGC)Geocoding RoutingDeployable Components Mapping
Location
Tracking
(Geofencing)
Studio
Address
Geocoding
Linear
Referencing
Raster
Polygons
Lines
Customers
Assets
Incidents
Pipelines
Highways
Utility lines
Counties
Sales regions
Flood zones
Points
6. Copyright © 2020, Oracle and/or its affiliates6
Spatial features of Oracle Database
Topologies
3D / LiDAR
Networks
Web Services (OGC)Geocoding RoutingDeployable Components Mapping
Polygons
Lines
Points
Location
Tracking
(Geofencing)
Studio
Address
Geocoding
Linear
Referencing
Raster
Precision farming
Natural resources
Intelligence
7. Copyright © 2020, Oracle and/or its affiliates7
Spatial features of Oracle Database
Topologies
Networks
Web Services (OGC)Geocoding RoutingDeployable Components Mapping
Polygons
Lines
Points
Location
Tracking
(Geofencing)
Studio
Address
Geocoding
Linear
Referencing
Raster
3D / LiDAR
City modeling
Utilities
Transportation
8. Copyright © 2020, Oracle and/or its affiliates8
Spatial features of Oracle Database
Topologies
3D / LiDAR
Web Services (OGC)Geocoding RoutingDeployable Components Mapping
Polygons
Lines
Points
Location
Tracking
(Geofencing)
Studio
Address
Geocoding
Raster
Transportation
Utilities
Rail
Linear
Referencing
Networks
9. Copyright © 2020, Oracle and/or its affiliates9
Spatial features of Oracle Database
Topologies
3D / LiDAR
Web Services (OGC)Geocoding RoutingDeployable Components Mapping
Polygons
Lines
Points
Studio
Raster
Linear
Referencing
Location
Tracking
(Geofencing)
Logistics
Marketing
Public Safety
Networks
Address
Geocoding
10. Copyright © 2020, Oracle and/or its affiliates10
Native Spatial Type
SQL> desc countries
Name Null? Type
-------- ----- ------------------
ID NUMBER
ISO_A3 VARCHAR2(3)
NAME VARCHAR2(26)
GEOMETRY SDO_GEOMETRY
SQL>
SQL> SELECT geometry
2 FROM countries
3* WHERE name='Aruba’;
GEOMETRY
-----------------------------------------
SDO_GEOMETRY(2003, 8307, NULL,
SDO_ELEM_INFO_ARRAY(1, 1003, 1),
SDO_ORDINATE_ARRAY(-69.8760919, 12.42720123, -
69.879425, 12.45340118, -69.9150301,
12.49686106, -69.9238926, 12.51903025, -
69.935649, 12.5316393, -69.9961879,
12.57737295, ...
11. Copyright © 2020, Oracle and/or its affiliates11
Spatial query
SQL> SELECT name
2 FROM countries
3 WHERE sdo_contains(
4 geometry,
5 SDO_GEOMETRY(2001,8307,
6 SDO_POINT_TYPE(-99.3, 23.1, NULL), NULL, NULL))
7 = 'TRUE';
NAME
--------------------------
Mexico
12. Copyright © 2020, Oracle and/or its affiliates12
Spatial SQL, PL/SQL API
Copyright © 2019 Oracle and/or its affiliates. Oracle Confidential – Internal/Restricted/Highly Restricted
• 100’s of spatial operators and functions
• From basic to advanced
• From general purpose to specialized
13. Geocoder
Generates latitude/longitude (points) from address
International addressing
Formatted and unformatted addresses
Tolerance parameters for fuzzy matching
Address correction
PL/SQL and XML (web service) API
Record-level and batch processes
Data providers: Here (Navteq), Tom Tom ...
14. Georaster
A data type to store raster data
• Aerial photographs, remote sensing imagery, gridded data
• Geo Referencing information
- Relates image pixels to a longitude/latitude on Earth’s surface
Features
• Storage and indexing of raster data
• Generate resolution pyramid, blocking, mosaicking,
compression, clipping
• Raster algebra
Precision farming use case: Predictive Analytical Model to
• Increase the crop yield
• Minimize water, fertilizer, human capital costs
• Use all available sensor based data sources
• GeoRaster provides all the storage models and analytics
required for building such an application
15. Spatial Networks
Network Data Model
• A data model to store network structures in the database
• Explicitly stores and maintains connectivity of the network
• Attributes at link and node level
Network Analysis
• Tracing and routing
- K- Shortest path, TSP, multi-vehicle multi-stop
- Reachability, minimum spanning tree
• Network-based searches
- Within cost, nearest neighbor
• User-defined constraints
Supports very large networks
• Network partitioning
• Hierarchical networks
• Contraction Hierarchy (precomputed routes, extremely fast)
16. Copyright © 2020, Oracle and/or its affiliates16
Development with Spatial
Spatial features
Java
Python
Node.js
REST
SQL, PL/SQL
SDOAPI
Web Services (OGC)Geocoding Routing StudioMappingDeployable Components
cx_Oracle
node-oracledb
ORDS
APIs
JDBC
17. Copyright © 2020, Oracle and/or its affiliates17
Spatial support for JSON/GeoJSON
• In-database JSON extended to support
Spatial operations
• SDO_GEOMETRY constructors extended to
take JSON as input
• Spatial index and queries extended to
operate on JSON documents
• SQL utility functions for conversion between
SDO_GEOMETRY and JSON/GeoJSON
SQL> SELECT json_value(
2 '{"type":"Point", "coordinates":
3 [-122.1, 22.1]}', '$’
4 RETURNING sdo_geometry)
5 FROM dual;
GEOMETRY
------------------------------------
MDSYS.SDO_GEOMETRY(2001, 4326,
MDSYS.SDO_POINT_TYPE(-122.1, 22.1,
NULL), NULL, NULL)
18. Copyright © 2020, Oracle and/or its affiliates18
Spatial with Oracle REST Data Services (ORDS)
• Java JEE mid tier application (also supported “Standalone” mode)
• For input, maps/binds URI to SQL and PL/SQL
• For output, transforms results to JSON and other formats
• Ships with Oracle Database and SQL Developer
Oracle REST Data ServicesHTTP(S) client Oracle Database
SQL/PLSQLMap & BindURI
JSON Transform to JSON SQL Result Set
REST-enables the Oracle database
19. Copyright © 2020, Oracle and/or its affiliates19
Spatial with Oracle REST Data Services (ORDS)
Supports spatial out-of-the-box
20. Copyright © 2020, Oracle and/or its affiliates20
Spatial with Oracle REST Data Services (ORDS)
GeoJSON can be returned
21. Copyright © 2020, Oracle and/or its affiliates | Confidential: Internal/Restricted/Highly Restricted21
Insert spatial AND techcast days slide here
23. SPEAKER BIO – NICK SALEM
§ 20 Oracle Certified Professional / Expert / Specialist credentials
(DBA, RAC, Data Guard, Performance Tuning, Spatial, Security,
Data Warehouse, SQL & Advanced PL/SQL Development)
§ 20+ years experience developing enterprise geospatial analytical
applications
§ Recipient of the 2011 Oracle Spatial Excellence Award in
Innovation
§ Technical Chair of Oracle Spatial & Graph SIG since 2012
Copyright © 2020 Neustar, Inc. All Rights Reserved
24. AGENDA
§ Neustar – Quick Intro
§ Geospatial Analytics with ElementOne
§ Query Spatial Data and Site Impact Analysis
§ Heat Maps, Drive Times and Aerial Maps
§ Consolidation and Aggregation
§ Trade Area Construction
§ Spatial Vector Acceleration
Copyright © 2020 Neustar, Inc. All Rights Reserved
25. ABOUT NEUSTAR
Copyright © 2020 Neustar, Inc. All Rights Reserved
For over 20 years, Neustar’s
unique capabilities have made it a
leader in the field of responsible
identity resolution.
26. Copyright © 2020 Neustar, Inc. All Rights Reserved
2626
Neustar provides
intelligent identity-
based solutions to
help our clients drive
greater efficiency and
effectiveness
Know & Understand
My Customers
Attract New
Consumers
Improve My
Performance
Future-proof My
Business
27. Copyright © 2020 Neustar, Inc. All Rights Reserved
Onboarding &
Offboarding
Activation &
Measurement
Privacy &
Compliance
Enrichment &
Segmentation
Resolution &
Deduplication
Consolidation &
Normalization
WHAT MAKES NEUSTAR UNIQUE?
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
28. Copyright © 2020 Neustar, Inc. All Rights Reserved
§All of the top ten U.S. banks
§All of the ten largest card issuers
§All of the top four U.S. wireless carriers
§Eight of the top ten insurance carriers
§Eight of the top ten auto finance providers
§Four of the top five cable TV providers
§Seven of the top 15 utility providers
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
RESPONSIBLE IDENTITY POWERING:
29. 30
IDENTITY IS A FULL TIME JOB
75M
Consumers change
their phone carriers
45M
Consumers change
their phone numbers
60M
People relocate
2.1M
People legally
change their name
Every Year…
0%
20%
40%
60%
80%
100%
0 1 2 3 4 5 6 7 8 9 10
NUMBEROFACCURATE
IDENTITIES
YEAR
Rapid Data Degradation: 60% out of date in two years
15%
Invalid CRM Data
Per Month
Copyright © 2020 Neustar, Inc. All Rights Reserved
30. Copyright © 2020 Neustar, Inc. All Rights Reserved
Our Identity Resolution Platform, delivers actionable
identity intelligence corroborated through 50 billion daily
transactions across customer interactions, verifications
and digital interactions.
3B+
Devices
596M
US Email
Addresses
250M
People
16K
Attributes
11B
Daily Updates
50B
Daily Inquiries
Responsible identity resolution is the backbone of all our
solutions across Security, Risk, Communications & Marketing
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
32. HIGH LEVEL USE CASES:
1.Foot Traffic – by location and daypart
2.Segments/ Groups / Audiences – daypart demos, behaviors, etc.
3.Customer Profiling & Competitive Conquesting – e.g. QSR, Bank, Retail
4.Location Planning & Sponsorships – Stadiums, Real Estate
5.Closed Loop Analysis – Digital Out of HomeAdvertising
6.Location Data – as a conversion event (MTA)
Neustar can deliver mobile location intelligence for any
geographic areas with sufficient traffic density.
OVERVIEW
Copyright © 2020 Neustar, Inc. All Rights Reserved
33. CLIENT ADVISORY BOARD
MEMBERS PROVIDE ITERATIVE FEEDBACK
35
3 of the Largest
U.S. Banks
4 of the Largest Media
and Entertainment
Companies
2 Large Direct To
Consumer Brands
4 Large National
Retail Brands
Major Automotive
Manufacturer
2 Large Insurance
Providers
Major Travel and
Leisure Brand
Major Healthcare
Provider
2 Global Consumer
Package Goods
Global Advertiser Global QSR
Copyright © 2020 Neustar, Inc. All Rights Reserved
34. WHY USE IT
§ Strategic Market Planning
§ Messaging and Creative Development
§ Media Buying
§ Competitive Analysis
§ Site Optimization / Store Expansion
§ Marketing Resource Deployment
§ Improved Customer Acquisition / Cross-
Sell / Retention
Copyright © 2020 Neustar, Inc. All Rights Reserved
35. HIGH AVAILABILITY SECURITY
● 3 node RAC + 4 DG
● DB Flashback + Snapshot Standby
● RMAN (local + remote backups)
● Online redefinition + comprehensive monitoring
● TDE, VPD, role-based function privilege control
● Auditing, login trigger
TECHNOLOGY STACK
● Oracle Database 12R2 Enterprise Edition
● Spatial w GeoRaster, Network Data Model & Map Visualization
● Partitioning
● Advanced Security Option
● Real Application Clusters
● Upgrade to Oracle Database 19c Enterprise Edition in process
● Oracle Fusion Middleware 12cR2
● Oracle Cloud Control 13cR2
PERFORMANCE APPLICATION DEVELOPMENT
● Spatial Vector Acceleration
● Result set cache, optimizer stats/histograms
● Partitioning for efficient management + access
● Database resource management for hybrid processes
● 430k lines of PL/SQL and java stored procedures
● DB object types & collections, pipeline tables, anydata /
xmltype / json
● Oracle Text for biz matching & contextual search
TECHNICAL REQUIREMENTS
GEOSPATIAL FOOTPRINT
● 6.3T database size
● 5+ billion geometries (from simple to highly detailed)
● cartographics, wireless territories, congressional districts, etc
● ~1 billion mobile phone traffic regions
● US road network (71M nodes and 87M links)
● 57M US rooftops
Copyright © 2020 Neustar, Inc. All Rights Reserved
36. QUERYING SPATIAL DATA
§ Location Enabled Everywhere
– Lat/lon and address geocoding
– Linked geographies
§ Spatial Operators
– Gather data for spatial extent
– Indexed for high performance
§ Determine Topological Relationships
§ New Oracle Spatial Studio tool
– for quick and easy drag and drop
spatial visualizations and analytics
Copyright © 2020 Neustar, Inc. All Rights Reserved
37. SITE IMPACT ANALYSIS
§ Analyze current site placement
– Customer reach
– Presence of Competition
– Demand Potential
§ Site Trade Area Overlap and
Cannibalization Impact
– Non-overlapping radii
§ Site Network Optimization
Copyright © 2020 Neustar, Inc. All Rights Reserved
38. HEAT MAP THEMES
§ Identify areas with greater
concentrations of households with
specific behavior
§ Equal vs varying sized geo extents
– Geographies
– Tessellations (Hex/Square)
§ Dynamic regions
– Triangulated Irregular Networks
– Represent highs and lows of
topological terrain
Copyright © 2020 Neustar, Inc. All Rights Reserved
39. NETWORK DATA MODEL
§ Measuring Commute Time and
Accessibility
§ Large Road Network Datasets
– US Highways, Freeways, Ramps, Major
Roads & Local Roads
– Load on Demand for Scalability
§ Linear Calculations with LRS
– Traffic speeds & roadblocks
– Road direction
Copyright © 2020 Neustar, Inc. All Rights Reserved
40. MAP PROJECTIONS & TOPOLOGY
§ Geodetic Calculations
§ Coordinate System Transformation
§ Aerial and Terrain Map Overlays
– seamless base map switching
§ Topological Alignment
– geography hierarchical rollups
– shape coordinate generalization
Copyright © 2020 Neustar, Inc. All Rights Reserved
41. CONSOLIDATION AND AGGREGATION
§ Consolidate and organize large
datasets into manageable chunks
– Assign to varying sized tiles based
on rank score
§ Construct custom territories and trade
areas
– Component sub geographies
§ Construct buffered convex polygons
for point sets
Copyright © 2020 Neustar, Inc. All Rights Reserved
42. TRADE AREA CREATION
§ Shape creation and editing toolkit
– Combine, XOR, intersection,
difference
– Buffering and smoothing
– Bearing and coordinate placement
§ Compound complex polygons
– Islands and inner rings
§ Polygon cleansing and rectifying
§ GeoJSON for data transfer
Copyright © 2020 Neustar, Inc. All Rights Reserved
43. SPATIAL VECTOR ACCELERATION
§ 300x faster SDO_AGGR_UNION
§ 8x faster SDO_TOUCH
§ 6x faster SDO_WITHIN_DISTANCE
§ 6.5x faster SDO_JOIN
§ 10x faster SDO_CS.TRANSFORM
§ 3x faster SDO_GEOM.RELATE
§ 2.6 faster SDO_GEOM.DISTANCE
Copyright © 2020 Neustar, Inc. All Rights Reserved
44. Getting Started
Workshops and HoLs
• Microservices with Oracle Converged Database
• Converged Database (Spatial lab)
• Cloud Test Drive (Oracle Application Express with Spatial)
LiveSQL tutorial (write spatial queries on 19c in 5 mins!): bit.ly/LiveSQLSpatial
APEX Sample Geolocation showcase app: https://apex.oracle.com/en/solutions/apps/
46 Copyright © 2020, Oracle and/or its affiliates |
45. Resources - Oracle Database – Spatial Features
Spatial Features Homepage: oracle.com/goto/spatial
Developers Guide: https://docs.oracle.com/en/database/oracle/oracle-database/19/spatl
• Map Visualization: bit.ly/OracleMapViz
• YouTube Channel: youtube.com/c/OracleSpatialandGraph
• Blog: blogs.oracle.com/oraclespatial
• LiveSQL tutorial (write spatial queries on 19c in 5 mins!): bit.ly/LiveSQLSpatial
• Forum: bit.ly/OracleSpatialHelp
• Oracle Spatial and Graph User Group: linkedin.com/groups/1848520/
• Twitter: @SpatialHannes @JeanIhm @oraspatialsig
47. The Spatial & Graph User Community
Part of Analytics and Data User Community
• Vibrant community of tech enthusiasts –
customers, partners, students
• Sharing knowledge online, and at
conferences and events.
• Global – Americas, Europe, Africa, Asia
Join us
LinkedIn Oracle Spatial and Graph
group linkedin.com/groups/1848520/
@oraspatialsig
oraclespatialsig@gmail.com
48. 50 Copyright © 2020, Oracle and/or its affiliates | Confidential: Internal/Restricted/Highly Restricted [Date]
Coming up at 1pm ET…
Modern Application
Development: A Discussion
About The Path To Cloud
Computing
with
Gerald Venzl &
Todd Sharp &
Heli Helskyaho &
Holger Friedrich
Breaktime!
Please complete the feedback
form for the previous session
Join us on the Database@Home
slack channel for more
conversations and to answer
your questions on the database
and labs
https://bit.ly/dbhome-slack