gis with oracle and open source - amazon s3 · gis with oracle and open source 1. 42% 58% 2012 it...

33
GIS with Oracle and Open Source 1

Upload: others

Post on 24-Apr-2020

13 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

GIS with Oracle and Open Source

1

Page 2: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

42%58%

2012

IT ProfessionalsOther GIS Professionals

70%

30%

2004

IT ProfessionalsOther GIS Professionals

GIS demand is growing for IT Professionals

2

Page 3: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

A quality management consultant was visiting a small and somewhat antiquated English manufacturing company, to advise on improving general operating efficiency. The advisor was reviewing a particular daily report which dealt with aspects of productivity, absentee rates, machine failure, down-time, etc. The report was completed manually onto a photocopied proforma that was several generations away from the original master-copy, so its headings and descriptions were quite difficult to understand. The photocopied forms were particularly fuzzy at the top-right corner, where a small box had a heading that was not clear at all. The advisor was interested to note that the figure '0' had been written in every daily report for the past year. On questioning the members of staff who completed the report, they told him that they always put a zero in that box, and when he asked them why they looked at each other blankly. "Hmmm.., I'm not sure about that," they each said, "I guess we've just always done it that way."

Intrigued, the consultant visited the archives to see if he could find a clearer form, to discover what was originally being reported and whether it actually held any significance. When he found the old reports, he saw that the zero return had continued uninterrupted for as far back as the records extended - at least the past thirty years - but none of the forms was any clearer than those presently in use. A little frustrated, he packed away the old papers and turned to leave the room, but something caught his eye. In another box he noticed a folder, promisingly titled 'master forms'. Sure enough inside it he found the original daily report proforma master-copy, in pristine condition. In the top right corner was the mysterious box, with the heading clearly shown ...... 'Number of Air Raids Today'.

It might be time for some change

3

Page 4: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

Pieces and parts

OpenLayersTM

4

Page 5: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

It’s a little like this...5

Page 6: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

ArchitectureServer Side Client Side

Map/Data Server

Application Framework

Database Layout Manager

User Interface / Design

Mapping

6

Page 7: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

mod_plsql

Server Side Client Side

Architecture

OpenLayersTM

7

Page 8: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

Map/Data Server

Server Side

Application Framework

Database

Architecture

Database

Oracle

SDO GEOMETRY

8

Page 9: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

Map/Data Server

Server Side

Application Framework

Database

Architecture

APEX

Low cost

Rapid developmentApplication Framework

9

Page 10: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

Map/Data Server

Server Side

Application Framework

Database

Architecture

GeoServer

mod_plsql

json or xml

Map/Data Server

10

Page 11: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

GeoServerVery actively developed!Data sources

Oracle - Many othersShapefile - Others

Output formatsWFS

GML, Shapefile, JSON/JSONP, CSV, ExcelWMS

PNG, JPEG, GIF, SVG, PDF, GeoRSS, KML/KMZ, OpenLayers

11

Page 12: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

ArchitectureClient Side

Layout Manager

User Interface / Design

Mapping APEX

Regions

Layout Manager

12

Page 13: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

ArchitectureClient Side

Layout Manager

User Interface / Design

Mapping EXT JS

Flot

jQuery

Example

User Interface / Design

13

Page 14: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

User Interface / Design

14

Page 15: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

ArchitectureClient Side

Layout Manager

User Interface / Design

Mapping OpenLayers

UDOT Common Map

Examples

Mapping

15

Page 16: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

UDOT Common Map

16

Page 17: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

Setup Database schema

Setup GeoServer

APEX workspace & application

Add map to page

Setup

17

Page 18: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

Setup Database

Setup GeoServerAPEX workspace Add map to page

Add SDO_GEOMETRY data typeRegister table user_sdo_metadataCreate spatial index (INDEXTYPE IS MDSYS.SPATIAL_INDEX)Views work great if the indexed geometry is passed through

Database

18

Page 19: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

Setup Database

Setup GeoServerAPEX workspace Add map to page

GeoserverGood DocumentationUse read-only users unless read-write is needed! Disable REST initially

19

Page 20: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

Setup Database

Setup GeoServerAPEX workspace Add map to page

Workspace and stores

Possible to use shadow schema

with grants

20

Page 21: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

Setup Database

Setup GeoServerAPEX workspace Add map to page

Workspace and stores

