oracle fusion 11g & maps

116
Oracle Fusion 11g & Maps A review of recent State and County implementations

Upload: lymien

Post on 27-Dec-2016

242 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Oracle Fusion 11g & Maps

Oracle Fusion 11g & Maps

A review of recent State and County implementations

Page 2: Oracle Fusion 11g & Maps

Mark Millman

Mizar, LLC [email protected]

Page 3: Oracle Fusion 11g & Maps

Enterprise Framework Goals

• Security – All components must be securable within a comprehensive and

tractable system. • Scalability

– Applications need to be scalable to support thousands or even millions of users.

• Reliability – Systems must be able to survive any threat, including total destruction

of the main computing center. • Supportability

– To be supportable enterprise applications must fit within a common family, in this case Oracle technology stack.

– Middle‐tier means lower total‐cost of ownership through centralized control and management.

– Available of source code essential for long term client control

3

Page 4: Oracle Fusion 11g & Maps

Middle‐Tier Spatial Editor? • Spatial database is not GIS!

• When is middle‐tier spatial editing indicated? – Many independent participants

• Counties in a State • Agencies and Municipalities in a large County

• Public input – Well constrained edit problem that can be defined as an

application task as compared to open‐ended GIS editing.

– Centralized control and management is central to the mission.

– Task is part of a larger middle‐tier solution.

Page 5: Oracle Fusion 11g & Maps

Common Issues

• Enterprise framework goals – Security, scalability, reliability, supportability

• Diverse data sources – Multiple structured, non‐structured, and spatial data sources

• Not GIS Systems – Spatially enabled databases – GIS is a content provider

• Comprehensive enterprise data store – Spatial is just a data type

5

Page 6: Oracle Fusion 11g & Maps

Technologies

• Java • Java Enterprise Edition (Java EE) • Java Persistence Architecture (JPA) • Eclipselink • JavaServer Faces (JSF) • MyFaces Trinidad • Oracle ADF Rich Client • Oracle Spatial • Oracle Maps

6

Page 7: Oracle Fusion 11g & Maps

West Virginia Department of Emergency Services

• 60% or more of West Virginia residences did not have street addresses

• E911 reporting doesn’t work if you cannot report an address, let alone geolocate

• Project required street addressing and site numbering supporting 55 counties – Some with GIS of many different types

– Most without

• Not possible for State tomandate Counties to use a particular GIS

• Not possible for State to impose costs on Counties

• Required centralized State operated database and management system

• Integration with Telco systems

• Must support Counties with GIS who wanted to use them

• Technologies – Oracle RDBMS & Application Server

– Oracle Spatial and MapViewer

7

Page 8: Oracle Fusion 11g & Maps

Login

8

Page 9: Oracle Fusion 11g & Maps

Credential Management

9

Page 10: Oracle Fusion 11g & Maps

Map Page

10

Page 11: Oracle Fusion 11g & Maps

Streets

11

Page 12: Oracle Fusion 11g & Maps

Many Names

12

Page 13: Oracle Fusion 11g & Maps

Change History

13

Page 14: Oracle Fusion 11g & Maps

Sites

14

Page 15: Oracle Fusion 11g & Maps

Site Details

15

Page 16: Oracle Fusion 11g & Maps

Site Photos

16

Page 17: Oracle Fusion 11g & Maps

Jobs – an ETL approach

17

Page 18: Oracle Fusion 11g & Maps

Street Editing

18

Page 19: Oracle Fusion 11g & Maps

Street Editing

19

Page 20: Oracle Fusion 11g & Maps

Street Editing

20

Page 21: Oracle Fusion 11g & Maps

Street Editing

21

Page 22: Oracle Fusion 11g & Maps

Street Editing

22

Page 23: Oracle Fusion 11g & Maps

Street Editing

23

Page 24: Oracle Fusion 11g & Maps

Production Statistics

24

Page 25: Oracle Fusion 11g & Maps

Production Statistics

25

Page 26: Oracle Fusion 11g & Maps

