Aug 302011

Last week saw the GECO team attending and co-organising an Open Mapping Workshop with the DevCSI team. Addy Pope of GoGeo was one of our speakers on the day and has kindly written us this guest post about the event and some of the useful resources related to the presentations and discussions on the day. For more information on the event you can also see our LiveBlog of the day, we will also be adding audio and images from the day in the coming weeks.

The DevCSI Open mapping workshop was held in Glasgow on the 24th August 2011.  The program was:

  • Introduction to OpenStreetMap – Bob Kerr (OSM)
  • Open Source GIS and OpenLayers – Addy Pope (EDINA)
  • Getting started with PostGIS/Postgres – Lasma Siestone (EDINA)

This post aims to highlight the resources that were introduced and discussed during the workshop rather than chronicle the workshop itself.

Getting Started With OSM
Basic editing in OSM can be done through the OSM web interface.  Just create an account and then sign in. The web editor runs Potlach 2 which is shown really intuitive to use.

For more advanced editing, perhaps where you want to compare different satellite images or where you with to do bulk edits, you may want to have a look at JOSM.  JOSM is a Java based desktop editor which has a lots of useful resources that are not available in simple online editors such as Potlach2.  In addition, there is a stack of videos and tutorials to help you get started with JSOM.

Open Source GIS and Openlayers

GIS was once the the preserve of large software companies and the cost of licences made it difficult for non-gis professionals to access GIS tools.  However, over the past 5 years open source GIS tools have emerged and are now competing with proprietary GIS software in terms of usability and functionality.  This has allowed “Joe Public” to create custom maps and publish spatial data.

QGIS – QGIS is a free open source desktop GIS. While there are many other open source GIS’s out there, QGIS is packed with features, easy to use and well documented.  The other nice thing about QGIS is that there are a host of python plugins written by the QGIS user community that you can access and use. These allow you to do some neat things including:

  • DXF2SHP – convert dxf files to shapefiles
  • Delimited Text file import
  • Ordnance Survey translator – transforms OS GML to shapefile
  • fTools – Vector data management toolkit
  • PostGPS – load and save GPX files from your GPS

The plugin that was demoed at the workshop was the OGR2Layer tool. This allows you to load spatial data into QGIS and add the data to a Web Mapping Service (WMS) from OSM.  The tool outputs the OpenLayers code that you need to embed in your website to create an interactive, map.  The configuration options may be quite simple and limited, but they do give you a good start point from which you can easily build more complex, customised map inserts. A screenshot example (sadly not interactive) of the OGR2Layer output is shown below.

OGR2Layer output

and here is some of the code that the tool produces:

var map, selectsControls
function init(){
var option = {
projection: new OpenLayers.Projection(“EPSG:900913”),
displayProjection: new OpenLayers.Projection(“EPSG:4326”)
map = new OpenLayers.Map(‘map’, option);
olosma = new OpenLayers.Layer.OSM(“OpenStreetMap Osmarender”, “${z}/${x}/${y}.png”);
var ls= new OpenLayers.Control.LayerSwitcher();
map.addControl(new OpenLayers.Control.Attribution());
var ForestSOTM2_template = {
strokeColor: “#b9b9b9”,
strokeOpacity: 1,
strokeWidth: 0.26,
fillColor: “#00aa7f”,
fillOpacity: 1
var ForestSOTM2_style = new OpenLayers.Style(ForestSOTM2_template)
function onPopupCloseForestSOTM2(evt) {
function onFeatureSelectForestSOTM2(feature){
selectedFeature = feature;
tableForestSOTM2=”<html><meta http-equiv=’Content-Type’ content=’text/html; charset=UTF-8′><body><table><tr><td><b>NAME:</b></td><td><i>”+feature.attributes.NAME+”</i></td></tr></table></body></html>”;
popup = new OpenLayers.Popup.FramedCloud(“chicken”,
new OpenLayers.Size(1000,500),
feature.popup = popup;
function onFeatureUnselectForestSOTM2(feature) {
feature.popup = null;

Openlayers by Erik Hazzard

If you want to find out more about OpenLayers then I would suggest reading OpenLayers 2.1.0 by Erik Hazzard. This book covers the basics but has enough detail to be useful for experienced users.



Another useful feature of QGIS is that you can stream a WMS into it so you always have a basemap to give your data some context.  I wont explain this here, if you wish to read about doing this then please read the post on the GoGeo blog.



The final session of the day looked at PostGIS and Postgres. Used in tandem, these packages have powerful spatial capabilities but the barrier to use is often perceived to be quite high can put some off using them. The presentation should be available through the GECO blog soon but you might want to look at the following books:

That should be enough to get started with. I will try to add more links to useful resources as i find them.  In the meantime, you could search through the thousands of links in GoGeo. If you think there is a link that compliments this thread, please add a comment below including the link and a wee sentence or two about the resource it relates to and why you find it useful.

 August 30, 2011  Posted by at 2:34 pm Events, Guest Posts, Misc. Tagged with: , , , , , , , ,  Comments Off on Guest Post: Notes and Useful Links from the DevCSI / GECO Open Mapping Workshop
Aug 082011

Ahead of this week’s Open Source Geo and Health Event (#GECOhealth) we are delighted to bring you a guest post on an open source health tool that has been developed by a team at the IBM Almaden Research Center.

Image of Stefan EdlundOur guest blogger is Stefan Edlund, a senior software engineer in the Public Health Research team at IBM Almaden developing new technologies in the public health domain. Stefan has over 12 years experience in IBM, having worked on a broad area of technologies such as relational databases, Web technologies, location based services, content management and email search and discovery products.  Stefan’s current research interests include development and research of models for infectious disease accurate enough to assist public health policy makers. Stefan holds a MS degree in computer science from the Royal Institute of Technology in Stockholm. He currently has over 15 US patents. (

Acknowledgments go out to the whole STEM team at IBM Almaden Research Center: Dr. James Kaufman, Matthew Davis, Kun Hu and Christian Thöens.

The Spatio-Temporal Epidemiological Modeler (STEM) is an open source application for building and studying models of infectious diseases. Since STEM is built on top of the OSGi component software architecture, new models can be added and existing models extended by researchers and public health professionals as necessary. STEM comes pre-built with many textbook examples of infectious diseases, for instance compartmental SI, SIR and SEIR models as well as more advanced examples such as a Macdonald-Ross models of malaria. The malaria model is build on top of a global vector capacity model. STEM is designed to simultaneously model multiple populations and multiple diseases, and by using the Eclipse modeling framework it is easy to “compose” models on top of other models. Disease models are based upon mathematical differential equations that describe how diseases spread in space and time, and users have a choice between two numerical differential equation solvers: A fast but less accurate finite difference method and a more accurate (but slower) method based upon an integrating Runge-Kutta Cash-Karp algorithm.

In addition to mathematical models of diseases, STEM has a vast amount of denominator data for the entire world, including administrative regions (often down to administrative level 2, mapping to counties in the United States),  population data as well as data on air transportation and road networks. Recently STEM allows users to download and plug in additional data using STEM update site. Currently it is possible to install ten years of global NASA earth science data on temperature, rainfall, elevation and vegetation. Such data is of particular importance when modeling vector borne diseases such as malaria and dengue fever.

STEM makes a distinction between the models of a population and models of infectious diseases. A model of a population describes the background dynamics of a population regardless of diseases affecting the population, for instance background birth- and death rates, movement of a population via transportation or migration as well as models of ageing within a population. STEM incorporates a number of transportation models, including global air travel. One example of an insect vector (population) model is a calibrated Anopheles mosquito density model with variations between wet- and dry seasons, driven by STEM earth science data. You can run a simulation in STEM that only model population dynamics, say the seasonal movement of migratory birds, without any diseases as part of the model.

Screenshot of STEM
Screenshot of the STEM designer perspective showing a scenario with models of United States and Mexico, including road and air transportation networks, common border relationships and population data. A disease model of a Swine flu like pandemic outbreak is included, as well as inoculators setting up the initial background resistance in the population. The scenario has an intervention policy that implements social distancing after 75 days of simulated time, reducing the transmissibility of the disease (click for a larger image).

It is also possible to model interventions in STEM. Interventions are used to control some aspect of a disease outbreak, down to regional level if desired. Examples include initiating a vaccination program, isolating infected individuals, implementing social distancing, evacuation of a region, shutting down air transportation (for a county, state or a whole country), closing a road or preventing mixing of infected individuals across borders. Interventions are of particular importance to policy makers when deciding the most efficient (and cost effective) means for controlling an outbreak.

Models of diseases are only as accurate as the parameters that go into them.  STEM supports fitting parameters to actual public health surveillance data if available. Using STEM’s numerical optimization algorithm (downhill simplex), the parameter space of a disease model is walked until an objective function is minimized. The objective function can for instance be an measurement of the difference between daily incidence determined by the disease model and daily public health reporting data. The model optimization function in STEM has successfully been used in several real world scenarios, for instance to optimize seasonal flu models in Israel and to determine the effect of the social distancing policy that went into effect in Mexico City during the 2009 swine flu outbreak.

Screenshot of STEM
Screenshot from the simulation perspective in STEM. A regional scenario of malaria transmission in south east Asia after running a one year simulation where one percent of the population were initially infected everywhere. The top right shows the map view where the red colours indicates the relative number of infected individuals. The bottom right shows a time series plot for the various malaria compartments that humans transition (click for a larger image).

You can find out more about STEM and download the latest release at the STEM web site:

The STEM wiki site also has lots of documentation and examples of how to use STEM: