March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User...

36
March 2007 Oracle Spatial User Conference

Transcript of March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User...

Page 1: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

Page 2: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

Oracle Spatial User Conference

March 8, 2007Henry B. GonzalezConvention Center

San Antonio, Texas USA

Page 3: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

Jon ScarbroughWhere2GetIt

Page 4: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

Slippymaps andOracle Spatial

Page 5: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

Who We Are – What We Do

• Where2GetIt – leading provider of productand store locators• We help consumers find our clients products either

online or offline• Web and IVR• Over 450 Brands (Olive Garden, Office Depot,

Sony, Viewsonic, Outback Steakhouse, ColumbiaSportswear, etc)

Page 6: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

Sample client

Page 7: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

What does Oracle Spatial dofor Where2GetIt?

• Provides• Address level Geocoding

• Driving Directions

• Reverse Geocoding

Page 8: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

Our Implementation

• Already a current Navteq client• Use both NA and WE data sets

• Loading process

• Infrastructure

• Use in Slippymaps.com & legacy apps

Page 9: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

Loading Process

• Converted Navteq shapefiles to Oracle tables• Wrote conversion utility – 10x faster than shp2sdo

• Extract data from Oracle tables into schemaspecific models for Geocoder and Router• Wrote SQL scripts w/help from Dev team

• Wrote additional SQL to optimize process

• Future – transportable tablespaces fromNavteq

Page 10: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

Infrastructure• 2 – OC4J servers running geocoder and

routing engines• 2 – 10G Enterprises database servers with

Oracle Spatial extension• Each OC4J server uses its own database

server• OC4J servers – 16G RAM – Opteron 244• 10G DB servers – 8G RAM – Opteron 244• openSuSE 10.2

Page 11: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

Infrastructure

OC4J Server 10G Database

W2GI App Cluster

Page 12: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

OC4J Servers

• Ran siege tests to determine load capacity• Geocoding

• Routing

• Optimized OC4J environment

• Determined 16G was optimal configuration tokeep maximum # of partitions in RAM

• Thank you Chuck for your assistance

Page 13: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

Geocoding Siege Results

Page 14: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

Routing Siege Results

Page 15: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

OC4J Servers

• Configuration parameters - Geocoder

<parameters cache_admin="false"

cache_postcode="true"

fuzzy_string_distance="70"

fuzzy_leading_char_match="4"

debug_level="0"/>

Page 16: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

OC4J Servers

• Configuration parameters – Router• All route requests are pre-gecoded

<init-param>

<param-name>partition_cache_size_limit</param-name>

<param-value>2048</param-value>

</init-param>

Page 17: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

OC4J Servers

• Server startup

java -server -Xms14000m -Xmx14000m

-XX:NewSize=4000m

-XX:MaxNewSize=4000m

-Dsun.rmi.dgc.server.gcInterval=1200000

-Dsun.rmi.dgc.client.gcInterval=1200000

Page 18: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

OC4J Servers

• Numerous Parser Profile changes for US• 3% improvement in address matching

P, TRAILER, TRLRP, TRAILER, TRLR, TRLR.<format form="0*1" effective="0-1" output="$" /><format form="10* 10*" effective="0-2" output="$" /><format form="0*-1" effective="0-1" output="$"> <exception form="0*-N" /> <exception form="0*-S" /> <exception form="0*-E" /> <exception form="0*-W" /></format>

Page 19: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

Oracle Spatial API

<geocode_request vendor="elocation"> <address_list> <input_location id="27010"> <input_address match_mode=“default"> <us_form2 street="500 oracle pky" city="redwood

city" state="ca"/> </input_address> </input_location> </address_list></geocode_request>

Page 20: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

W2GI API

• Mimicked Spatial API

• Enhanced for our use and integration with ourproducts

Page 21: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

W2GI API – Example XML<request>

<appkey>17F2494F-4B9A-3A7D-8D08-2B38D1132AB6</appkey><formdata id="geocoder">

<geolocs><geoloc>

<addressline>363 milano drive, cary, il</addressline><street></street><city></city><region></region><postalcode></postalcode><country>US</country>

</geoloc><geoloc>

<addressline></addressline><street></street><city></city><region></region><postalcode></postalcode><country></country>

</geoloc></geolocs>

</formdata></request>

Page 22: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

W2GI API – URI Encoded

http://api.slippymap.com/ajax?&xml_request=%3Crequest%3E%3Cappkey%3E17F2494F-4B9A-3A7D-8D08-2B38D1132AB6%3C%2Fappkey%3E%3Cformdata%20id%3D%22geocoder%22%3E%3Cgeolocs%3E%3Cgeoloc%3E%3Caddressline%3E363%20milano%20drive%2C%20cary%2C%20il%3C%2Faddressline%3E%3Cstreet%3E%3C%2Fstreet%3E%3Ccity%3E%3C%2Fcity%3E%3Cregion%3E%3C%2Fregion%3E%3Cpostalcode%3E%3C%2Fpostalcode%3E%3Ccountry%3EUS%3C%2Fcountry%3E%3C%2Fgeoloc%3E%3Cgeoloc%3E%3Caddressline%3E%3C%2Faddressline%3E%3Cstreet%3E%3C%2Fstreet%3E%3Ccity%3E%3C%2Fcity%3E%3Cregion%3E%3C%2Fregion%3E%3Cpostalcode%3E%3C%2Fpostalcode%3E%3Ccountry%3E%3C%2Fcountry%3E%3C%2Fgeoloc%3E%3C%2Fgeolocs%3E%3C%2Fformdata%3E%3C%2Frequest%3E

