Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.
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...
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 histori...
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 ...
Website
vagrant up && vagrant ssh
rails s
Embedded id Editor
Database / Replication
osmosis -q --replicate-apidb
authFile=dbAuth.txt
validateSchemaVersion=no
--write-replication
worki...
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-...
OSM2PGSQL
-S ohm_style.style
node,way start_date date linear
node,way end_date date linear
node,way start_date_year int4 l...
OSM2PGSQL
--tag-transform-script
ohm_tags_transform2.lua
https://lists.openstreetmap.org/pipermail/dev/2013-May/026933.htm...
OSM2PGSQL
--tag-transform-script
ohm_tags_transform2.lua
-- dates have to be ISO 8601 format YYYY-MM-DD
-- since postgres ...
--because I suck at patterns!
year = string.sub(year, 0, 4)
month = string.sub(month, 0, 2)
day = string.sub(day, 0, 2)
en...
Maps
Database
Create view
create view planet_osm_line_2008 as
select * from planet_osm_line
where start_date_year = 2008;
...
Maps
CartoCSS / Mapnik project uses views
"Datasource": {
"type": "postgis",
"table": " (select way,waterwayn
from planet_...
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 ...
Join In & hack day activites?
● Overpass to do date time queries
● More map layers (19C, 18C, Roman)
● iD filtering - rege...
Tim waters OpenHistoricalMap Changes to the OSM Stack. SOTM-US 2015
Tim waters OpenHistoricalMap Changes to the OSM Stack. SOTM-US 2015
Próxima SlideShare
Cargando en…5
×

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

1.497 visualizaciones

Publicado el

open historical map talk at sotm-us conference NYC 2015

  • Sé el primero en comentar

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

  1. 1. Tim Waters Tech Changes to the OpenStreetMap Stack
  2. 2. 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.
  3. 3. What it isn't (quite) Histosm
  4. 4. What it isn't (quite) Historical Objects in OSM
  5. 5. What it is
  6. 6. Background
  7. 7. Many peoples mind Slow start Immense interest
  8. 8. Examples
  9. 9. Hunterston Scotland 19C
  10. 10. Hunterston Scotland Now
  11. 11. Saeby – Denmark 19C
  12. 12. Saeby – Denmark Now
  13. 13. Roman Roads
  14. 14. Roman Mainz
  15. 15. WW1 Trenches
  16. 16. Snows Infected Pump
  17. 17. Snows Infected Pump
  18. 18. Snows Infected Pump.. in OSM
  19. 19. Seattle – Jeff Meyer
  20. 20. Burning Man 2008/9
  21. 21. Manhattan 1854
  22. 22. Manhattan 1854 - Digitzer
  23. 23. NYPL Building Inspector
  24. 24. Data!
  25. 25. How to add stuff to OHM
  26. 26. Imports and tracing Historical maps
  27. 27. Wikimaps
  28. 28. Wikimaps
  29. 29. Wikimaps
  30. 30. Editing ● JOSM – change URL ● ● Embedded iD editor ● ● Tags – start_date end_date ● (note of source map would be nice)
  31. 31. 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!
  32. 32. Stats 292 users 1,711,788 Ways 106,718,875 Nodes 6 planets so far 1.2G uncompressed
  33. 33. THE STACK ● What is the stack ● Website / API ● Editors ● Database export / changes replication ● Overpass API ● Map tile generation
  34. 34. Website vagrant up && vagrant ssh rails s
  35. 35. Embedded id Editor
  36. 36. Database / Replication osmosis -q --replicate-apidb authFile=dbAuth.txt validateSchemaVersion=no --write-replication workingDirectory=data
  37. 37. Overpass http://overpass.openhistoricalmap.org
  38. 38. Map Generation Get a bit techy
  39. 39. OSM2PGSQL osm2pgsql --slim -S ohm_style.style --tag-transform-script ohm_tags_transform2.lua -d ohm_gis -C 16000 --number- processes 4 ohm.osm
  40. 40. 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
  41. 41. 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
  42. 42. 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
  43. 43. --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
  44. 44. 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'
  45. 45. 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" },
  46. 46. mod_tile By Jaimie ohm_mod_tile Needs review!
  47. 47. 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
  48. 48. 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/

×