0% found this document useful (0 votes)
74 views16 pages

IntroductionToMappinginOracleUsingHERE Maps

Introducción al mapping
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views16 pages

IntroductionToMappinginOracleUsingHERE Maps

Introducción al mapping
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

HERE,

 a  Nokia  Business  
 

 
 
Introduction  to  Mapping  and  Location  
Analytics  in  Oracle  using  HERE  Map  
Content    
 
A  HERE  White  Paper  
 
 
More and more, businesses are requiring the capability to show assets on a map, and, more importantly, to visualize their
key performance indicators geographically in a clear and concise way. This is driving applications developers, who
understand the need to easily add maps and analytics into their applications. HERE provides the geographic data that
fuels many of the location analytics and mapping applications in Oracle. This document provides an overview of the
capabilities available to Oracle users.
 
 
By  Dan  Abugov  
Business  Development  Manager  and  Consultant  
HERE  
 

 
©  2014  Nokia    
HERE,  a  Nokia  Business   2  
 

 
Disclaimer
This content is provided "as-is" and without warranties of any kind, either express or implied, including, but not limited to,
the implied warranties of merchantability, fitness for a particular purpose, satisfactory quality and non-infringement.
NAVTEQ does not warrant that the content is error-free and NAVTEQ does not warrant or make any representations
regarding the quality, correctness, accuracy, or reliability of the content. You should therefore verify any information
contained in the content before acting on it.

To the furthest extent permitted by law, under no circumstances, including without limitation NAVTEQ's negligence, shall
NAVTEQ be liable for any damages, including, without limitation, direct, special, indirect, punitive, consequential,
exemplary and/or incidental damages that result from any content, even if NAVTEQ or an authorised representative has
been advised of the possibility of such damages.

Introduction  to  Mapping  and  Location  Analytics                                                                                                                          ©  Nokia  2014                      


In  Oracle  using  HERE  Map  Content                                                                                    
 
HERE,  a  Nokia  Business   3  
 

Table  of  Contents  


1  Introduction.............................................................................................................................................. 4  
2  Overview  or  Oracle's  Location  Technologies ................................................................................ 4  
2.1  The  Spatial  Data  Type:  SDO_GEOMETRY   5  
2.2  Location  Queries   8  
2.3  Oracle  Locator  and  Oracle  Spatial  &  Graph   10  
2.4  Oracle  Fusion  Middleware  MapViewer   11  
2.5  Oracle  Map  Builder   12  
2.6  Oracle  JDeveloper   13  
2.7  HERE  Map  Data   14  
2.8  Setup  to  use  HERE  Map  Data  in  MapViewer   14  
 
 
Figure  1:  Point  feature  representation.....................................................................................................................................................................................5  
Figure  2:  Line  feature  representation.......................................................................................................................................................................................6  
Figure  3:  Polygon  (area)  feature  representation.................................................................................................................................................................6  
Figure  4:  Feature  representations  can  change  based  on  zoom  level ..........................................................................................................................7  
Figure  5:  Airport  and  road  representations  change...........................................................................................................................................................7  
Figure  6:  Oracle  architecture  supporting  map  rendering............................................................................................................................................. 11  
Figure  7:  MapViewer  rendered  map  example.................................................................................................................................................................... 12  
Figure  8:  MapViewer  GUI  eliminates  the  need  to  understand  XML ......................................................................................................................... 13  

Introduction  to  Mapping  and  Location  Analytics                                                                                                                          ©  Nokia  2014                      


In  Oracle  using  HERE  Map  Content                                                                                    
 
HERE,  a  Nokia  Business   4  
 

 
1  Introduction  
 
Oracle continues to invest making maps and location-enabled applications available to all developers and applications.
The use of Oracle database components like Oracle Locator and Oracle Spatial & Graph continues to expand rapidly, and
Oracle MapViewer is included in every Oracle Application Server/Fusion Middleware installation. These technologies are
enabling next generation mapping and location analysis capabilities in the Oracle database and application server.

More and more, businesses are requiring the capability to show assets on a map, and, more importantly, to visualize their
key performance indicators geographically in a clear and concise way. This is driving applications developers, who
understand the need to easily add maps and into their applications.

Oracle and HERE have been collaborating to provide turn-key map and other content specifically created for the Oracle
platform for over a decade This content conforms to the Oracle Locator and Oracle Spatial & Graph standards for
Mapping and Location Analysis, Geocoding, and Routing. HERE Map content includes pre-built tables and indexes and
installs in minutes using Oracle Transportable Tablespaces. HERE Map content is utilized by many Oracle Applications,
and HERE continues to innovate and create new content that enables new and enhanced usage withint the Oracle
ecosystem.

This paper will discuss the underlying technologies that make mapping and location analysis available in Oracle.

2  Overview  or  Oracle's  Location  Technologies  


Oracle databases (Express, Personal, Standard and Enterprise Editions) all include built-in storage, index, and query
capabilities for location data. We can define location data as coordinates that represent the location of a feature on the
surface of the Earth. Using stored location information from an Oracle database we have the ability to show features on a
map as well as analyze features based on interactions and proximity to other features. This feature of the Oracle
database is called Oracle Locator.

Oracle’s WebLogic Application server includes the ability to render maps for display in a wide variety of web-based
applications. The map rendering component of the application server is called Oracle Fusion Middleware MapViewer.

Putting mapping aside momentarily, the built-in location capabilities in all Oracle databases include the ability to analyze
information geographically, allowing us to answer questions such as:

How many hotels are within two miles of a convention center?


How many of my customers have average household income of greater than $67,000?
What is the closest ATM to my current location?

In addition to mapping and the abovementioned analysis capabilities, Oracle Spatial & Graph is an option with Oracle
Enterprise Edition. Oracle Spatial & Graph includes advanced capabilities beyond the basic capabilities shown above,
with functionality such as Geocoding, Routing, Image Storage and retrieval, Network Analysis, Topology, Web Services,
and a lot more.

Introduction  to  Mapping  and  Location  Analytics                                                                                                                          ©  Nokia  2014                      


In  Oracle  using  HERE  Map  Content                                                                                    
 
HERE,  a  Nokia  Business   5  
 

 
2.1  The  Spatial  Data  Type:  SDO_GEOMETRY  
The Oracle database includes the SDO_GEOMETRY data type, which is used to store location data. Any table can
include one or more columns of type SDO_GEOMETRY. When creating a table use the SDO_GEOMETRY data type for
the column definition, or add a location column to an existing table in Oracle by using the ALTER TABLE command. The
syntax for adding a location column is:

ALTER TABLE CUSTOMERS


ADD COLUMN LOCATION(SDO_GEOMETRY);

Column naming conventions follow normal Oracle identifier rules. Above, the column name is LOCATION, but any
identifier can be used.

SDO_GEOMETRY is used to store the location on the surface of the Earth of a feature. What kind of feature?

It can define a point feature such as an address, an automobile location, a point of interest, a survey marker, etc.

 
Figure  1:  Point  feature  representation

Above, the school, the police and sheriff’s department, the courthouse, and the bus stop are all represented by a single
point.

Introduction  to  Mapping  and  Location  Analytics                                                                                                                          ©  Nokia  2014                      


In  Oracle  using  HERE  Map  Content                                                                                    
 
HERE,  a  Nokia  Business   6  
 

SDO_GEOMETRY can also define a linestring to represent a linear feature such as a road, a river, or a railway line.

Figure  2:  Line  feature  representation  

SDO_GEOMETRY can also define a polygon to represent an area feature such as a country, state, park, lake, harbor,
ocean, etc.

Figure  3:  Polygon  (area)  feature  representation  

Introduction  to  Mapping  and  Location  Analytics                                                                                                                          ©  Nokia  2014                      


In  Oracle  using  HERE  Map  Content                                                                                    
 
HERE,  a  Nokia  Business   7  
 

When features are included on a map, the map creator may decide to display them differently based on the zoom scale of
the map. For instance, San Diego International Airport is appropriately rendered as a point when zoomed out, but when
zoomed in it is rendered as a polygon.

Figure  4:  Feature  representations  can  change  based  on  zoom  level  

Figure  5:  Airport  and  road  representations  change  

Introduction  to  Mapping  and  Location  Analytics                                                                                                                          ©  Nokia  2014                      


In  Oracle  using  HERE  Map  Content                                                                                    
 
HERE,  a  Nokia  Business   8  
 

2.2  Location  Queries  


Location queries are used to analyze relationships between data. Because location queries are based on simple
extensions to SQL any application can enjoy the benefits of location analysis.

Examples of SQL associated with location queries follow. Note the HERE Map data for most of the queries in this paper
are available in downloadable form from the Oracle Technology Network at:
http://www.oracle.com/technetwork/database/options/spatialandgraph/downloads/navteq-lic-168395.html