Page 23: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

W2GI API – Result XML<?xml version=‘1.0’ encoding=‘UTF-8’?>

<response code="1">

<collection name="address" count="1" state="0">

<address>

<address1>363 MILANO DR</address1>

<address2></address2>

<city>CARY</city>

<country>US</country>

<county></county>

<edge_id>116094805</edge_id>

<georesult>10 ORAADDRESS</georesult>

<latitude>42.20347493456848</latitude>

<longitude>-88.26325199350477</longitude>

<percent>0.4583333333333333</percent>

<postalcode>60013</postalcode>

<province></province>

<side>R</side>

<state>IL</state>

</address>

</collection>

</response>

Page 24: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

W2GI API

• This approach allows just about any internetconnected application or device to make ageospatial call.

• Just plain old HTTP Get

Page 25: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

W2GI Search API

• Combine Batch Route requests with spatialquery

• Able to do proximity search by drive time ordrive distance (market differentiator)

Page 26: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

Batch Route Request Example<batch_route_request id="8" route_preference="shortest" road_preference="highway" return_driving_directions="false" distance_unit="mile" time_unit="minute"> <start_location> <input_location id="1" longitude="-71.06901807362172" latitude="42.35157803334855"

/> </start_location> <end_location> <input_location id="2" longitude="-71.07497366666666" latitude="42.35154583333333"

/> </end_location> <end_location> <input_location id="3" longitude="-71.45937299307225" latitude="42.70784494226865"

/> </end_location></batch_route>

Page 27: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

W2GI Search API<request>

<appkey>17F2494F-4B9A-3A7D-8D08-2B38D1132AB6</appkey><formdata id="locatorsearch">

<dataview>store_default</dataview><searchradius>20</searchradius><radiusuom>mile</radiusuom><timeuom>minute</timeuom><proximitymethod>drivetime</proximitymethod><sort>time</sort><cutoff>20</cutoff><cutoffuom>minute</cutoffuom><geolocs>

<geoloc><addressline>10011</addressline><street></street><city></city><region></region><country>US</country>

<geoloc></geolocs><route>

<routepreference>fastest</routepreference><roadpreference>highway</roadpreference>

</route></formdata>

</request>

Page 28: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

W2GI Geocode API• Shown in prior slides

• Enhanced by creating our own city/postal interfaceusing the OC4J platform

• Java servlet

• Integrated multiple data sources into custom tables• GNIS

• Navteq city/postal

• Melissa Data

• Evox

• Future - neighborhood

Page 29: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

W2GI Reverse Geocode API

<request>

<appkey>17F2494F-4B9A-3A7D-8D08-2B38D1132AB6</appkey>

<formdata id="reversegeocoder">

<geolocs>

<geoloc>

<latitude>42.20347493456848</latitude>

<longitude>-88.26325199350477</longitude>

<country>US</country>

</geoloc>

</geolocs>

</formdata>

</request>

Page 30: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

W2GI Driving Direction API<request>

<appkey>79FCB260-BF9B-3C91-84AC-C8B0A9E5ED89</appkey><formdata id="drivingdirections">

<geolocs><geoloc>

<addressline>9825 capitol drive, wheeling, il</addressline></geoloc><geoloc>

<address1>537 N HICKS RD</address1><city>PALATINE</city><state>IL</state><postalcode>60067</postalcode><latitude>42.1196936009636</latitude><longitude>-88.0337901829532</longitude><country>USA</country><province></province>

</geoloc></geolocs>

<route> <language>english|spanish|french|german|italian</language <routepreference>shortest|fastest</routepreference> <roadpreference>highway|local</roadpreference> <returndrivingdirections>true|false</returndrivingdirections> <returnroutegeometry>true|false</returnroutegeometry> <returnsegmentgeometries>true|false</returnsegmentgeometries> </route>

</formdata></request>

Page 31: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

D E M O N S T R A T I O N

W2GI APIs

March 2007Oracle Spatial User Conference

Page 32: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

W2GI API use inSlippymap.com

• AJAX platform

• AJAX calls make URI encoded API call

• W2GI javascript libraries update web pagewith result XML

Page 33: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

Slippymap.com

• Using Openlayers & Prototype libraries forcore mapping and AJAX functions

• Added W2GI libraries to provide locatorfunctionality

• Would like to see Oracle Mapserver AJAXlibrary integrated into Openlayers

Page 34: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

D E M O N S T R A T I O N

Slippymap.com

March 2007Oracle Spatial User Conference

Page 35: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and

March 2007Oracle Spatial User Conference

AQ&

Page 36: March 2007 Oracle Spatial User Conference · 2007-04-03 · March 2007 Oracle Spatial User Conference Who We Are – What We Do •Where2GetIt – leading provider of product and