delivering mapping solutions: open source advantage › ~rowlings › chicas › ...delivering...

Post on 29-May-2020

4 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Health and Mapping

Barry Rowlingsonb.rowlingson@lancaster.ac.uk

School of Health and Medicine,Lancaster University

Delivering mapping solutions: the open source advantage

Note

This PDF document is a conversion of the original animated presentation. Most of the navigation and interaction is lost but you may still page through the document.

b.rowlingson@lancaster.ac.uk

The Open Source Advantage

What software is there?

What is 'Open

Source'?

Show me some case-

studies!

b.rowlingson@lancaster.ac.uk

What is Open Source?

● A Philosophy● A Methodology● A Community

b.rowlingson@lancaster.ac.uk

What is Open Source?

Read,Learn,Improve!

CodeAccess

b.rowlingson@lancaster.ac.uk

What is Open Source?

Get yourcode toanyonewhowants touse it.

Free Distribution

b.rowlingson@lancaster.ac.uk

Open Standards

Your data... ...locked bysomeone's key

Proprietary standards give you...

b.rowlingson@lancaster.ac.uk

Open Standards

Your data... ...as an openbook

Open standards give you...

b.rowlingson@lancaster.ac.uk

What about support?

Proprietary support

I can call the vendor!

But they don'thave to fix it

Unless I pay themfor a support contract

Which they have amonopoly on!

b.rowlingson@lancaster.ac.uk

Open Source Support

There's no vendor to call...?

...but anyone onthe planet can help!

!!

!

As ever, you canalways pay for it...

!!!

From a wide-open market of suppliers!

b.rowlingson@lancaster.ac.uk

RadiantBlue

Open Source GeoServices

OpenApp

WhereGroup

Faunalia

GlobalImage

OA DigitalCampToCamp

OSGISServices

Just a few from the osgeo.org support directory of hundreds.

Some OSGeo commercial support companies...

b.rowlingson@lancaster.ac.uk

Or fix it yourself...

You have thesource code!

b.rowlingson@lancaster.ac.uk

Free Support

The Developer... ...is also a user!

b.rowlingson@lancaster.ac.uk

Free Support

Fixing bugs... ...helps them AND you!

b.rowlingson@lancaster.ac.uk

Finding Developers

Conferences,workshops,meetings

Project emaillists

Online chatrooms

Want to see a bug fixedin under an hour by anopen-source developer?

b.rowlingson@lancaster.ac.uk

Fixed in 60 Minutes12:13:30 arkygeek: timlinux: was there an issue with feature info for

rasters not staying in front?12:14:34 ADKPete: arkygeek: feature info?12:14:51 arkygeek: identify features sorry12:15:58 ADKPete: arkygeek: ok, that is what I thought but wanted to

double check. Dialog not staying on top?12:17:46 arkygeek: ADKPete: just checking its happeining in head12:18:15 arkygeek: it IS NOT staying in front on head12:18:37 ADKPete: hmmm...don't get that here what OS?12:18:39 arkygeek: open a raster, identify feature, then on the

second identify attempt it goes to the back12:18:41 arkygeek: osx12:18:50 ADKPete: well there you go....12:18:52 ADKPete: : )12:19:01 arkygeek: :P12:19:11 arkygeek: svn updating12:20:47 arkygeek: it was the same in v.1112:21:40 arkygeek: yeah, still there in r964412:32:30 ADKPete: arkgeek: Think I have the fix for you. building...12:43:10 CIA-7: ersts * r9645

/trunk/qgis/src/app/qgsmaptoolidentify.cpp: -Added a raise call to keep the identify results dialog on top when clicking through rasters

12:43:20 ADKPete: arkygeek: try that...12:54:12 arkygeek: updating12:55:07 arkygeek: compiling12:55:53 arkygeek: ADKPete: that did it. well done :- )12:56:02 ADKPete: groovy

At 12:13 Jason thinks he sees a problem with a dialog box...

A minute later Pete asks for clarification

Some gentle anti-Mac banter follows

Jason confirms the bug with the latest

revision 9644

Pete has a fix

A robot notifies thechat of Pete's change

Jason tries and it now works. It's 12:55

b.rowlingson@lancaster.ac.uk

The Full Stack

Desktop GIS(Qgis, gvSig, GRASS,...)

Web Clients(OpenLayers, ...)

WCS(grid data)

WFS(feature

data)

WMS(images)

Map Servers(MapServer,...)

Catalog Servers(GeoNetwork,...)

GeoDatabases(PostGIS, SpatiaLite,...)

File System(Shapefiles, GML, GeoTiff,...)

Databases

Servers

Interfaces

Clients

b.rowlingson@lancaster.ac.uk

Desktop GIS(Qgis, gvSig, GRASS,...)

Grass GIS

GRASS is a high-powered and technical set of GIS tools.

more...

Programs that run on yourpersonal computer

