pins polygons and perspectives - wordpress.com · pins polygons & perspectives about accenture...

66
Pins Polygons & Perspectives 1 Pins Polygons and Perspectives Visualizing Geographic Data in APEX Christoph Ruepprich Accenture Enkitec Group

Upload: others

Post on 17-Apr-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives1

Pins Polygons and Perspectives Visualizing Geographic Data in APEX

Christoph Ruepprich Accenture Enkitec Group

Page 2: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Who Am I?

● Dad & Husband ● Consultant @ Accenture an Enkitec Group ● DBA/Developer ● Fitness ● Bass player ● Board gamer

2

ruepprich.wordpress.com

@CRuepprich

cruepprich

[email protected]

Page 3: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

About Accenture Enkitec Group

● Result of acquisition of Enkitec by Accenture in May 2014 ● Global systems integrator focused on the

Oracle platform ● Headquartered in Dallas, Texas ● Consultants average 15+ years of Oracle

experience ● ~20 Oracle ACE members on staff

3

Page 4: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

What is covered?

● Geocoding ● Mapping APIs ● Interacting with database ● Pins and Polygons ● Third party data

44

Page 5: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

What’s Covered

● Geolocation ● Map APIa ● Rendering Maps ● Third Party Data ● Relationships

5

Page 6: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

First we need…

6

Data!Turn addresses into geographic coordinates

Page 7: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Coordinates

7

Page 8: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Layers use Coordinates

● Pins ● Polygons ● Lines ● Routes ● etc.

8

Page 9: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Geocoding Webservices

● Find coordinates from and address

9

Reverse Geocoding● Find address from coordinates

Page 10: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives10

Geocoding Webservices

Page 11: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Geocoding with

● Uses SQL!

11

https://query.yahooapis.com/v1/public/yql?q=select * from geo.placefinder where text="1400 6th Ave, Seattle, WA 98101"https://query.yahooapis.com/v1/public/yql?q=select * from geo.placefinder where text="1400 6th Ave, Seattle, WA 98101"

● Output XML or JSONhttps://query.yahooapis.com/v1/public/yql?format=json&q=select * from geo.placefinder where text="1400 6th Ave, Seattle, WA 98101"

https://query.yahooapis.com/v1/public/yql?format=json&q=select * from geo.placefinder where text="1400 6th Ave, Seattle, WA 98101"

https://developer.yahoo.com/yql/guide/usage_info_limits.html

Page 12: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Geocoding with

12

Sample XML result

Page 13: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Geocoding with

13

● Other queries

select * from local.search where zip='76051' and query='hair cut'

select * from weather.forecast where woeid=2502265

Page 14: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Geocoding with

● Use maps.googleapis.com

14

http://maps.googleapis.com/maps/api/geocode/xml?sensor=false&address=1400 6th Ave, Seattle, WA 98101http://maps.googleapis.com/maps/api/geocode/xml?sensor=false&address=1400 6th Ave, Seattle, WA 98101

json?

Page 15: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Geocoding with

15

Sample result:

Page 16: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Reverse Geocoding with

● Use maps.googleapis.com

16

http://maps.googleapis.com/maps/api/geocode/xml?latlng=40.714224,-73.961452http://maps.googleapis.com/maps/api/geocode/xml?latlng=40.714224,-73.961452

json?

Page 17: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

ReverseGeocoding with

17

Page 18: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Geocoding with

● Apex Plug-in ● Creates collection ● Results in report on collection ● Good with PL/SQL

18

Page 19: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Which geocoding service do I use?

● Many other services available ● Check cost and usage limits ● Check response times ● Bulk processing ● Verify results

19

Page 20: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives20

Processing the Results

Page 21: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

What to do with the results

● Store XML/JSON result in clob ● Parse result and loop through arrays ● Store results in table or collection

and/orRender on map

21

Basic Steps:

Page 22: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

What to do with the results

● XML - Use Oracle’s built in XML functions ● Good when processing results with PL/SQL

● JSON - ● Good with JavaScript ● PLJSON package (sourceforge)

http://sourceforge.net/projects/pljson/My Blog: http://wp.me/pRyVI-k1

22

Page 23: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives23

We have coordinates.

Page 24: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Mapping with● Optional Free API Key - Get usage stats ● Extensible ● Usage Limit: 25k map loads per day

(don’t quote me on that) ● Excellent Documentation ● API Reference ● Examples