How many hotels are within two miles of Moscone Center? To answer this question we use a within distance query.

SELECT COUNT(*)
FROM NTC_MAP_POI_BUSINESS B, NTC_MAP_POI_HOTEL A
WHERE SDO_WITHIN_DISTANCE(A.GEOMETRY,B.GEOMETRY,
'DISTANCE=2 UNIT=MILE')='TRUE'
AND B.NAME='MOSCONE CENTER';

COUNT(*)
-------
319

We can extend this query as we can extend any SQL query. For instance, if we wanted to see how many Marriott or
Westin hotels are within two miles we could structure our query like this:

SELECT A.NAME
FROM NTC_MAP_POI_BUSINESS B, NTC_MAP_POI_HOTEL A
WHERE SDO_WITHIN_DISTANCE(A.GEOMETRY,B.GEOMETRY,
’DISTANCE=2 UNIT=MILE’)=’TRUE’
AND B.NAME='MOSCONE CENTER'
AND (A.NAME LIKE ’%MARRIOTT%’
OR A.NAME LIKE ’%WESTIN%’);
NAME
----------------------------------
MARRIOTT-FISHERMAN'S WHARF
JW MARRIOTT-SAN FRANCISCO
WESTIN-ST FRANCIS
MARRIOTT-SAN FRANCISCO-DOWNTOWN
WESTIN-SAN FRANCISCO MARKET STREET

Introduction  to  Mapping  and  Location  Analytics                                                                                                                          ©  Nokia  2014                      


In  Oracle  using  HERE  Map  Content                                                                                    
 
HERE,  a  Nokia  Business   9  
 

Each of the previous queries allow users to do location analysis to solve a typical business problem, and yet none of them
required display on a map. One of the interesting and unusual pieces of Oracle’s location capabilities is that often the
results of location analysis provide information in which the results have no location component.

The second question we asked is how many of my customers have average household income of greater than $67,000?
To answer this question we use a relationship query, which tells us if there is a spatial interaction between an area of
interest and a search column. In the case below, the area of interest is each of the census demographic areas that have
a median income > $67,000, and the search column is the stored location of each of the customers.

SELECT COUNT(*)
FROM BLOCK_GROUP B, CUSTOMERS A
WHERE B.MED_HOUSEHOLD_INCOME > 67000
AND SDO_ANYINTERACT (A.LOCATION,GEOMETRY)='TRUE';

As with the previous query, this analysis can be extended to see what these customers tend to buy so marketing outreach
can be properly targeted. Also demographic analysis can be extended to look at number of children, population density,
race, or any one of a number of factors the census keeps track of. In addition, other spatial analysis can be incorporated
(do people who live near golf courses buy golf equipment, or do people who live near bodies of water buy insect repellent
and/or boat equipment and/or fishing gear).

The third question we asked above was: What is the closest ATM to my current location? To answer this question we
use a nearest neighbor query. Current location can be determined easily through interfaces creates for GPS and mobile
devices, and this kind of query is similar to those executed through programs running on those devices:

SELECT NAME
FROM NTC_MAP_POI_BUSINESS A
WHERE SDO_NN(A.GEOMETRY,
SDO_GEOMETRY(2001,8307,SDO_POINT_TYPE(
-122.40953, 37.79388, NULL),NULL,NULL),
'SDO_BATCH_SIZE=8')='TRUE'
AND A.CAT_ID = 3578
AND ROWNUM < 4;

NAME
------------------------------
BANK OF THE WEST
BNP PARIBAS
FIRST REPUBLIC BANK

Introduction  to  Mapping  and  Location  Analytics                                                                                                                          ©  Nokia  2014                      


In  Oracle  using  HERE  Map  Content                                                                                    
 
HERE,  a  Nokia  Business   10  
 

To return the closest ATM of a specific type (in this case Bank of America) the previous query can be modified:

SELECT NAME||', '||POI_HOUSE_NUMBER||' '||POI_STREET_NAME AS ADDR


FROM NTC_MAP_POI_BUSINESS A
WHERE SDO_NN(A.GEOMETRY,
SDO_GEOMETRY(2001,8307,SDO_POINT_TYPE(
-122.40953, 37.79388, NULL), NULL, NULL),
'SDO_BATCH_SIZE=8')='TRUE'
AND A.CAT_ID = 3578
AND NAME LIKE '%BANK OF AMERICA%'
AND ROWNUM < 4;

ADDR
---------------------------------
BANK OF AMERICA, 163 BRANNAN ST
BANK OF AMERICA, 345 3RD ST
BANK OF AMERICA, 55 HAWTHORNE ST

2.3  Oracle  Locator  and  Oracle  Spatial  &  Graph  


Oracle Locator is component of every Oracle Database. All of the functionality referenced above, including the ability to
store, index, and query location information is included in Oracle Locator. Oracle Locator also includes other functionality
which is beyond the scope of this paper.

Oracle Spatial takes all of the functionality of Oracle Locator and expands it in many ways, some of which are useful to
the many applications that can utilize location analysis, and others which are quite specialized in their application and use
of the technology.

Some of the additional capabilities of Oracle Spatial & Graph include:

o Geocoding
o Geocoding is the process of assigning a longitude and latitude (the location on the Earth) to an
address. It is a major requirement of business and mapping applications. Once locations on the Earth
are assigned to addresses, spatial analysis and mapping is possible. HERE Map content enables
geocoding in Oracle.
o Raster Imagery Storage and Retrieval
o Linear Referencing
o Spatial Boolean Functions
o Topology Data Model
o Network Data Model, enabled for the Road Network with HERE Map Content
o LIDAR Data Storage and Retrieval (Point Clouds)
o Spatial Analysis and Mining
o Tin Storage and Retrieval

Introduction  to  Mapping  and  Location  Analytics                                                                                                                          ©  Nokia  2014                      


In  Oracle  using  HERE  Map  Content                                                                                    
 
!"#"$%&%'()*&%+,-*./--! 88!
!

o Spatial Aggregation
o Spatial Web Services including:
o Geocoding
o Routing
! Routing used in Oracle applications to help people easily navigate between locations. In
addition, routing is used for transportation analysis (how much should I charge a customer if I
have to pick something up at location A and deliver it to location B) and for marketing analysis
(if I put a store at a particular location, how many customers can drive to it within a ten minute
drive time). HERE provides the routing data that is used by Oracle applications.
o Yellow Pages
o Web Catalog Service

0=>%?:&<4/%T,-*(.%M*;;4/A&:/%M&GU*/A/:%
Every Oracle Application Server includes MapViewer, a middle tier map drawing/rendering/mashup component.
MapViewer renders location data directly from the database and includes APIs to render data from other sources as well,
including HERE Platform Services.
In addition MapViewer uses centralized information (map metadata) that includes the rules associated with how maps are
styled and displayed to users. This map metadata is easily managed using the map authoring tool which is part of
MapViewer, called Map Builder.
MapViewer make is very easy for web-based/web accessible applications to include maps. MapViewer includes Java,
XML, Open Geospatial Consortium Web Mapping Service (OGC WMS), and JSP APIs

I*51/<!NJ!;/+28<!+/2B*.<2.1/<!:144(/.*-5!H+4!/<-0</*-5!

,-./(012.*(-!.(!3+44*-5!+-0!6(2+.*(-!7-+89.*2:!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"!'()*+!#$%&!!!!!!!!!!!
,-!;/+28<!1:*-5!=>?>!3+4!@(-.<-.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
HERE,  a  Nokia  Business   12  
 

Below is an example of a map rendered by Oracle Fusion Middleware MapViewer.

Figure  7:  MapViewer  rendered  map  example  

2.5  Oracle  Map  Builder  


Oracle Fusion Middleware MapViewer uses metadata to describe the visual representation of the features stored in the
database. There are three different types of metadata that describe how maps are rendered:

• Styles
o Can control fill color, border color, line thickness, line style, text font and size, and so on
o Stored as XML in view USER_SDO_STYLES
• Themes
o A geometry column associated with a style
o A text label column can also be associated with a theme. The label column has its own style (size, font,
color, and other attributes)
o Stored as XML in view USER_SDO_THEMES
• Maps
o One or more themes
o Stored as XML in view USER_SDO_MAPS

Oracle Map Builder is Oracle’s map authoring tool created to manage map metadata. Oracle Map Builder creates and
manages XML metadata associated with styles, themes, and maps (plus a lot of other things) via a simple GUI.

Introduction  to  Mapping  and  Location  Analytics                                                                                                                          ©  Nokia  2014                      


In  Oracle  using  HERE  Map  Content                                                                                    
 
HERE,  a  Nokia  Business   13  
 

Figure  8:  MapViewer  GUI  eliminates  the  need  to  understand  XML  

2.6  Oracle  JDeveloper  


Oracle JDeveloper is an integrated development environment (IDE) with end-to-end support for modeling, developing,
debugging, optimizing, and deploying Java applications and Web services. Oracle JDeveloper supports the full
application development life cycle.

Oracle JDeveloper simplifies the development of rich internet applications by providing an Application Development
Framework (ADF) that minimizes the requirements to write infrastructure code. It is based on a Model-View-Controller
design pattern:

• Model – Handles data interactions and business logic


• View – Handles user interface components
• Controller – Handles application flow/interactions between Model and View components

Rich internet applications require full-featured user interfaces, and JDeveloper meets this need with ADF Faces. ADF
Faces includes a large set of predefined GUI components such as pie charts, bar charts, graphs, dials, etc. ADF Faces
also supports partial page rendering/AJAX.

Importantly, for this application ADF Faces also includes a geoMap component which simplifies the process of adding a
map and showing your business data in your internet application.

Introduction  to  Mapping  and  Location  Analytics                                                                                                                          ©  Nokia  2014                      


In  Oracle  using  HERE  Map  Content                                                                                    
 
HERE,  a  Nokia  Business   14  
 

 
3  HERE  Map  Data  
HERE, a Nokia business, provides turnkey content for mapping, location analytics, geocoding and routing that meets the
specification for inclusion in Oracle Application via Oracle Locator and Spatial. A data sample is available from the Oracle
Technology Network. Registered OTN users can download the data by logging into OTN and clicking this link:

http://www.oracle.com/technetwork/database/options/spatialandgraph/downloads/navteq-lic-168395.html

3.1  HERE  Maps  in  Oracle  Apps  


The same data you can download for sample use is used by many Oracle Applications. All of the Oracle applications
that require map content use HERE Map data. A list of application that require HERE Map data and/or that can integrate
HERE Map content is:

Oracle eLocation Services http://maps.oracle.com/elocation/ajax


Oracle E-Business Suite Field Service Advanced Scheduler
Oracle Utilities Mobile Workforce Management
Oracle Business Intelligence Enterprise Edition (OBIEE)
Oracle Real-time Scheduler
Oracle Transportation Management

3.2  Setup  to  use  HERE  Map  Data  in  MapViewer  


To use the sample content in a mapping application, follow the steps below.

After deploying Oracle Fusion Middleware MapViewer into the application server, make sure to create a jdbc connection
to the database that is started whenever the application server is started. To do this, go to the MapViewer deployment
(for example: http://localhost:7001/mapviewer ).

Next, click on the Admin button in the upper right hand side of the MapViewer page:

Figure  9:  Goto  MapViewer  Admin  page  

Introduction  to  Mapping  and  Location  Analytics                                                                                                                          ©  Nokia  2014                      


In  Oracle  using  HERE  Map  Content                                                                                    
 
HERE,  a  Nokia  Business   15  
 

Next, click on Configuration in the upper right:

Figure  10:  Click  Configuration  

On the configuration page, slide way down until you come to where the connection strings are defined. Add a connection
string for the HERE_SF user or the user you imported the sample data into. Make sure the connection string is not inside
an XML comment (not between <!-- and --> :

Figure  11:Slide  down  and  add  HERE_SF  credentials  

Introduction  to  Mapping  and  Location  Analytics                                                                                                                          ©  Nokia  2014                      


In  Oracle  using  HERE  Map  Content                                                                                    
 
HERE,  a  Nokia  Business   16  
 

Note the jdbc_password is preceded by an exclamation point (!). When the application server is restarted the password is
encrypted. Next, at the bottom of the page, click on Save & Restart:

Now you are ready to use HERE Map Content in a mapping application.
 
 
About  HERE  
 
HERE,  a  Nokia  business,  offers  HERE  Map  Content  and  the  HERE  Platform,  a  cloud-­‐based  location  platform  that  
delivers  the  world’s  best  maps  to  enterprises  and  governments  around  the  globe.    HERE  is  the  Oracle-­‐preferred  
supplier  of  geographic  content  to  Oracle  Applications.  To  learn  more  about  HERE,  visit  
http://www.here.com/business/enterprise.  
 
 

Introduction  to  Mapping  and  Location  Analytics                                                                                                                          ©  Nokia  2014                      


In  Oracle  using  HERE  Map  Content                                                                                    
 

You might also like