QGIS is aGIS andmapping package written in C++ and Python. It can beextended with plugins. more...

gvSIG is a GISand mappingpackage written inJava.

more...

b.rowlingson@lancaster.ac.uk

● And there are others!

Web Clients(OpenLayers, MapServer,...)

Alternatives to Google's Map API, Bing Maps, Yahoo Maps etc

A client-server webmapping systemwith many server-side possibilities

more...

A purely browser-based web mapping solution in JavaScript more...

b.rowlingson@lancaster.ac.uk

OpenLayers

<html><head> <title>OpenLayers Example</title>  <script src="http://openlayers.org/api/OpenLayers.js">   </script></head><body> <div style="width:100%; height:100%"       id="map"></div>      <script defer="defer" type="text/javascript">        var map = new OpenLayers.Map('map');        var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );        map.addLayer(wms);        map.zoomToMaxExtent();      </script></body></html>

This bit of HTML/JS... ...produces this map in your browser

That is a complete example. With just a fewlines of code you get a dynamic 'slippy map' in your web browser.

But wait, there's more....

b.rowlingson@lancaster.ac.uk

OpenLayers

● Build complex interactive web sites:

Integrate with other javascript widgets

Multiple map data overlays

Interactive pop-up info

bubbles

Base layer from many

data providers

b.rowlingson@lancaster.ac.uk

Framework forweb mapping

Client-serverarchitecture

b.rowlingson@lancaster.ac.uk

GeoNetwork

Spatial DataCatalogue

●Search●Index●Catalogue●Serve

b.rowlingson@lancaster.ac.uk

WCS(grid data)

WFS(feature

data)

WMS(images)

Serving spatial data over the internet

Request

Server thinks...

ResponseBrowser draws

WCS(grid data)

WFS(feature

data)

WMS(images)

b.rowlingson@lancaster.ac.uk

Web service mashups

Background imagery

Polygonoverlays

Regionaldata

GPS locations

Integrate data sourcesfrom multiple providersto produce new maps

and insights

All using open source servers, clients and communications protocols!

WCS(grid data)

WFS(feature

data)

WMS(images)

b.rowlingson@lancaster.ac.uk

GeoDatabases(PostGIS, SpatiaLite,...)

Relational Databases with spatial data functions

select ADMIN_NAME,GMI_ADMIN,POP_ADMIN from bounds.uk

Databases use SQL...

ADMIN_NAME | GMI_ADMIN | POP_ADMIN ------------------+-----------+----------- England | GBR-ENG | 48346580 Northern Ireland | GBR-NIR | 1577836 Scotland | GBR-SCT | 5160818 Wales | GBR-WLS | 2912776

...to get table data

b.rowlingson@lancaster.ac.uk

GeoDatabases(PostGIS, SpatiaLite,...)

Relational Databases with spatial data functions

select ADMIN_NAME,GMI_ADMIN,POP_ADMIN,the_geom from bounds.uk

Spatial databases also use SQL...

ADMIN_NAME | GMI_ADMIN | POP_ADMIN | the_geom ------------------+-----------+-----------+---------- England | GBR-ENG | 48346580 | 1022183.. Northern Ireland | GBR-NIR | 1577836 | 1212732.. Scotland | GBR-SCT | 5160818 | 1A83326.. Wales | GBR-WLS | 2912776 | 1B76623..

...to get table data with geometry!

b.rowlingson@lancaster.ac.uk

GeoDatabases(PostGIS, SpatiaLite,...)

Relational Databases with spatial data functions

the_geom ---------- 1022183.. 1212732.. 1A83326.. 1B76623..

the_geom stores geography

b.rowlingson@lancaster.ac.uk

GeoDatabases(PostGIS, SpatiaLite,...) Spatial Queries

name | roads_km--------------------+----------- SURREY | 1539.4755VANCOUVER | 1450.3309 LANGLEY DISTRICT | 833.79339 BURNABY | 773.76909 PRINCE GEORGE | 694.37554

What is the length of roads fully contained within each municipality?

SELECT m.name, sum(ST_Length(r.the_geom))/1000 as roads_km FROM bc_roads AS r, bc_municipality AS m WHERE ST_Contains(m.the_geom,r.the_geom) GROUP BY m.name ORDER BY roads_km;

Spatial query functions

b.rowlingson@lancaster.ac.uk

● Adds spatial functions to PostgreSQL

● Access from most GIS (open source and commercial)

● Keep spatial and non-spatial data in the same DB

● Client-server model

The basis of thousands of spatialdata infrastructures worldwide

b.rowlingson@lancaster.ac.uk

SpatiaLite

● Lightweight, but fully functional

● Designed for personal geo-databases

● Single-user

● Support building fast!

● Comes with simple mapping app

b.rowlingson@lancaster.ac.uk

● Vector and Raster mapping

● Analysis tools

● Plugin architecture for extensions in Python