24

https://developers.google.com/maps/

Page 25: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Mapping with● You need

● Javascript Library ● API Key (optional)

25

Page 26: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Mapping with● Requires Application Key (Free) ● Extensible ● Good Documentation / Examples

26

https://developer.yahoo.com/maps/flash/jsGettingStarted.html

https://developer.yahoo.com/maps/ajax/v2start.html

Page 27: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Mapping with● You need

● Javascript Library ● API Key

27

Page 28: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Mapping with

● Sample Geolocation Showcase (Apex 4.2.5) ● Mapping through Plug-Ins ● See Carsten Czarski’s Presentation:

Location Data for Everyone - in APEX 4.2.5. What the Sample Geolocation Showcase can do for you. ODTUG Webinars

28

Page 29: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Mapping with

● You Need ● Plug-Ins

29

Page 30: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Mapping with● Free API ● Lightweight ● Good for Mobile ● Use other tile servers ● Extensible ● Concise coding

30

http://leafletjs.com/

Page 31: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Mapping with● You need

● JS Library ● CSS Style Sheet

31

Page 32: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Tile Layers with

32

http://leaflet-extras.github.io/leaflet-providers/preview/

Page 33: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

API Comparisons

● http://robinlovelace.net/software/2014/03/05/webmap-test.html

33

Page 34: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

How to display Javascript maps

● HTML Region with <div> <div id=“map” style=“min-height:500px;”>!

● Javascript ● Include libraries ● Renders map in div

34

Page 35: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

How to display Oracle maps

● Map Region Plugin ● Marker Plugins

35

Page 36: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives36

Demo Simple Map

Page 37: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives37

Interacting with Map and Database

Page 38: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Interacting with the Database

38

Page 39: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Data Example

39

ID Brand Latitude Longitude

1 Shell 32.34321 -97.398834

2 Valero 32.15534 -97.19984

3 Exxon 33.92234 -94.88223

Gas Stations

Page 40: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Convert to JSON

40

ID Brand Latitude Longitude

1 Shell 32.34321 -97.398834

2 Valero 32.15534 -97.19984

3 Exxon 33.92234 -94.88223

Gas Stations

{ "stations":[ { "id":"1", "brand":"Shell", "lat":32.343214, "lng":-97.398834 }, { "id":"2", "brand":"Valero", "lat":32.15534, "lng":-97.19984 }, { "id":"3", "brand":"Exxon", "lat":33.92234, "lng":-94.88223 } ] }P110_JSON

Page Item:

Page 41: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Convert to JSON with PL/SQL Loop

41

!begin for c1 in (select NAME, LAT, LNG from gas_stations) loop - -Build JSON string … end loop; - - Store string in page item :P110_JSON := l_json; — - For On Demand Process use - - htp.p(l_json); end;

• Page Process • On Demand Process

Store large JSON objects in collection CLOB.

Page 42: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Loop Through JSON

42

var json = JSON.parse($v('P110_JSON')); //json contains “stations” object var gs = json.stations;

for (var i=0;i<gs.length;i++){ var latlng = new L.LatLng(gs[i].lat ,gs[i].lng); var marker = L.marker(latlng); marker.addTo(map); markersArr.push(marker); }

Page 43: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Keep Track of Markers/Polygons

43

markersArr[0].lat = 123 markersArr[0].lng = 456

markersArr[1].lat = 123 markersArr[1].lng = 456

Page 44: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Remove Markers/Polygons

44

