SlideShare a Scribd company logo
State of the Art
  Web Mapping
with Open Source
OSCON 2012 | Dane Springmeyer
@springmeyer
 github / twitter
see also:
           Justin Miller
Building a mobile, offline mapping stack
        using open tools & data

        5pm Wednesday, F150
Background

    Engineer @ MapBox
 Building TileMill and Mapnik
Web performance / rendering
github / twitter
http://mapbox.com
State of the Art Web Mapping with Open Source
We provide services & open source tools
open source tools
    to cover
State of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open Source
CartoDB
State of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open Source
TileMill
•
maps are simple
   (a primer)
geodata as
  just another
data field / type
cartography as just a
 sexy form of data
    visualization
location: lat/lon, x/y

    attributes:
 name, type, value
styles separate from
data akin to css/html
CartoCSS
@motorway: #90BFE0;

.highway[TYPE='motorway'] {

  .line[zoom>=0]    {

      line-color: spin(darken(@motorway,36),-10);

      line-cap:round;

      line-join:round;

  }

  .fill[zoom>=10] {

      line-color:@motorway;

      line-cap:round;

      line-join:round;}}
spatial types
point:	

	

 	

 	

 •
line:	

	

 	

 	

 	

 	

 -----------
polygon:
                             _____
                            |_____|
Multi* types
  many to one
geometries   feature
tabular geo-csv
 latitude    longitude   name



45.5        -122.6       PDX
tabular geo-csv
        (multipoint)
        WKT                     Name
 MULTIPOINT ((10 40),
(40 30), (20 20), (30 10))
                             Group of Cities
geojson
 { "type": "FeatureCollection",
   "features": [
     { "type": "Feature",
         "properties": { "name": "PDX" },
         "geometry" : { "type": "Point",
            "coordinates": [ -122.6, 45.5 ]
          }
     }]}

Works everywhere: e.g QGIS, TileMill, Web clients
postgis
postgis=# select 'POINT(-122.6
45.5)'::geometry as geom,'PDX'::text as name;

                    geom                    | name
--------------------------------------------+------
 01010000006666666666A65EC00000000000C04640 | PDX
(1 row)



                                     WKB
                              (Well Known Binary)
postgis
postgis=# select ST_Distance('POINT(-122.6
45.5)'::geography,'POINT(-122.3
47.6)'::geography)/1609.344 as
dist_in_miles_from_pdx_to_sea;

 dist_in_miles_from_pdx_to_sea
-------------------------------
              145.755555956692
(1 row)
minimal code for
simple maps, both
 server and client
Mapnik

var mapnik = require('mapnik');
var map = new mapnik.Map(256, 256);
map.loadSync('map.xml');
map.zoomAll();
map.renderFileSync('map.png');
Leaflet
<html>
<head>
  <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.css" />
  <script src="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.js"></script>
</head>
<body>
! <div id="map" style="width: 100%; height: 100%"></div>
  <script>
   var map = new L.Map('map');
   var osm = new L.TileLayer('http://tile.osm.org/{z}/{x}/{y}.png');
   map.setView(new L.LatLng(45.5, -122.65), 12).addLayer(osm);
   var pdx = { "type": "FeatureCollection", "features": [ { "type": "Feature",
     "properties": { "name": "PDX" },
     "geometry" : { "type": "Point","coordinates": [ -122.65, 45.5 ]}}]
   };
   map.addLayer(new L.GeoJSON(pdx));
  </script>
</body>
</html>
•
but maps are
    hard
geodata can be
messy and multi-
  resolution
geodata can be
    huge
geodata can be
   dynamic
data    story
takes too long
maps as the single
lock-in point (google)
  or point of failure
 (Slow WMS, IE support, clashing
           design)
•
how modern
web maps work
or, how to tell stories
  with maps quickly,
 ensure they are fast
    under load and
      work in IE
open data
         osm.org
   naturalearthdata.com
us census (geo/www/tiger)
local governments portals
serverside
pre-processing
gradually work
   clientside
tile renderers
mapnik / mapserver
fast app servers
Node.js/Python/C++
pre-processed
pre-rendered
  cacheable
beautiful graphics
 Antigrain Geometry
   Cairo Graphics
standard formats
  geojson, wkt, csv,
  shapefile, postgis,
       geotiff
tiled data
bake big data   bitmaps
pre-render where
possible, but beware the
      world is big
State of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open Source
coming...
optimized tiled formats
like msgpack, protobuf
    (not just bitmaps)
coming ...
optimized tiled storage
     and indexing
coming ...
  more robust and
configurable clientside
     renderers
UI: Browser JS client / Mobile Native client

   Render:                            Display:
Hardware Vector                       <img> tiles
   Renderer



 Data Tiles:                        Image Tiles:
Optimized vectors                   Software Vector
                                       Renderer


  Storage: Database / Flat file (Spatially Indexed)
     Data Processing: GIS Apps, Scripting
UI: Leaflet / ModestMaps / RouteMe

    Render:                         Display:
 Kothic.js / Vecnik                all browers
(Canvas/WebGL in                     support
 some browsers)


  Data Tiles:                    Image Tiles:
  TileStache /                  Mapnik via TileMill
   Kothic.js /                    or TileStache
   TileMill ?                 + UTFGrid interactivity

   Storage: Postgres-PostGIS / CSV / GeoJSON
   Data Processing: Qgis, R stats, Python, SQL
•
TileMill
http://mapbox.com/tilemill/
Installing TileMill
TileMill: Ubuntu
sudo apt-add-repository
ppa:developmentseed/mapbox
sudo apt-get -y update
sudo apt-get -y install tilemill
sudo start tilemill
TileMill: Mac
TileMill: Basics
 Cross platform - Linux, Win, OS X
  Same code both desktop & web
Outputs PNG, MBTiles, Mapnik XML
Written in Javascript (Node.js) and C
             ++ (Mapnik)
Art of the possible
http://project.wnyc.org/stop-frisk-guns/
http://gop.sites.devseed.com/
foursquare.com
http://www.npr.org/censusmap/
http://streeteasy.com/
Millions of points without sacrificing speed
TileMill: Live

       http://bit.ly/MFjLnG
       http://bit.ly/SFeBfJ
      Ec2 machines only available on July 17,2012
set one up yourself like: http://mapbox.com/tilemill/docs/
                guides/ubuntu-service/
Demos...

• TileMill: layer ordering, fonts, labeling,
  plugins, mbtiles export, mapnik xml export,
  svg/marker-transforms
• TileMill: reinforce basics through demos:
  arc.js geojson, cartodb csv, etherpad csv
• OSM-bright setup
Thanks!

 @springmeyer
  github / twitter
dane@mapbox.com
•
Do not miss Stamen
   and Vizzuality
    (Cartodb)
State of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open Source
TileMill Extra Details
State of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open Source
IVE                                                                         doi:10.1038/nature10836




pen computer programs
m-Cumming3



 idence that cannot be entirely included in publications, but the rise of
 layer of inaccessibility. Although it is now accepted that data should be made
 ons regarding the availability of software are inconsistent. We argue that, with
 elease of source programs is intolerable for results that depend on computation.
nd natural language will always ensure that exact reproducibility remains
es the chances that efforts to reproduce results will fail.


 d to unprecedented       rerunning of the code on, say, a different combination of hardware and
 e powerful computers     systems software, to detect the sort of numerical computation11,12 and
were thought almost       interpretation13 problems found in programming languages, which we
gies allow data collec-   discuss later. Without code, direct reproducibility is impossible. Indirect
data are collected, and   reproducibility refers to independent efforts to validate something other
vailable with which to    than the entire code package, for example a subset of equations or a par-
                          ticular code module. Here, before time-consuming reprogramming of an
 y, by which we mean      entire model, researchers may simply want to check that incorrect coding of
ing, rather than exact    previously published equations has not invalidated a paper’s result, to
 n to several decimal     extract and check detailed assumptions, or to run their own code against
 (for an early attempt    the original to check for statistical validity and explain any discrepancies.
y available computer         Any debate over the difficulties of reproducibility (which, as we will
 d the point that, with   show, are non-trivial) must of course be tempered by recognizing the
ual source code is an     undeniable benefits afforded by the explosion of internet facilities and the
 depend on computa-       rapid increase in raw computational speed and data-handling capability
dless, and needlessly     that has occurred as a result of major advances in computer technology14.
                          Such advances have presented science with a great opportunity to address
  computer programs       problems that would have been intractable in even the recent past. It is
cies still ranging from   our view, however, that the debate over code release should be resolved as
 ral language descrip-    soon as possible to benefit fully from our novel technical capabilities. On
program algorithms.       their own, finer computational grids, longer and more complex compu-
 n computer program       tations and larger data sets—although highly attractive to scientific
 e in the list of items   researchers—do not resolve underlying computational uncertainties of
State of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open Source

More Related Content

Viewers also liked (20)

PDF
Declarative web data visualization using ClojureScript
OSCON Byrum
 
PPTX
planning nature
Moni Mavilasseril
 
PPTX
GEOPROCESSING IN QGIS
Swetha A
 
PDF
Bringing Cities to Life Using Big Data & WebGL
Robin Hawkes
 
PDF
Digital image processing using matlab
Amr Rashed
 
PDF
Basics of Image Processing using MATLAB
vkn13
 
PPTX
Projects types
Ahmed Sakr
 
PPT
Project Types and their importance
Ujjwal Joshi
 
PPT
Project Planning
megat zainurul anuar
 
PPTX
Project planning
Dipnarayan Thakur
 
PDF
Introduction to remote sensing and gis
Mohsin Siddique
 
PPTX
types of planning
phenixtech
 
PPTX
Basic of Remote Sensing
gueste5cfed
 
PPT
Project Planning
Srinivasan Rengasamy
 
PDF
What Is GIS?
Allan Laframboise
 
PPT
Chapter 3-THE RESEARCH PROBLEM
Ludy Mae Nalzaro,BSM,BSN,MN
 
PPT
Introduction to project management
Barun_agnihotri
 
PPT
Fundamentals of Project Management
Rodolfo Siles
 
PPTX
Planning
Knight1040
 
Declarative web data visualization using ClojureScript
OSCON Byrum
 
planning nature
Moni Mavilasseril
 
GEOPROCESSING IN QGIS
Swetha A
 
Bringing Cities to Life Using Big Data & WebGL
Robin Hawkes
 
Digital image processing using matlab
Amr Rashed
 
Basics of Image Processing using MATLAB
vkn13
 
Projects types
Ahmed Sakr
 
Project Types and their importance
Ujjwal Joshi
 
Project Planning
megat zainurul anuar
 
Project planning
Dipnarayan Thakur
 
Introduction to remote sensing and gis
Mohsin Siddique
 
types of planning
phenixtech
 
Basic of Remote Sensing
gueste5cfed
 
Project Planning
Srinivasan Rengasamy
 
What Is GIS?
Allan Laframboise
 
Chapter 3-THE RESEARCH PROBLEM
Ludy Mae Nalzaro,BSM,BSN,MN
 
Introduction to project management
Barun_agnihotri
 
Fundamentals of Project Management
Rodolfo Siles
 
Planning
Knight1040
 

Similar to State of the Art Web Mapping with Open Source (20)

PDF
FOSS4G2011 Report
Meg Murakami
 
PDF
PyDX Presentation about Python, GeoData and Maps
Hannes Hapke
 
PDF
MapMint FOSS4G-CEE 2012 Presentation
djayzen
 
PDF
An Adaptive Neural Network-Based Method for Tile Replacement in a Web Map Cache
Beniamino Murgante
 
PDF
Optimizing your Map Services
Esri
 
PDF
11.concept for a web map implementation with faster query response
Alexander Decker
 
PDF
Concept for a web map implementation with faster query response
Alexander Decker
 
PDF
Saving Money with Open Source GIS
bryanluman
 
PDF
Pycon 2012 Taiwan
Dongpo Deng
 
PDF
那些年 Python 攻佔了 GIS / The Year Python Takes Over GIS
pycontw
 
PDF
Tilemill gwu-wboykinm
Bill Morris
 
KEY
Web gis implementation notes
paoloverri
 
PDF
Pycon2011
Django Stars
 
PDF
Integrating PostGIS in Web Applications
Command Prompt., Inc
 
PDF
GeoDjango in a nutshell
Django Stars
 
PPT
The 21st Century Harvard Map
Harvard Web Working Group
 
PDF
EDIT Geo-tools in E-biosphere conference (London)
Pere Roca Ristol
 
PDF
Open Source GeoSpatial
arno974
 
PDF
Where2009 - Hacking Map APIs
Andrew Turner
 
FOSS4G2011 Report
Meg Murakami
 
PyDX Presentation about Python, GeoData and Maps
Hannes Hapke
 
MapMint FOSS4G-CEE 2012 Presentation
djayzen
 
An Adaptive Neural Network-Based Method for Tile Replacement in a Web Map Cache
Beniamino Murgante
 
Optimizing your Map Services
Esri
 
11.concept for a web map implementation with faster query response
Alexander Decker
 
Concept for a web map implementation with faster query response
Alexander Decker
 
Saving Money with Open Source GIS
bryanluman
 
Pycon 2012 Taiwan
Dongpo Deng
 
那些年 Python 攻佔了 GIS / The Year Python Takes Over GIS
pycontw
 
Tilemill gwu-wboykinm
Bill Morris
 
Web gis implementation notes
paoloverri
 
Pycon2011
Django Stars
 
Integrating PostGIS in Web Applications
Command Prompt., Inc
 
GeoDjango in a nutshell
Django Stars
 
The 21st Century Harvard Map
Harvard Web Working Group
 
EDIT Geo-tools in E-biosphere conference (London)
Pere Roca Ristol
 
Open Source GeoSpatial
arno974
 
Where2009 - Hacking Map APIs
Andrew Turner
 
Ad

More from OSCON Byrum (20)

PDF
OSCON 2013 - Planning an OpenStack Cloud - Tom Fifield
OSCON Byrum
 
PDF
Protecting Open Innovation with the Defensive Patent License
OSCON Byrum
 
PDF
Using Cascalog to build an app with City of Palo Alto Open Data
OSCON Byrum
 
PPTX
Finite State Machines - Why the fear?
OSCON Byrum
 
PDF
Open Source Automotive Development
OSCON Byrum
 
PPTX
How we built our community using Github - Uri Cohen
OSCON Byrum
 
PDF
The Vanishing Pattern: from iterators to generators in Python
OSCON Byrum
 
PDF
Distributed Coordination with Python
OSCON Byrum
 
PDF
An overview of open source in East Asia (China, Japan, Korea)
OSCON Byrum
 
PPTX
Oscon 2013 Jesse Anderson
OSCON Byrum
 
PDF
US Patriot Act OSCON2012 David Mertz
OSCON Byrum
 
PPTX
OSCON 2012 US Patriot Act Implications for Cloud Computing - Diane Mueller, A...
OSCON Byrum
 
PPTX
Big Data for each one of us
OSCON Byrum
 
KEY
BodyTrack: Open Source Tools for Health Empowerment through Self-Tracking
OSCON Byrum
 
PDF
Using and Building Open Source in Google Corporate Engineering - Justin McWil...
OSCON Byrum
 
PDF
A Look at the Network: Searching for Truth in Distributed Applications
OSCON Byrum
 
PPT
Life After Sharding: Monitoring and Management of a Complex Data Cloud
OSCON Byrum
 
PPT
Faster! Faster! Accelerate your business with blazing prototypes
OSCON Byrum
 
PDF
Comparing open source private cloud platforms
OSCON Byrum
 
PDF
Building an Ecosystem of FLOSS to Educate Students with Disabilities
OSCON Byrum
 
OSCON 2013 - Planning an OpenStack Cloud - Tom Fifield
OSCON Byrum
 
Protecting Open Innovation with the Defensive Patent License
OSCON Byrum
 
Using Cascalog to build an app with City of Palo Alto Open Data
OSCON Byrum
 
Finite State Machines - Why the fear?
OSCON Byrum
 
Open Source Automotive Development
OSCON Byrum
 
How we built our community using Github - Uri Cohen
OSCON Byrum
 
The Vanishing Pattern: from iterators to generators in Python
OSCON Byrum
 
Distributed Coordination with Python
OSCON Byrum
 
An overview of open source in East Asia (China, Japan, Korea)
OSCON Byrum
 
Oscon 2013 Jesse Anderson
OSCON Byrum
 
US Patriot Act OSCON2012 David Mertz
OSCON Byrum
 
OSCON 2012 US Patriot Act Implications for Cloud Computing - Diane Mueller, A...
OSCON Byrum
 
Big Data for each one of us
OSCON Byrum
 
BodyTrack: Open Source Tools for Health Empowerment through Self-Tracking
OSCON Byrum
 
Using and Building Open Source in Google Corporate Engineering - Justin McWil...
OSCON Byrum
 
A Look at the Network: Searching for Truth in Distributed Applications
OSCON Byrum
 
Life After Sharding: Monitoring and Management of a Complex Data Cloud
OSCON Byrum
 
Faster! Faster! Accelerate your business with blazing prototypes
OSCON Byrum
 
Comparing open source private cloud platforms
OSCON Byrum
 
Building an Ecosystem of FLOSS to Educate Students with Disabilities
OSCON Byrum
 
Ad

Recently uploaded (20)

PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 

State of the Art Web Mapping with Open Source