SlideShare uma empresa Scribd logo
1 de 50
Tim Waters
Tech Changes to the
OpenStreetMap Stack
OpenHistoricalMap.org
● Very modest, really...
●
● A map of everything that has ever existed.
● It's putting a time slider on the world
● It's the worlds most out of date map.
What it isn't (quite)
Histosm
What it isn't (quite)
Historical Objects in OSM
What it is
Background
Many peoples mind
Slow start
Immense interest
Examples
Hunterston Scotland 19C
Hunterston Scotland Now
Saeby – Denmark 19C
Saeby – Denmark Now
Roman Roads
Roman Mainz
WW1 Trenches
Snows Infected Pump
Snows Infected Pump
Snows Infected Pump.. in OSM
Seattle – Jeff Meyer
Burning Man 2008/9
Manhattan 1854
Manhattan 1854 - Digitzer
NYPL Building Inspector
Data!
How to add stuff to OHM
Imports and tracing
Historical maps
Wikimaps
Wikimaps
Wikimaps
Editing
● JOSM – change URL
●
● Embedded iD editor
●
● Tags – start_date end_date
● (note of source map would be nice)
Simple?
● see frankies presentation
● cart before horse?
● osm way- good enough is best.
● Led by contributors not historical GIS “experts”
● Do whatever and let the rendered sort it out!
Stats
292 users
1,711,788 Ways
106,718,875 Nodes
6 planets so far 1.2G uncompressed
THE STACK
● What is the stack
● Website / API
● Editors
● Database export / changes replication
● Overpass API
● Map tile generation
Website
vagrant up && vagrant ssh
rails s
Embedded id Editor
Database / Replication
osmosis -q --replicate-apidb
authFile=dbAuth.txt
validateSchemaVersion=no
--write-replication
workingDirectory=data
Overpass
http://overpass.openhistoricalmap.org
Map Generation
Get a bit techy
OSM2PGSQL
osm2pgsql --slim
-S ohm_style.style
--tag-transform-script
ohm_tags_transform2.lua
-d ohm_gis -C 16000 --number-
processes 4 ohm.osm
OSM2PGSQL
-S ohm_style.style
node,way start_date date linear
node,way end_date date linear
node,way start_date_year int4 linear
node,way end_date_year int4 linear
OSM2PGSQL
--tag-transform-script
ohm_tags_transform2.lua
https://lists.openstreetmap.org/pipermail/dev/2013-May/026933.html
Kai Kruger
The lua script you pass into osm2pgsql needs to implement 4 functions
function filter_tags_node
function filter_tags_way
function filter_basic_tags_rel
function filter_tags_relation_member
OSM2PGSQL
--tag-transform-script
ohm_tags_transform2.lua
-- dates have to be ISO 8601 format YYYY-MM-DD
-- since postgres only goes as far back as 4713 BC, we'll store the
year in a new key
if (keyvalues["start_date"] ~= nil ) then
year,month,day = nil
year = string.match(keyvalues["start_date"], "^(-?%d+%d%d%d)")
if (year ~= nil) then
y, month = string.match(keyvalues["start_date"], "^(-?%d+%d%d%d)-
(%d%d)")
if (month == nil) then
month = "01"
day = "01"
else
y, m, day = string.match(keyvalues["start_date"], "^(-?%d+%d%d
%d)-(%d%d)-(%d%d)")
if (day == nil) then
day = "01"
end
--because I suck at patterns!
year = string.sub(year, 0, 4)
month = string.sub(month, 0, 2)
day = string.sub(day, 0, 2)
end_date = year.. "-" .. month .. "-"..day
keyvalues["end_date"] = end_date
keyvalues["end_date_year"] = year
else
OSM2PGSQL
--tag-transform-script
ohm_tags_transform2.lua
Maps
Database
Create view
create view planet_osm_line_2008 as
select * from planet_osm_line
where start_date_year = 2008;
insert into geometry_columns...
'planet_osm_line_2008'
Maps
CartoCSS / Mapnik project uses views
"Datasource": {
"type": "postgis",
"table": " (select way,waterwayn
from planet_osm_line_2008 where waterway in
('stream','drain','ditch') and (tunnel is null or
tunnel != 'yes') ) as water_lines_casing",
"extent": "-20037508,-
19929239,20037508,19929239",
"key_field": "",
"geometry_field": "way",
"dbname": "ohm_gis"
},
mod_tile
By Jaimie ohm_mod_tile
Needs review!
Future
● Overpass to do date time queries
● iD filtering - regex on year? time slider
● mod_tile review to propagate down a date range
to tile set
● Use Vector tiles and just use styles for date
queries?
● Front end js vector rendering?
● Mapwarper / wikimaps UI improvements
Join In & hack day activites?
● Overpass to do date time queries
● More map layers (19C, 18C, Roman)
● iD filtering - regex on year? time slider
● mod_tile work review
● Use Vector tiles and just use styles for date queries?
● Front end js vector rendering
● Mapwarper / wikimaps UI improvements
OpenHistoricalMap.org
#ohm on irc.oftc.net
https://lists.openstreetmap.org/listinfo/historic
https://github.com/openhistoricalmap/

Mais conteúdo relacionado

Mais de chippy

Some geospatial ruby libraries
Some geospatial ruby librariesSome geospatial ruby libraries
Some geospatial ruby librarieschippy
 
Tim waters OpenHistoricalMap State of the Map Scotland 2015
Tim waters OpenHistoricalMap State of the Map Scotland 2015Tim waters OpenHistoricalMap State of the Map Scotland 2015
Tim waters OpenHistoricalMap State of the Map Scotland 2015chippy
 
Tim waters openhistoricalmap geomob london july 2015
Tim waters openhistoricalmap geomob london july 2015Tim waters openhistoricalmap geomob london july 2015
Tim waters openhistoricalmap geomob london july 2015chippy
 
OpenStreetMap and Geospatial Ruby Tim Waters sheffield ruby user group july 2...
OpenStreetMap and Geospatial Ruby Tim Waters sheffield ruby user group july 2...OpenStreetMap and Geospatial Ruby Tim Waters sheffield ruby user group july 2...
OpenStreetMap and Geospatial Ruby Tim Waters sheffield ruby user group july 2...chippy
 
Visible If You Can See it? The Superposition tim waters_20_may
Visible If You Can See it? The Superposition tim waters_20_mayVisible If You Can See it? The Superposition tim waters_20_may
Visible If You Can See it? The Superposition tim waters_20_maychippy
 
Ken campbell interview hoax small 1994
Ken campbell interview hoax small 1994Ken campbell interview hoax small 1994
Ken campbell interview hoax small 1994chippy
 
Ken campbell interview hoax 1994
Ken campbell interview hoax 1994Ken campbell interview hoax 1994
Ken campbell interview hoax 1994chippy
 
OpenHistoricalMap tim waters - Topomancy / NYPL Lightning Talk
OpenHistoricalMap   tim waters - Topomancy / NYPL Lightning TalkOpenHistoricalMap   tim waters - Topomancy / NYPL Lightning Talk
OpenHistoricalMap tim waters - Topomancy / NYPL Lightning Talkchippy
 
Space place psychogeography - foss4g 2013
Space place psychogeography - foss4g 2013Space place psychogeography - foss4g 2013
Space place psychogeography - foss4g 2013chippy
 
The map is not whats there - psychogeography and openstreetmap
The map is not whats there - psychogeography and openstreetmapThe map is not whats there - psychogeography and openstreetmap
The map is not whats there - psychogeography and openstreetmapchippy
 
Leeds Data Thing OpenStreetMap and Other Geo Visualization Stuff
Leeds Data Thing OpenStreetMap and Other Geo Visualization StuffLeeds Data Thing OpenStreetMap and Other Geo Visualization Stuff
Leeds Data Thing OpenStreetMap and Other Geo Visualization Stuffchippy
 
Introduction to OpenStreetMap and Humanitarian OSM Team for Plan Internationa...
Introduction to OpenStreetMap and Humanitarian OSM Team for Plan Internationa...Introduction to OpenStreetMap and Humanitarian OSM Team for Plan Internationa...
Introduction to OpenStreetMap and Humanitarian OSM Team for Plan Internationa...chippy
 
You know when you are addicted to OSM when...
You know when you are addicted to OSM when...You know when you are addicted to OSM when...
You know when you are addicted to OSM when...chippy
 
Psychogeography tim waters wherecampEU 2012
Psychogeography tim waters wherecampEU 2012Psychogeography tim waters wherecampEU 2012
Psychogeography tim waters wherecampEU 2012chippy
 
LSxCafe Swtich2OSM.org talk
LSxCafe Swtich2OSM.org talkLSxCafe Swtich2OSM.org talk
LSxCafe Swtich2OSM.org talkchippy
 
Fuzzy foss4g 2006 tim waters poster
Fuzzy foss4g 2006 tim waters posterFuzzy foss4g 2006 tim waters poster
Fuzzy foss4g 2006 tim waters posterchippy
 
Mapping The Fear of Crime
Mapping The Fear of CrimeMapping The Fear of Crime
Mapping The Fear of Crimechippy
 
Soc map rectification_tools_2011
Soc map rectification_tools_2011Soc map rectification_tools_2011
Soc map rectification_tools_2011chippy
 
Community Analytics on the GeoWeb
Community Analytics on the GeoWebCommunity Analytics on the GeoWeb
Community Analytics on the GeoWebchippy
 

Mais de chippy (20)

Some geospatial ruby libraries
Some geospatial ruby librariesSome geospatial ruby libraries
Some geospatial ruby libraries
 
Tim waters OpenHistoricalMap State of the Map Scotland 2015
Tim waters OpenHistoricalMap State of the Map Scotland 2015Tim waters OpenHistoricalMap State of the Map Scotland 2015
Tim waters OpenHistoricalMap State of the Map Scotland 2015
 
Tim waters openhistoricalmap geomob london july 2015
Tim waters openhistoricalmap geomob london july 2015Tim waters openhistoricalmap geomob london july 2015
Tim waters openhistoricalmap geomob london july 2015
 
OpenStreetMap and Geospatial Ruby Tim Waters sheffield ruby user group july 2...
OpenStreetMap and Geospatial Ruby Tim Waters sheffield ruby user group july 2...OpenStreetMap and Geospatial Ruby Tim Waters sheffield ruby user group july 2...
OpenStreetMap and Geospatial Ruby Tim Waters sheffield ruby user group july 2...
 
Visible If You Can See it? The Superposition tim waters_20_may
Visible If You Can See it? The Superposition tim waters_20_mayVisible If You Can See it? The Superposition tim waters_20_may
Visible If You Can See it? The Superposition tim waters_20_may
 
Ken campbell interview hoax small 1994
Ken campbell interview hoax small 1994Ken campbell interview hoax small 1994
Ken campbell interview hoax small 1994
 
Ken campbell interview hoax 1994
Ken campbell interview hoax 1994Ken campbell interview hoax 1994
Ken campbell interview hoax 1994
 
OpenHistoricalMap tim waters - Topomancy / NYPL Lightning Talk
OpenHistoricalMap   tim waters - Topomancy / NYPL Lightning TalkOpenHistoricalMap   tim waters - Topomancy / NYPL Lightning Talk
OpenHistoricalMap tim waters - Topomancy / NYPL Lightning Talk
 
Ohm
OhmOhm
Ohm
 
Space place psychogeography - foss4g 2013
Space place psychogeography - foss4g 2013Space place psychogeography - foss4g 2013
Space place psychogeography - foss4g 2013
 
The map is not whats there - psychogeography and openstreetmap
The map is not whats there - psychogeography and openstreetmapThe map is not whats there - psychogeography and openstreetmap
The map is not whats there - psychogeography and openstreetmap
 
Leeds Data Thing OpenStreetMap and Other Geo Visualization Stuff
Leeds Data Thing OpenStreetMap and Other Geo Visualization StuffLeeds Data Thing OpenStreetMap and Other Geo Visualization Stuff
Leeds Data Thing OpenStreetMap and Other Geo Visualization Stuff
 
Introduction to OpenStreetMap and Humanitarian OSM Team for Plan Internationa...
Introduction to OpenStreetMap and Humanitarian OSM Team for Plan Internationa...Introduction to OpenStreetMap and Humanitarian OSM Team for Plan Internationa...
Introduction to OpenStreetMap and Humanitarian OSM Team for Plan Internationa...
 
You know when you are addicted to OSM when...
You know when you are addicted to OSM when...You know when you are addicted to OSM when...
You know when you are addicted to OSM when...
 
Psychogeography tim waters wherecampEU 2012
Psychogeography tim waters wherecampEU 2012Psychogeography tim waters wherecampEU 2012
Psychogeography tim waters wherecampEU 2012
 
LSxCafe Swtich2OSM.org talk
LSxCafe Swtich2OSM.org talkLSxCafe Swtich2OSM.org talk
LSxCafe Swtich2OSM.org talk
 
Fuzzy foss4g 2006 tim waters poster
Fuzzy foss4g 2006 tim waters posterFuzzy foss4g 2006 tim waters poster
Fuzzy foss4g 2006 tim waters poster
 
Mapping The Fear of Crime
Mapping The Fear of CrimeMapping The Fear of Crime
Mapping The Fear of Crime
 
Soc map rectification_tools_2011
Soc map rectification_tools_2011Soc map rectification_tools_2011
Soc map rectification_tools_2011
 
Community Analytics on the GeoWeb
Community Analytics on the GeoWebCommunity Analytics on the GeoWeb
Community Analytics on the GeoWeb
 

Tim waters OpenHistoricalMap Changes to the OSM Stack. SOTM-US 2015