Possible to use low privileged read only

user with grants

21

Page 22: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

Setup Database

Setup GeoServerAPEX workspace Add map to page

Logging

22

Page 23: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

Setup Database

Setup GeoServerAPEX workspace Add map to page

Create Layers

23

Page 24: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

Setup Database

Setup GeoServerAPEX workspace Add map to page

Choose Data Source

24

Page 25: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

Setup Database

Setup GeoServerAPEX workspace Add map to page

Data and Publishing Options

25

Page 26: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

Setup Database

Setup GeoServerAPEX workspace Add map to page

Preview your layerMake sure it looks as expectedMany formats available

Preview

26

Page 27: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

Setup Database

Setup GeoServerAPEX workspace Add map to page

CQL filters

27

Page 28: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

Setup Database

Setup GeoServerAPEX workspace Add map to page

Because we use many javascript libraries, we often use regions to separate javascript page logic

APEX

28

Page 29: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

Setup Database

Setup GeoServerAPEX workspace Add map to page

See OpenLayer examples

Overview

29

Page 30: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

Setup Database

Setup GeoServerAPEX workspace Add map to page

ly_bluebook = new OpenLayers.Layer.Vector ( "Bluebook Layer" , { "strategies": [ new OpenLayers.Strategy.BBOX() , new OpenLayers.Strategy.Refresh() ] , "filter": new OpenLayers.Filter.Logical( { "type": OpenLayers.Filter.Logical.AND , "filters": [ new OpenLayers.Filter.Comparison( { "type": OpenLayers.Filter.Comparison.EQUAL_TO , "property": 'ROUTE_DIR_ID' , "value": 0 }) ] }) , "protocol": new OpenLayers.Protocol.WFS( { "version": '1.0.0' , "srsName": 'EPSG:26912' , "url": '/geoserver/ows?service=WFS' , "featureType": 'FTR_BLUEBOOK_ALL_VW' , "featureNS": 'http://maps.udot.utah.gov/ugds' , "geometryName": 'GEOM' }) , "visibility": true , "styleMap": new OpenLayers.StyleMap( { "default": new OpenLayers.Style( { "pointRadius": 8 , "fillOpacity": .4 , "fillColor": '#ff8800' , "strokeColor": '#ff8800' }) , "select": new OpenLayers.Style( { "fillColor": '#88ff00' , "strokeColor": '#88ff00' }) }) } );

Vector layer with filter

30

Page 31: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

Setup Database

Setup GeoServerAPEX workspace Add map to page

if ($v("P3005_STATUS")!='%null%' && $v("P3005_STATUS")!='ALL')

{ fStatus=$v("P3005_STATUS"); l_filters.push(new OpenLayers.Filter.Comparison( { "type": OpenLayers.Filter.Comparison.LIKE , "property": 'PROJ_STATUS' , "value": fStatus }) );}

Easily integrate with APEX page items

31

Page 32: GIS with Oracle and Open Source - Amazon S3 · GIS with Oracle and Open Source 1. 42% 58% 2012 IT Professionals Other GIS Professionals 70% 30% ... WMS PNG, JPEG, GIF, SVG, PDF, GeoRSS,

Setup Database

Setup GeoServerAPEX workspace Add map to page

if(g_route_dir_id) { // Set the route filter. fi_filters.push(new OpenLayers.Filter.Comparison( { "type": OpenLayers.Filter.Comparison.EQUAL_TO , "property": 'ROUTE_DIR_ID' , "value": g_route_dir_id })); } else { // Set the route filter to a route_dir_id of zero again so nothing is displayed. fi_filters.push(new OpenLayers.Filter.Comparison( { "type": OpenLayers.Filter.Comparison.EQUAL_TO , "property": 'ROUTE_DIR_ID' , "value": 0 })); }

var fi_bluebook = new OpenLayers.Filter.Logical( { "type": OpenLayers.Filter.Logical.AND , "filters": fi_filters }); // Add the filter to the layer. ly_bluebook.filter = fi_bluebook; ly_bluebook.refresh({force: true}); var bo_bluebook = new OpenLayers.Bounds(); bo_bluebook.extend(new OpenLayers.LonLat($v('P4_MINX'), $v('P4_MINY'))); bo_bluebook.extend(new OpenLayers.LonLat($v('P4_MAXX'), $v('P4_MAXY')));

More Complex filter with

boundary set

32