You are on page 1of 15

Mapping voters with MapServer, PostGIS and OpenLayers

Obama Campaign - US Presidential Election 08

Karsten Vennemann
S eattle

Talk Overview

Outline
Why and What Technical details
Server hosting Data Web mapping components Spatial database Map rendering engine Web map viewer
PostGIS MapServer OpenLayers How can you build your own ? Computing Cloud - Amazon EC2 Files, Database and WMS About the project Goals of the application

Resources

Mapping voters with Maps erver, P os tG IS and O penlayers

Project G oals

The Project
An effective Web GIS for the Obama for America Campaign support the work of the campaign field organizers provide web access to up-to-date maps of election trends for a few hundred organizers around the country up to twenty battleground states provide information about individual voters targeted scalable for the campaigns needs low cost temporary

Mapping voters with Maps erver, P os tG IS and O penlayers

Relations of Web GIS Components

Mapping voters with Maps erver, P os tG IS and O penlayers

Mapping voters with Maps erver, P os tG IS and O penlayers

S erver

Server Hosting
Computing Cloud (used Amazon EC2) Temporary Solution Scalable Flexible Server Instances started and shut down with very little overhead. server images can be used to boot additional instances Full OS stack eliminates licensing issues: Ubuntu Linux, PHP, Apache Http Server MapServer, PostGIS, Openlayers and OS GIS libraries (Proj e.g.)

Mapping voters with Maps erver, P os tG IS and O penlayers

Data

Data
Serving data via WMS Web map services Data stored as shape files or from PostGIS served via MapServer Election specific data Base data e.g counties, precincts, labels Background data Google maps + Yahoo Satellite images/aerial photo layer
Web Map Service (WMS) is a technical implementation specification (published by the Open GIS Consortium) of a web interface in regards to retrieving spatial features (a map layer) as an image, identifying attribute information of a feature at a location, and about the types of maps a server can deliver
Mapping voters with Maps erver, P os tG IS and O penlayers

Web mapping components

Web mapping components


Spatial Database Map rendering engine Map Viewer PostGIS MapServer OpenLayers

Custom authentication via PHP for map applications OpenLayers based viewer standard navigation tools + some custom tools

Mapping voters with Maps erver, P os tG IS and O penlayers

Schematic View of the Interoperable Web GIS


Web browser
Client Side Framework: OpenLayers
Client Side Scripting (JavaScript/AJAX)

Web mapping components - map rendering engine

Client

Web Server (EC2) Mapping Engine: MapServer Spatial Data


local
e.g. precincts shapefiles Vector files e.g. geocoded voters Spatial DB:PostGI S

Web Servers WMS API Spatial Data


commercial layers
e.g. Google Yahoo MS Virtual Earth tiled images

Servers

Mapping voters with Maps erver, P os tG IS and O penlayers

Web mapping components spatial database

PostGIS - the OS Spatial Database


Main supporter Refractions PostGIS is an extension for PostgreSQL adds support for geographic objects to PostgreSQL enables PostgreSQL server to be used as a backend spatial database for GIS Spatial operations and analysis simply mean running a (spatial) SQL query in the database Similar functions as SDE and much more .

Mapping voters with Maps erver, P os tG IS and O penlayers

Map Server

Web mapping components - map rendering engine

Originally developed at the University of Minnesota (UMN), short MapServer one of the most mature open source projects written in C Main Focus rendering spatial data development environment for spatially-enabled internet applications Map output CGI mapserv (Linux) and mapserv.exe (windows) MapScript API available for Python, PHP, Perl, and Java Map/Layer configuration text file .map Formats In: PostGIS, Oracle Spatial ArcSDE, WMS, GDAL and OGR formats Out: GIF, JPG, PNG, all GDAL formats, WFS and WMS

Mapping voters with Maps erver, P os tG IS and O penlayers

Web mapping components - map viewer

Open Layers
Main supporter MetaCarta object-oriented JavaScript library (using Prototype.js and Rico library) Lets you add maps to any web page by embedding OpenLayer.js no server-side dependencies Easily reusable component similar to Google Maps and MSN Virtual Earth Web Mapping APIs Slippy map style Input Formats Tile sources: Virtual Earth, Worldwind, Yahoo & Google Maps, WMS Vector layer input: KaMap, MapServer, GeoRSS, WFS, [KML] Standard Tools Google-like zoom bar, standard functions like zoom in/out pan

Mapping voters with Maps erver, P os tG IS and O penlayers

Resources

Articles
The State of Open Source GIS,
Version September 2007. By Paul Ramsey, formerly Refractions Research, Victoria. 49pages. http://www.foss4g2007.org/presentations/viewattachment.php? attachment_id=8

Comparison Of Geographic Information System Software (Arcgis 9.0 And Grass 6.0): Implementation And Case Study
MS Thesis by Todd R. Buchanan, Fort Hays State University. 89pages http://covenant-tech.com/thesis.pdf

Geospatial Interoperability Return on Investment Study,


National Aeronautics and Space Administration, Geospatial Interoperability Office, April 2005. 80pages http://www.egy.org/files/ROI_Study.pdf

Web Sites
Free GIS Project http://www.freegis.org/ Open source GIS list http://opensourcegis.org/ Map Tools http://maptools.org/ OSGeo http://www.osgeo.org/
Mapping voters with Maps erver, P os tG IS and O penlayers

Resources

Local GIS user group: Cascadia Users of Geospatial Open Source http://groups.google.com/group/cugos
Monthly meeting every 3rd Wednesday, 6:00 pm In the LizardTech offices, located near Pioneer Square:
The National Building Suite 200 1008 Western Avenue Seattle, WA 98104

Mapping voters with Maps erver, P os tG IS and O penlayers

Contact me with questions


Karsten Vennemann www.terragis.net Seattle, WA, USA karsten@terragis.net 206 905 1711

Terra GIS offers GIS consulting and training

Mapping voters with Maps erver, P os tG IS and O penlayers

You might also like