Cuyahoga County, OH

26

• Greater Cleveland area • 59 independent town governments

• 30 more independent agencies

• Every conceivable GIS in use • Required County wide comprehensive spatial data repository

• Magnet application to draw voluntary participation

Page 27: Oracle Fusion 11g & Maps

Cuyahoga County, OH

27

• Federated Database – Standardized Street inventory – Site address inventory – Updated hydrography, contours, imagery and other engineering

content – Tax Parcel maps – Planning maps – Auditors land and tax records – Crime records – Property foreclosures – NAVTEQ – Gas prices – Ad hoc data

Page 28: Oracle Fusion 11g & Maps

Cuyahoga County, OH

28

• Three initial applications –MyCuyahoga

– Cuyahoga Planning

– Cuyahoga Auditors Kiosk

• Work Order Management System – Cuyahoga Co. Sanitary Sewer

Page 29: Oracle Fusion 11g & Maps

MyCuyahoga

29

Page 30: Oracle Fusion 11g & Maps

Parcel Search

30

Page 31: Oracle Fusion 11g & Maps

Link to Auditors Site

31

Page 32: Oracle Fusion 11g & Maps

Layers

32

Page 33: Oracle Fusion 11g & Maps

GeoRaster

33

Page 34: Oracle Fusion 11g & Maps

Features of Interest

34

Page 35: Oracle Fusion 11g & Maps

Features of Interest

35

Page 36: Oracle Fusion 11g & Maps

Nearest Locations

36

Page 37: Oracle Fusion 11g & Maps

Routing

37

Page 38: Oracle Fusion 11g & Maps

Save as Spreadsheet

38

Page 39: Oracle Fusion 11g & Maps

Navigation

39

Page 40: Oracle Fusion 11g & Maps

Measure Tools

40

Page 41: Oracle Fusion 11g & Maps

How Far is that Jog

41

Page 42: Oracle Fusion 11g & Maps

Quick Picks

42

Page 43: Oracle Fusion 11g & Maps

Cuyahoga Planning

43

Page 44: Oracle Fusion 11g & Maps

Parcel Details

44

Page 45: Oracle Fusion 11g & Maps

Search Area

45

Page 46: Oracle Fusion 11g & Maps

Demographics

46

Page 47: Oracle Fusion 11g & Maps

U.S.Census Reports

47

Page 48: Oracle Fusion 11g & Maps

Export to Excel

48

Page 49: Oracle Fusion 11g & Maps

Feature Query

49

Page 50: Oracle Fusion 11g & Maps

What is that?

50

Page 51: Oracle Fusion 11g & Maps

Cuyahoga Auditor Kiosk

51

Page 52: Oracle Fusion 11g & Maps

Auditor’s Parcel Warehouse

52

Page 53: Oracle Fusion 11g & Maps

Value

53

Page 54: Oracle Fusion 11g & Maps

Taxes

54

Page 55: Oracle Fusion 11g & Maps

Transfers

55

Page 56: Oracle Fusion 11g & Maps

Print Map

56

Page 57: Oracle Fusion 11g & Maps

Print Map

57

Page 58: Oracle Fusion 11g & Maps

Print Parcel Report

58

Page 59: Oracle Fusion 11g & Maps

Advanced Query

59

Page 60: Oracle Fusion 11g & Maps

Cuyahoga Sites

• Developed on beta releases – Oracle Containers for Java (OC4J) – Oracle Maps – ADF Rich Faces – EclipseLink

• Common code base – Shared Java model classes – Shared JSPX pages using ADF PageTemplates – JavaScript interface using ADF

• clientAttributes • clientListener

60

Page 61: Oracle Fusion 11g & Maps

Technologies

• Java • Java Enterprise Edition (Java EE) • Java Persistence Architecture (JPA) • Eclipselink • JavaServer Faces (JSF) • MyFaces Trinidad • Oracle ADF Rich Client • Oracle Spatial • Oracle Maps

61

Page 62: Oracle Fusion 11g & Maps

Java

• Originally released in 1995 • Syntax is similar to C#, C, & C++ • In May 2007 the majority of Java was open sourced

under a GNU license • Highly portable

– Runs on Windows, Linux, Max OS X, Solaris, and other O/S through third‐parties.

– Hardware independent • Java Virtual Machine built into Oracle database

– No marshalling required – Very fast performance

62

Page 63: Oracle Fusion 11g & Maps

Java EE • Extends Java Standard Edition (SE) for Service Oriented Architectures (SOA) • Certified implementations

– Oracle Containers for Java (OC4J) – Oracle Weblogic Server (formerly BEA) – Sun Java System Application Server – JBoss – Apache Geronimo – IBM WebShere – SAP NetWeaver – others

• APIs – Enterprise Java Beans (EJB) – Faces (JSF) – Persistence (JPA) – Transactions (JTA) – XML Streams – Java Messaging Server (JMS)

63

Page 64: Oracle Fusion 11g & Maps

JPA

• EJB 3.0 dramatically simplifies persistence using POJO Entity Beans.

• Easier to learn, program, maintain.

• Configuration by exception • Annotations

– Internal configuration

• ORM.XML – External configuration

64

Page 65: Oracle Fusion 11g & Maps

JPA Advantages

• Open Source standard ORM • Enforces good RDBMS practices • Isolates all JDBC and RDBMS issues • Enforces constraints within Java object scope • Minimizes source code • Cache management

– Memory conservation & – Performance boost

• orm.xml facilitates re‐purposing • Well documented, multiple references • It makes you a better RDBMS programmer

65

Page 66: Oracle Fusion 11g & Maps

JPA Challenges

66

Page 67: Oracle Fusion 11g & Maps

Eclipselink

• Oracle donated Toplink to the Eclipse Foundation

• Oracle team now continues development of Open Source Eclipselink

• Supports both single‐node and clustered implementations

• Supports for leading relational databases, not just Oracle

• SpatialExtensions

67

Page 68: Oracle Fusion 11g & Maps

JavaServer Faces

• A comprehensive standards‐based web application framework

• Supports JSP, XUL, and Facelets • Custom tag libraries with default UI components • A server‐side event model • Managed Beans (Application, Session, or Request scoped) • Unified Expression Language (EL) supporting bi‐directional • Analogous to ASP.NET • Extensible

Swing for the Web!

68

Page 69: Oracle Fusion 11g & Maps

JSF Overview

69

From JavaServer Faces in Action by Kito D. Mann

Page 70: Oracle Fusion 11g & Maps

JSF Compared

70

From JavaServer Faces in Action by Kito D. Mann

Page 71: Oracle Fusion 11g & Maps

JSF Client‐Server

71 From JavaServer Faces in Action by Kito D. Mann

Page 72: Oracle Fusion 11g & Maps

JSF Managed Beans

• Managed beans

– Application, Session, or Request scoped – Exposed to JSPX and Servlet

• faces‐config.xml <managed­bean>

<managed­bean­name>MapOverlayTree</managed­bean­name> <managed­bean­class>

com.mizar.trinidad.components.themes.MapOverlayTree </managed­bean­class> <managed­bean­scope>session</managed­bean­scope>

</managed­bean>

• JSF‐EL <f:inputText label=“Schema:” value="#MapOverlayTree.schema"/>

72

Page 73: Oracle Fusion 11g & Maps

MyFaces Trinidad

You really don’t want to use bare‐bones JSF

• Opensource managed by Apache MyFaces – http://myfaces.apache.org/trinidad/index.html

• Trinidad is a great JSF component implementation • You can extend your own components too. • Donated by Oracle (was ADF Faces) • Oracle remains a major contributor • Extends JSF

– Partial Page Rendering – PageFlowScope – Skinning framework – Client‐side validation – Dialog framework – Over 100 tags

73

Page 74: Oracle Fusion 11g & Maps

ADF Rich Client

• Extends MyFaces Trinidad

• Destined for Open Source • Extensive visualization components

• JavaScript API • Page Templates

• Over 150 AJAX‐enabled components

74

Page 75: Oracle Fusion 11g & Maps

Oracle Spatial • Not a GIS • Available as Spatial ($$$) and Locator (Free) • A rich‐content extension to Oracle’s RDBMS

• Integrates spatial attribution within the core RDBMS.

75 From Pro Oracle Spatial: for Oracle Database 11g by Kothuri, Godfrind, & Beinat

Page 76: Oracle Fusion 11g & Maps

Locator vs Spatial

76 From Pro Oracle Spatial: for Oracle Database 11g by Kothuri, Godfrind, & Beinat

Page 77: Oracle Fusion 11g & Maps

Oracle Spatial

77 From Pro Oracle Spatial: for Oracle Database 11g by Kothuri, Godfrind, & Beinat

Page 78: Oracle Fusion 11g & Maps

Oracle MapViewer

• A pure Java server‐side component included as part of Oracle Application Server

• Map Rendering

• Family of APIs

• MapBuilder metadata editing tool

• Creates static JPEGs / PNGs / GIF / etc.

78

Page 79: Oracle Fusion 11g & Maps

Oracle Maps

• A MapViewer client application

• Map Cache Server

• Feature of Interest (FOI) Server • Ajax‐based JavaScript mapping client API

79

Page 80: Oracle Fusion 11g & Maps

Oracle MapViewer

80 From Pro Oracle Spatial: for Oracle Database 11g by Kothuri, Godfrind, & Beinat

Page 81: Oracle Fusion 11g & Maps

Oracle Maps

81 From Pro Oracle Spatial: for Oracle Database 11g by Kothuri, Godfrind, & Beinat

Page 82: Oracle Fusion 11g & Maps

Maps JavaScript API

82

Page 83: Oracle Fusion 11g & Maps

Maps Redline

83

Page 84: Oracle Fusion 11g & Maps

Maps JavaScript API

84

Page 85: Oracle Fusion 11g & Maps

Maps JavaScript Tutorials

85

• Oracle has turned over a new leaf viz. developer support.

• Well documented • Tutorials greatly accelerate learning curve • Easily extensible • Growing set of spatial editing tools

Page 86: Oracle Fusion 11g & Maps

Mizar Jars

86

Page 87: Oracle Fusion 11g & Maps

OH Secretary of State • The one‐time creation of a state‐wide precinct boundary and polling location map

for use with HAVA voter registration and election data. – Approximately 12,000 voter precincts and other electoral boundaries from various

manuscripts sourced from county boards‐of‐election. – Boundaries must be correlated (by automated conflation) to U.S. Census Bureau TIGER

Block Boundaries. • Develop an integrated mapping application for maintenance of voting district

boundaries and other election‐related data (EMMA). – A complete production‐ready application usable by all eighty‐eight county boards of

election in Ohio. • Develop a proof‐of‐concept EAC voter registration election reporting tool with

MapViewer integration to the Oracle Business Intelligence Suite Enterprise Edition (OBIEE) Publisher. – With potential use in real‐time election day publishing

• Technology transfer including documentation, source code, mentoring and training of personnel from the Office of the Ohio Secretary of State.

87

Page 88: Oracle Fusion 11g & Maps

The data model

• U.S. Census MAF/Tiger data

• Ohio HAVA Voter database • Voter Districts and Precincts • Proposals, working and archive tables

Page 89: Oracle Fusion 11g & Maps

MAF/Tiger

Page 90: Oracle Fusion 11g & Maps

Ohio HAVA Voter Database

• Voters – Have addresses

• Addresses – Have regions

• Regions – Include precincts

• Precincts – Should have no more than 1400

voters

• Custom Geocoder – against MAF/Tiger Edges

Page 91: Oracle Fusion 11g & Maps

Voter Districts & Precincts

• Voter Districts may be – Actual – Precinct boundaries match VTD boundaries

– Pseudo – Precinct boundaries cross Census Block boundaries and therefore cannot match VTD boundaries which are collections of Census Blocks

Page 92: Oracle Fusion 11g & Maps

Editing Voting Districts

• VTD Editing – Simply involves adding, removing, transffering Census Blocks (TABBLOCK) between VTDs

• Precinct (Pseudo‐VTD editing) –Match actual VTD by default

– Adding, removing, transferring FACES.

– Editing boundaries • Requires synchronization of boundary edits for coincident Precincts

Page 93: Oracle Fusion 11g & Maps

Proposal Management

• Proposals – Supports multiple proposals

– Requires SOS authorization

– Once authorized finalization drops alternatives

Page 94: Oracle Fusion 11g & Maps

Login Page

Page 95: Oracle Fusion 11g & Maps

Credential Management

Page 96: Oracle Fusion 11g & Maps

Create Proposal

Page 97: Oracle Fusion 11g & Maps

Find Census Blocks for VTD

Page 98: Oracle Fusion 11g & Maps

Faces / Edges • New MAF/Tiger data types • EDGES include all linear elements

– Census block boundaries – Roads, RR, trails, etc. – Have left and right FACES

• FACES not delivered with shapes – We build FACES shapes from EDGES using Mizar topology

package. • Census Blocks are collections of FACES • Precincts of Pseudo‐VTDs can be created by moving

faces from one Precinct to another.

Page 99: Oracle Fusion 11g & Maps

Face Edit

Page 100: Oracle Fusion 11g & Maps

Face Edit

Page 101: Oracle Fusion 11g & Maps

Face Edit

Page 102: Oracle Fusion 11g & Maps

Precinct Boundary Edit

• Requires when Precinct boundaries are not associated with MAF/Tiger EDGES

• Utilizes Oracle Maps Redlining tools

• Uses AJAX to call Servlet methods to ensure that edit affects both Precincts associated with a boundary

Page 103: Oracle Fusion 11g & Maps

Before Editing

Page 104: Oracle Fusion 11g & Maps

Start Editing

Page 105: Oracle Fusion 11g & Maps

Move Point

Page 106: Oracle Fusion 11g & Maps

Add Point

Page 107: Oracle Fusion 11g & Maps

Add Point

Page 108: Oracle Fusion 11g & Maps

Delete Point

Page 109: Oracle Fusion 11g & Maps

Delete Point

Page 110: Oracle Fusion 11g & Maps

Save Edit

Page 111: Oracle Fusion 11g & Maps

How It’s Done • JSPX

– ADF Rich Client – Oracle’s latest JavaServer Faces component package that is the heart of the Fusion 11g J2EE presentation layer.

• JS – Integrates with Oracle Maps and ADF

• AJAX – Uses XMLHttpRequest() to communicate with Java

• Java – Interacts with database to synchronize adjacent precincts.

Page 112: Oracle Fusion 11g & Maps

JSPX <af:commandButton id="AddPt" text="Add Point Mode" visible="#WorkingPrecinctTable.currentRow.editMode" actionListener="#WorkingPrecinctTable.currentRow.addMode" partialSubmit="true“ partialTriggers="DeletePt DeletePtStop AddPtStop AddPt cancelPrecinct updatePrecinct editPrecinct">

<af:clientListener method="OHSOS.vtdEditor.editPrecinctAddPointModeStart”type="action"/>

</af:commandButton>

Page 113: Oracle Fusion 11g & Maps

JS / AJAX OHSOS.vtdEditor.editPrecinctAddPoint = function(indexI, xI, yI)

var lastFOI = OHSOS.vtdEditor.precinctRedline.getPointFOIs()[OHSOS.vtdEditor.precinctRedline.getPointNumber()­1]; var ordinates = OHSOS.vtdEditor.precinctRedline.getOrdinates(); var geom = lastFOI.getGeometry(); var nearestPoint = 0;

if(OHSOS.vtdEditor.addPointMode == true)

