gis with oracle and open source - amazon s3 · gis with oracle and open source 1. 42% 58% 2012 it...
TRANSCRIPT
GIS with Oracle and Open Source
1
42%58%
2012
IT ProfessionalsOther GIS Professionals
70%
30%
2004
IT ProfessionalsOther GIS Professionals
GIS demand is growing for IT Professionals
2
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
Pieces and parts
OpenLayersTM
4
It’s a little like this...5
ArchitectureServer Side Client Side
Map/Data Server
Application Framework
Database Layout Manager
User Interface / Design
Mapping
6
mod_plsql
Server Side Client Side
Architecture
OpenLayersTM
7
Map/Data Server
Server Side
Application Framework
Database
Architecture
Database
Oracle
SDO GEOMETRY
8
Map/Data Server
Server Side
Application Framework
Database
Architecture
APEX
Low cost
Rapid developmentApplication Framework
9
Map/Data Server
Server Side
Application Framework
Database
Architecture
GeoServer
mod_plsql
json or xml
Map/Data Server
10
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
ArchitectureClient Side
Layout Manager
User Interface / Design
Mapping APEX
Regions
Layout Manager
12
ArchitectureClient Side
Layout Manager
User Interface / Design
Mapping EXT JS
Flot
jQuery
Example
User Interface / Design
13
User Interface / Design
14
ArchitectureClient Side
Layout Manager
User Interface / Design
Mapping OpenLayers
UDOT Common Map
Examples
Mapping
15
UDOT Common Map
16
Setup Database schema
Setup GeoServer
APEX workspace & application
Add map to page
Setup
17
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
Setup Database
Setup GeoServerAPEX workspace Add map to page
GeoserverGood DocumentationUse read-only users unless read-write is needed! Disable REST initially
19
Setup Database
Setup GeoServerAPEX workspace Add map to page
Workspace and stores
Possible to use shadow schema
with grants
20
Setup Database
Setup GeoServerAPEX workspace Add map to page
Workspace and stores
Possible to use low privileged read only
user with grants
21
Setup Database
Setup GeoServerAPEX workspace Add map to page
Logging
22
Setup Database
Setup GeoServerAPEX workspace Add map to page
Create Layers
23
Setup Database
Setup GeoServerAPEX workspace Add map to page
Choose Data Source
24
Setup Database
Setup GeoServerAPEX workspace Add map to page
Data and Publishing Options
25
Setup Database
Setup GeoServerAPEX workspace Add map to page
Preview your layerMake sure it looks as expectedMany formats available
Preview
26
Setup Database
Setup GeoServerAPEX workspace Add map to page
CQL filters
27
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
Setup Database
Setup GeoServerAPEX workspace Add map to page
See OpenLayer examples
Overview
29
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
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
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
http://www.spatialdbadvisor.com
http://openlayers.org/dev/examples/
http://geoserver.org
http://www.sencha.com/products/extjs
Useful links
33