● Reads most spatial data

● Talks to map servers

● Talks to database servers

b.rowlingson@lancaster.ac.uk

● Vector and Raster mapping

● Analysis tools

● Plugin architecture for extensions in Java

● Reads most spatial data

● Talks to map servers

● Talks to database servers

b.rowlingson@lancaster.ac.uk

Grass

● Heavyweight GIS Toolkit

● Vector, Raster, Network

● 2d and 3d

b.rowlingson@lancaster.ac.uk

Case Studies

● Aegiss– A web-based system for mapping

symptoms and detecting outbreaks

● Arlat– Modelling and mapping parasite

incidence in the field.

b.rowlingson@lancaster.ac.uk

Case Study: Aegiss

people

eat

bad food

and get sick

so they callNHS Direct...

...whofigure outwhat's wrongand help

and then filethe results

away somewhere

b.rowlingson@lancaster.ac.uk

We want to add value to that data

b.rowlingson@lancaster.ac.uk

Statistical Analysis

hi

low

Risk surface

Case locations, population data

casespopulation

= prob(outbreak)

b.rowlingson@lancaster.ac.uk

Job

● Get the data from NHS

● Process it

● Trigger alerts on possible outbreaks

● Produce nice maps for health professionals

b.rowlingson@lancaster.ac.uk

Sending the data

Data copied from NHSnetwork to internet PC

NHS

Daily symptom dataextracted from NHSDirect database

NHS

Data encrypted andemailed to Lancaster- using open-sourcepublic-key crypto

b.rowlingson@lancaster.ac.uk

Receiving the data

Data comes in to databaseserver and is decrypted

Midnight jobprocesses daily

data

Results stored inspatial data files

Stored in a Postgresdatabase system

b.rowlingson@lancaster.ac.uk

Viewing the data

User requests web pageusing their browser

Web server gets dataand builds page

User interacts withmap on web page

b.rowlingson@lancaster.ac.uk

Web page breakdownTraffic light systemshows possibleoutbreak status

Dynamic map made using OpenLayers

Calendar built with the OpenSource

YUI Toolkit

Query data points for drill-down info

Switch map layers on and off

Hotspot layer highlights possible

outbreaks

Background image from OpenStreetMap

b.rowlingson@lancaster.ac.uk

Case Study: Arlat

Mectizan protectspeople from onchocerciasis

(river blindness) spread by blackfly

b.rowlingson@lancaster.ac.uk

Arlat

But it can sometimes cause seriousadverse effects in people with therelatively harmless Loaloa worm

+ =

So we need to know...

b.rowlingson@lancaster.ac.uk

Where is the Loaloa?

?

b.rowlingson@lancaster.ac.uk

Parasitological Sampling

Blood analysisis slow and expensive –but it is accurate

b.rowlingson@lancaster.ac.uk

Questionnaire Surveys

Questionnairesampling ('have you ever had eyeworm?') isquick and cheap – but itis imprecise

b.rowlingson@lancaster.ac.uk

Satellite Data

Satellite datatells us aboutthe habitatsuitability forLoaloa

b.rowlingson@lancaster.ac.uk

Combining Data

Combining allthe data needs some clever statistics- a bivariate binomial model with covariates

b.rowlingson@lancaster.ac.uk

The Statistics

Satellite data

Survey data, old and new

Parasitology fromblood samples

bivariate binomialspatially correlated

model with covariates

Predictions

b.rowlingson@lancaster.ac.uk

Arlat

● Needs to be done by non-technical staff

● Working in the field

● So built as a plugin to Quantum GIS

● Using R for computing the statistics

● Runs on Windows and Linux

b.rowlingson@lancaster.ac.uk

How does it go?

Researcher inthe field doesquestionnairesurvey to getquick andcheap Loa-loaestimates

b.rowlingson@lancaster.ac.uk

How does it go?

Researcher puts the dataand locationsinto aspreadsheet

b.rowlingson@lancaster.ac.uk

How does it go?

Data is loadedinto QuantumGIS anddisplayed withbackgroundlayers

b.rowlingson@lancaster.ac.uk

How does it go?

With a few clicks,a risk exceedencesurface appears!

Blue – all clear

Red – danger zone

Grey – more data

needed

b.rowlingson@lancaster.ac.uk

Under the Hood

...is written in C++...

...and has anembeddedPython interpreter...

...which calls Rto do statistics.

b.rowlingson@lancaster.ac.uk

Under the Hood

QGIS handles all the mappingand gives us an interfaceto map data

Python gives us rapidapplication developmentand access to GUIfunctions

R provides thestatisticalfunctions weneed

b.rowlingson@lancaster.ac.uk

Open Source Power

● A purely open-source application

● Combining several best-of-breed applications

● Even the Windows Installer is Open-Source

● Zero licensing cost

● Zero distribution cost

● Zero usage restrictions

top related