// Keep it as squared, faster, easier and I don't need to find the JS sqrt function var nearestDistance = Math.sqrt((ordinates[0] ­ geom.getPointX())*(ordinates[0] ­ geom.getPointX()) +

(ordinates[1] ­ geom.getPointY())*(ordinates[1] ­ geom.getPointY()));

// Last element is the element we just added, so explicitly don't check it for(var i = 0; i < OHSOS.vtdEditor.precinctRedline.getPointNumber() ­ 1; i++ ) var newDistance = Math.sqrt((ordinates[2*i] ­ geom.getPointX())*(ordinates[2*i] ­ geom.getPointX()) +

(ordinates[2*i+1] ­ geom.getPointY())*(ordinates[2*i+1] ­ geom.getPointY())); if(newDistance < nearestDistance) nearestDistance = newDistance; nearestPoint = i;

Page 114: Oracle Fusion 11g & Maps

JS / AJAX // Ok, awesome, we've found the closest point if( nearestPoint == OHSOS.vtdEditor.precinctRedline.getPointNumber()­1) nearestPoint ­= 1; // Nearest point is either first or last, so we're done, we don't need to find the second nearest point else var prevPointDistance = Math.sqrt((ordinates[2*(nearestPoint­1)] ­ geom.getPointX())*(ordinates[2*(nearestPoint­1)] ­ geom.getPointX()) +

(ordinates[2*(nearestPoint­1)+1] ­ geom.getPointY())*(ordinates[2*(nearestPoint­1)+1] ­ geom.getPointY())); var nextPointDistance = Math.sqrt((ordinates[2*(nearestPoint+1)] ­ geom.getPointX())*(ordinates[2*(nearestPoint+1)] ­ geom.getPointX()) +

(ordinates[2*(nearestPoint+1)+1] ­ geom.getPointY())*(ordinates[2*(nearestPoint+1)+1] ­ geom.getPointY()));

// If it's closer to the next point than the previous // We don't need to do anything in this case if(nextPointDistance < prevPointDistance)

else nearestPoint += 1;

OHSOS.vtdEditor.precinctRedline.removeVertex(lastFOI); OHSOS.vtdEditor.precinctRedline.addVertex(nearestPoint+1, geom.getPointX(), geom.getPointY());

MIZAR.ajax.phaseListenerRequest('GeomEditor', "command=add" + "&pointId=" + nearestPoint + "&newX="+geom.getPointX() + "&newY="+geom.getPointY(), false);

else // we're not in add mode, so get ride of the point OHSOS.vtdEditor.precinctRedline.removeVertex(lastFOI);

Page 115: Oracle Fusion 11g & Maps

Java public class GeomEditorHandler extends AjaxHandler public GeomEditorHandler()

public boolean processRequest(HttpServletRequest request, HttpServletResponse response) WorkingPrecinctTable precinctTable = (WorkingPrecinctTable)FacesUtils.getCurrentInstance("WorkingPrecinctTable"); ProposalTable propTable = (ProposalTable)FacesUtils.getCurrentInstance("ProposalTable");

String command = request.getParameter("command"); String sPointId = request.getParameter("pointId"); String sNewX = request.getParameter("newX"); String sNewY = request.getParameter("newY");

if (precinctTable != null && propTable != null) ProposalRow propRow = (ProposalRow)propTable.getCurrentRow(); if (propRow.isEditable()) if (precinctTable.getList().size() > 0 && precinctTable.getCurrentRow() != null)

if ("move".equals(command) && !"undefined".equals(sPointId) && !"undefined".equals(sNewX) && !"undefined".equals(sNewY))

int pointId = Integer.parseInt(sPointId, 10); double newX = Double.parseDouble(sNewX); double newY = Double.parseDouble(sNewY);

Code to ensure that points of adjacent precincts are synchronized

Page 116: Oracle Fusion 11g & Maps

Mark Millman

[email protected]

(o) 360‐945‐2643

(m) 360‐220‐3504