for (var i=0;i<markersArr.length;i++){ //remove markers to the map using map.removeLayer(markersArr[i]); }

• Loop through markers array and remove each one from the map

Page 45: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Add Popup

● Add ‘on-click’ event listener to each marker

45

markersArr[0].bindPopup(‘Some html text’);

Page 46: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Circles

● Lat/Lng to define center ● Radius

46

Page 47: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Polygons

● Use arrays ● Add events ● Multiple points

47

var corners =[]; corners[0] = new L.LatLng(47.65521295468833 ,-122.41790771484375); corners[1] = new L.LatLng(47.663537612601345,-122.1734619140624); corners[2] = new L.LatLng(47.56170075451973 ,-122.18719482421874); corners[3] = new L.LatLng(47.56077405523748 ,-122.43301391601562); ! polygon = L.polygon(corners); ! polygon.addTo(map);

Page 48: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives48

Demo Gas Stations

Page 49: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives49

Third Party Data

Page 50: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

WKT - Well Known Text

● Polygons can have thousands of points ● Complex geometries from 3rd party providers

50

Page 51: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

WKT - Well Known Text

51

http://en.wikipedia.org/wiki/Well-known_text

Page 52: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

WKT - Well Known Text

52

http://en.wikipedia.org/wiki/Well-known_text

Page 53: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Sample Data

● 177 Zip Codes ● 792 Polygons ● 52,060 Coordinates ● in under 2 seconds!

53

Page 54: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives54

Demo Zip Codes

Page 55: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives55

Finding Relationships

Page 56: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Oracle Locator/Spatial● Built into Oracle Database ● Functions and procedures to handle geometric

data ● SDO_GEOMETRY object Not supported with locator ● Advanced functions:

● Difference ● Intersection ● Union ● Etc.

56

Page 57: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Using third party WKT

Steps: ● Populate sdo_geometry column ● Set SRID (Spatial Reference ID) ● Set Metadata (USER_SDO_GEOM_METADATA) ● Create Index (MDSYS.SPATIAL_INDEX)

57

Page 58: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Convert WKT to SDO Geometry

58

WKT SDO Geometry

sdo_util.from_wktgeometry()

Page 59: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Zip Codes Table

59

ZIP WKT GEOM

76051 MULTIPOLYGON ((( MDSYS.SDO_GEOMETRY(2001,8307,MDSYS.SDO_POINT_TYPE(-97.094171,32.934568,NULL),NULL,NULL)

90210 MULTIPOLYGON ((( MDSYS.SDO_GEOMETRY(…

98101 MULTIPOLYGON ((( MDSYS.SDO_GEOMETRY(…

Page 60: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

SDO_GEOMETRY

60

SDO_GEOMETRY( 2001 -- SDO_GTYPE: point ,4326 -- SDO_SRID (coordinate system) ,MDSYS.SDO_POINT_TYPE(lon, lat, NULL) -- POINT_TYPE ,NULL -- SDO_ELEM_INFO_ARRAY ,NULL -- SDO_ORDINATE_ARRAY )

● GTYPE: Geometry types (Points,Lines,Polygons, etc.)

● SRID: (MDSYS.CS_SRS) Coordinate system (2D,3D, Locale, etc.)

● POINT_TYPE: (x,y,z) ● ELEM_INFO_ARRAY: How to interpret ORDINATE_ARRAY. ● ORDINATE_ARRAY: Array of points

Page 61: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Calculate Distance

61

select SDO_GEOM.SDO_DISTANCE( MDSYS.SDO_GEOMETRY( 2001 , 4326 , MDSYS.SDO_POINT_TYPE(1, 1, NULL) , NULL , NULL ), MDSYS.SDO_GEOMETRY( 2001 , 4326 , MDSYS.SDO_POINT_TYPE(2, 2, NULL) , NULL , NULL ) ,1 -- within 1m tolerance ,'unit=m' -- meters ) AS dist_in_meters from dual; !

Page 62: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

● Gas Stations within 5km ● SDO_WITHIN_DISTANCE

Calculate Distance

62

SELECT * FROM gas_stations g WHERE SDO_WITHIN_DISTANCE( g.geom , MDSYS.SDO_GEOMETRY( 2001 , 4326 , MDSYS.SDO_POINT_TYPE(- 97.078686, 32.939251, NULL) , NULL , NULL ) ,'distance = 5 unit=km' ) = 'TRUE'

Observer Point

Page 63: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Calculate Area

63

select SDO_GEOM.SDO_AREA( SDO_GEOMETRY( 2003 -- GTYPE: two-dimensional polygon ,4326 -- SRID ,NULL -- POINT TYPE ,SDO_ELEM_INFO_ARRAY(1,1003,1) ,SDO_ORDINATE_ARRAY(3,3, 6,3, 6,5, 4,5, 3,3) ) ,1) AREA from dual;

Page 64: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Contains

64

sdo_contains(polygon.geom,point.geom) = ‘TRUE’

Page 65: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives65

Demo Contains

Page 66: Pins Polygons and Perspectives - WordPress.com · Pins Polygons & Perspectives About Accenture Enkitec Group Result of acquisition of Enkitec by Accenture in May 2014 Global systems

Pins Polygons & Perspectives

Q&A

66

Q & A