SlideShare a Scribd company logo
1 of 95
Mapping History
 (starting with Manchester)
      Frankie Roberto
      frankie@frankieroberto.com
      Twitter: frankieroberto
Currently, OpenStreetMap
maps change over time, as
    people edit them.
...in a way that printed maps don’t.
        N.B. This map, in Sheffield, has been like this for months.
But these changes represent
 the speed at which editors
  update and improve the
   maps, not the speed of
  changes on the ground.
I’d like to be able to add a
time-slider to maps, so that
you can see how the places
  themselves have changed
           over time.
Comparing old maps with
   new maps is fun...
Before...
After...
But these comparisons are
 made harder by the big
 changes in cartography.
I’ve mapped some of the buildings in Manchester...
...where there are lots of pretty old buildings...
...and some ugly newer ones...
...as well as a few under construction.
(I’ve shared all the photos on Flickr)
...where they are even machine tagged with the appropriate way.
The years in which the
buildings were constructed
    have been added to
 OpenStreetMap using...
start_date=
This information can
    sometimes be found
inscribed on the buildings,
but for the most part I used
     the local library...
Isn’t it pretty?
Books like this were a great help.
...it even has a gazeteer, listing the buildings by street.
So, given this data, how do
you filter out new buildings
      from old maps?
You could add extra rules
to Mapnik or Osmarender.

...but it’s probably easiest
      to pre-process.
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="@*|node()">
  <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy>
</xsl:template>

<xsl:template match="way">
  <xsl:choose>
    <xsl:when test="tag/@k = 'start_date'">
      <xsl:choose>
        <xsl:when test="tag[@k = 'start_date']/@v &gt; $year">
        </xsl:when>
        <xsl:otherwise>
          <way><xsl:apply-templates select="@*|node()"/></way>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:when>
    <xsl:otherwise>
      <way><xsl:apply-templates select="@*|node()"/></way>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
                                                         ...using a little bit of XSLT.
</xsl:stylesheet>
#!/bin/bash

for (( i = 1900; i < 2011; i = i + 10))
do
	    xsltproc --stringparam "year" "$i" start_date_filter.xsl data.svg > data/$i.osm
done




       A quick bash script produces one filtered data file per decade:


1800.osm                   1910.osm
1810.osm                   1920.osm
1820.osm                   1930.osm
1830.osm                   1940.osm
1840.osm                   1950.osm
1850.osm                   1960.osm
1860.osm                   1970.osm
1870.osm                   1980.osm
1880.osm                   1990.osm
1890.osm                   2000.osm
1900.osm                   2010.osm
#!/bin/bash

for (( i = 1900; i < 2011; i = i + 10))
do
	    ln -s ../files/$i.osm data.osm
	    xsltproc osmarender.xsl osm-map-features-z17.xml > svg/$i.svg
done



     ...and then another bash script renders each file using Osmarender:

1800.svg                   1910.svg
1810.svg                   1920.svg
1820.svg                   1930.svg
1830.svg                   1940.svg
1840.svg                   1950.svg
1850.svg                   1960.svg
1860.svg                   1970.svg
1870.svg                   1980.svg
1880.svg                   1990.svg
1890.svg                   2000.svg
1900.svg                   2010.svg
A quick caveat...
A quick caveat...

start_date_filter.xsl   expects start_date=YYYY
A quick caveat...

start_date_filter.xsl   expects start_date=YYYY

         but the actual date might be:
A quick caveat...

start_date_filter.xsl   expects start_date=YYYY

         but the actual date might be:


   1934-10
A quick caveat...

start_date_filter.xsl   expects start_date=YYYY

          but the actual date might be:


    1934-10
  1934-10-23
A quick caveat...

start_date_filter.xsl   expects start_date=YYYY

          but the actual date might be:


    1934-10          c1830
  1934-10-23
A quick caveat...

start_date_filter.xsl   expects start_date=YYYY

          but the actual date might be:


    1934-10          c1830
  1934-10-23         1900s
A quick caveat...

start_date_filter.xsl   expects start_date=YYYY

          but the actual date might be:


    1934-10          c1830           1832-1847
  1934-10-23         1900s
A quick caveat...

start_date_filter.xsl   expects start_date=YYYY

          but the actual date might be:


    1934-10          c1830            1832-1847
  1934-10-23         1900s          “before 1832”
A quick caveat...

start_date_filter.xsl    expects start_date=YYYY

          but the actual date might be:


    1934-10           c1830            1832-1847
  1934-10-23          1900s          “before 1832”



           Figuring this out is a TODO...
Here’s how the rendered files look:




                                     1 80 0
18 1 0
1820
1830
1840
Theatre Royale




                 1850
Free Trade Hall




                  1860
Lloyd’s House




                1870
Town Hall




Train station




                1 880
Elliot House




               1 89 0
Train station goods warehouse



1900
Midland Hotel




                19 1 0
St George’s House



                    1920
1930
Town Hall Extension




   Central Library




                      1940
1950
Peter House


              1960
Lincoln Square




                 1970
1 980
Heron House




              1990
20 0 0
Great Northern Tower




                       20 1 0 (?)
But there’s a problem with this map!




                                       There are buildings I don’t have dates for yet




 But more importantly, there are old buildings,
   long demolished which should be shown.


                                       1 80 0
Take a look at this old map of the area for example...




                      We could trace all these old buildings, and tag them with...
end_date=
But there’s a problem:
But there’s a problem:

  We don’t want long-demolished
 buildings appearing on the maps!
But there’s a problem:

    We don’t want long-demolished
   buildings appearing on the maps!


Renderers could filter out features with
     end_date < Date.now...
But it’d probably be best to
move the filtering to the API:
But it’d probably be best to
  move the filtering to the API:

GET http://www.openstreetmap.org/api/0.7/[...]?date=1932
But it’d probably be best to
  move the filtering to the API:

GET http://www.openstreetmap.org/api/0.7/[...]?date=1932




                   Default = [today]
We also need to date attributes:
We also need to date attributes:
• Name changes   (old_name=)
We also need to date attributes:
• Name changes     (old_name=)
• Change in use   (amenity=cinema becomes sport=bingo)
We also need to date attributes:
• Name changes (old_name=)
• Change in use (amenity=cinema becomes sport=bingo)
• Change in scale (highway=unclassified to highway=primary)
We also need to date attributes:
• Name changes (old_name=)
• Change in use (amenity=cinema becomes sport=bingo)
• Change in scale (highway=unclassified to highway=primary)
• Accessibility modifications (bicycle=yes)
One solution is add two extra columns:
One solution is add two extra columns:

          Tag               start_date   end_date
     amenity=bank             1934         2001
   name=Lloyd’s Bank          1934         2001
landuse=construction_site     2001         2002
      amenity=pub             2002
  name=Wetherspoons           2002
     wheelchair=yes           2005
One solution is add two extra columns:

          Tag               start_date   end_date
     amenity=bank             1934         2001
   name=Lloyd’s Bank          1934         2001
landuse=construction_site     2001         2002
      amenity=pub             2002
  name=Wetherspoons           2002
     wheelchair=yes           2005
One solution is add two extra columns:

          Tag               start_date   end_date
     amenity=bank             1934         2001
   name=Lloyd’s Bank          1934         2001
landuse=construction_site     2001         2002
      amenity=pub             2002
  name=Wetherspoons           2002
     wheelchair=yes           2005
One solution is add two extra columns:

          Tag               start_date   end_date
     amenity=bank             1934         2001
   name=Lloyd’s Bank          1934         2001
landuse=construction_site     2001         2002
      amenity=pub             2002
  name=Wetherspoons           2002
     wheelchair=yes           2005
One solution is add two extra columns:

          Tag               start_date   end_date
     amenity=bank             1934         2001
   name=Lloyd’s Bank          1934         2001
landuse=construction_site     2001         2002
      amenity=pub             2002
  name=Wetherspoons           2002
     wheelchair=yes           2005
One solution is add two extra columns:

          Tag               start_date   end_date
     amenity=bank             1934         2001
   name=Lloyd’s Bank          1934         2001
landuse=construction_site     2001         2002
      amenity=pub             2002
  name=Wetherspoons           2002
     wheelchair=yes           2005
One solution is add two extra columns:

          Tag               start_date   end_date
     amenity=bank             1934         2001
   name=Lloyd’s Bank          1934         2001
landuse=construction_site     2001         2002
      amenity=pub             2002
  name=Wetherspoons           2002
     wheelchair=yes           2005
We may also need to date
changes in positions (nodes)
We may also need to date
   changes in positions (nodes)

• Boundary changes
We may also need to date
   changes in positions (nodes)

• Boundary changes
• Extensions to buildings
We may also need to date
   changes in positions (nodes)

• Boundary changes
• Extensions to buildings
• Road straightening
We may also need to date
   changes in positions (nodes)

• Boundary changes
• Extensions to buildings
• Road straightening
• Flooding?
The solution is probably to use
        Relations (??)
Dating things poses some
  Philosophical Issues
How long does a feature remain the same feature?

  (Is a building with a preserved facade the
         same building, or a new one?)
Final thought....
Final thought....



Can we predict the future?
Final thought....



Can we predict the future?

    (Should we tag planned new
   buildings, roads and features?)
Thanks
(get mapping history!)
   Frankie Roberto
   frankie@frankieroberto.com
  Twitter: frankieroberto

More Related Content

Viewers also liked

JavaScript is everywhere
JavaScript is everywhereJavaScript is everywhere
JavaScript is everywhereStoyan Stefanov
 
5 Mistakes of Massive CSS
5 Mistakes of Massive CSS5 Mistakes of Massive CSS
5 Mistakes of Massive CSSNicole Sullivan
 
Automating your workflow with Gulp.js
Automating your workflow with Gulp.jsAutomating your workflow with Gulp.js
Automating your workflow with Gulp.jsBo-Yi Wu
 
JavaScript for PHP developers
JavaScript for PHP developersJavaScript for PHP developers
JavaScript for PHP developersStoyan Stefanov
 
The Real Life Social Network v2
The Real Life Social Network v2The Real Life Social Network v2
The Real Life Social Network v2Paul Adams
 
Tim waters OpenHistoricalMap Changes to the OSM Stack. SOTM-US 2015
Tim waters OpenHistoricalMap Changes to the OSM Stack. SOTM-US 2015Tim waters OpenHistoricalMap Changes to the OSM Stack. SOTM-US 2015
Tim waters OpenHistoricalMap Changes to the OSM Stack. SOTM-US 2015chippy
 
Mapping History: Toward a Curriculum-Integrated Information Literacy Program
Mapping History: Toward a Curriculum-Integrated Information Literacy ProgramMapping History: Toward a Curriculum-Integrated Information Literacy Program
Mapping History: Toward a Curriculum-Integrated Information Literacy ProgramAmanda Binder
 
Hantering av kartor wms tjänster och punktmoln i novapoint dcm bas
Hantering av kartor wms  tjänster och punktmoln i novapoint dcm basHantering av kartor wms  tjänster och punktmoln i novapoint dcm bas
Hantering av kartor wms tjänster och punktmoln i novapoint dcm basVianova Systems Sweden AB
 
Time, Change and Habits in Geospatial-Temporal Information Standards
Time, Change and Habits in Geospatial-Temporal Information StandardsTime, Change and Habits in Geospatial-Temporal Information Standards
Time, Change and Habits in Geospatial-Temporal Information StandardsGeorge Percivall
 
Common Approach for UAS Data Geoprocessing
Common Approach for UAS Data GeoprocessingCommon Approach for UAS Data Geoprocessing
Common Approach for UAS Data GeoprocessingGeorge Percivall
 
Semantic Web 2.0
Semantic Web 2.0Semantic Web 2.0
Semantic Web 2.0hchen1
 
Dotted Eyes - Open Software, Standards and Data
Dotted Eyes - Open Software, Standards and DataDotted Eyes - Open Software, Standards and Data
Dotted Eyes - Open Software, Standards and DataDotted Eyes
 
A Brief History of Web Mapping
A Brief History of Web MappingA Brief History of Web Mapping
A Brief History of Web MappingSteven Feldman
 
History of Cartography: From Ptolemy to TomTom
History of Cartography: From Ptolemy to TomTomHistory of Cartography: From Ptolemy to TomTom
History of Cartography: From Ptolemy to TomTomMark Baker
 
Geospatial Web
Geospatial WebGeospatial Web
Geospatial Webhchen1
 
MongoDB + GeoServer
MongoDB + GeoServerMongoDB + GeoServer
MongoDB + GeoServerMongoDB
 

Viewers also liked (18)

JavaScript is everywhere
JavaScript is everywhereJavaScript is everywhere
JavaScript is everywhere
 
5 Mistakes of Massive CSS
5 Mistakes of Massive CSS5 Mistakes of Massive CSS
5 Mistakes of Massive CSS
 
YSlow 2.0
YSlow 2.0YSlow 2.0
YSlow 2.0
 
Automating your workflow with Gulp.js
Automating your workflow with Gulp.jsAutomating your workflow with Gulp.js
Automating your workflow with Gulp.js
 
JavaScript for PHP developers
JavaScript for PHP developersJavaScript for PHP developers
JavaScript for PHP developers
 
The Real Life Social Network v2
The Real Life Social Network v2The Real Life Social Network v2
The Real Life Social Network v2
 
Tim waters OpenHistoricalMap Changes to the OSM Stack. SOTM-US 2015
Tim waters OpenHistoricalMap Changes to the OSM Stack. SOTM-US 2015Tim waters OpenHistoricalMap Changes to the OSM Stack. SOTM-US 2015
Tim waters OpenHistoricalMap Changes to the OSM Stack. SOTM-US 2015
 
Mapping History: Toward a Curriculum-Integrated Information Literacy Program
Mapping History: Toward a Curriculum-Integrated Information Literacy ProgramMapping History: Toward a Curriculum-Integrated Information Literacy Program
Mapping History: Toward a Curriculum-Integrated Information Literacy Program
 
Hantering av kartor wms tjänster och punktmoln i novapoint dcm bas
Hantering av kartor wms  tjänster och punktmoln i novapoint dcm basHantering av kartor wms  tjänster och punktmoln i novapoint dcm bas
Hantering av kartor wms tjänster och punktmoln i novapoint dcm bas
 
Time, Change and Habits in Geospatial-Temporal Information Standards
Time, Change and Habits in Geospatial-Temporal Information StandardsTime, Change and Habits in Geospatial-Temporal Information Standards
Time, Change and Habits in Geospatial-Temporal Information Standards
 
Common Approach for UAS Data Geoprocessing
Common Approach for UAS Data GeoprocessingCommon Approach for UAS Data Geoprocessing
Common Approach for UAS Data Geoprocessing
 
Semantic Web 2.0
Semantic Web 2.0Semantic Web 2.0
Semantic Web 2.0
 
Dotted Eyes - Open Software, Standards and Data
Dotted Eyes - Open Software, Standards and DataDotted Eyes - Open Software, Standards and Data
Dotted Eyes - Open Software, Standards and Data
 
Ichc2013
Ichc2013Ichc2013
Ichc2013
 
A Brief History of Web Mapping
A Brief History of Web MappingA Brief History of Web Mapping
A Brief History of Web Mapping
 
History of Cartography: From Ptolemy to TomTom
History of Cartography: From Ptolemy to TomTomHistory of Cartography: From Ptolemy to TomTom
History of Cartography: From Ptolemy to TomTom
 
Geospatial Web
Geospatial WebGeospatial Web
Geospatial Web
 
MongoDB + GeoServer
MongoDB + GeoServerMongoDB + GeoServer
MongoDB + GeoServer
 

Recently uploaded

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 

Recently uploaded (20)

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 

Mapping History on Open Street Map

  • 1. Mapping History (starting with Manchester) Frankie Roberto frankie@frankieroberto.com Twitter: frankieroberto
  • 2. Currently, OpenStreetMap maps change over time, as people edit them.
  • 3. ...in a way that printed maps don’t. N.B. This map, in Sheffield, has been like this for months.
  • 4. But these changes represent the speed at which editors update and improve the maps, not the speed of changes on the ground.
  • 5. I’d like to be able to add a time-slider to maps, so that you can see how the places themselves have changed over time.
  • 6. Comparing old maps with new maps is fun...
  • 9. But these comparisons are made harder by the big changes in cartography.
  • 10. I’ve mapped some of the buildings in Manchester...
  • 11. ...where there are lots of pretty old buildings...
  • 12.
  • 13.
  • 14. ...and some ugly newer ones...
  • 15. ...as well as a few under construction.
  • 16. (I’ve shared all the photos on Flickr)
  • 17. ...where they are even machine tagged with the appropriate way.
  • 18.
  • 19. The years in which the buildings were constructed have been added to OpenStreetMap using...
  • 21. This information can sometimes be found inscribed on the buildings, but for the most part I used the local library...
  • 23. Books like this were a great help.
  • 24. ...it even has a gazeteer, listing the buildings by street.
  • 25. So, given this data, how do you filter out new buildings from old maps?
  • 26. You could add extra rules to Mapnik or Osmarender. ...but it’s probably easiest to pre-process.
  • 27. <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="@*|node()"> <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy> </xsl:template> <xsl:template match="way"> <xsl:choose> <xsl:when test="tag/@k = 'start_date'"> <xsl:choose> <xsl:when test="tag[@k = 'start_date']/@v &gt; $year"> </xsl:when> <xsl:otherwise> <way><xsl:apply-templates select="@*|node()"/></way> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <way><xsl:apply-templates select="@*|node()"/></way> </xsl:otherwise> </xsl:choose> </xsl:template> ...using a little bit of XSLT. </xsl:stylesheet>
  • 28. #!/bin/bash for (( i = 1900; i < 2011; i = i + 10)) do xsltproc --stringparam "year" "$i" start_date_filter.xsl data.svg > data/$i.osm done A quick bash script produces one filtered data file per decade: 1800.osm 1910.osm 1810.osm 1920.osm 1820.osm 1930.osm 1830.osm 1940.osm 1840.osm 1950.osm 1850.osm 1960.osm 1860.osm 1970.osm 1870.osm 1980.osm 1880.osm 1990.osm 1890.osm 2000.osm 1900.osm 2010.osm
  • 29. #!/bin/bash for (( i = 1900; i < 2011; i = i + 10)) do ln -s ../files/$i.osm data.osm xsltproc osmarender.xsl osm-map-features-z17.xml > svg/$i.svg done ...and then another bash script renders each file using Osmarender: 1800.svg 1910.svg 1810.svg 1920.svg 1820.svg 1930.svg 1830.svg 1940.svg 1840.svg 1950.svg 1850.svg 1960.svg 1860.svg 1970.svg 1870.svg 1980.svg 1880.svg 1990.svg 1890.svg 2000.svg 1900.svg 2010.svg
  • 31. A quick caveat... start_date_filter.xsl expects start_date=YYYY
  • 32. A quick caveat... start_date_filter.xsl expects start_date=YYYY but the actual date might be:
  • 33. A quick caveat... start_date_filter.xsl expects start_date=YYYY but the actual date might be: 1934-10
  • 34. A quick caveat... start_date_filter.xsl expects start_date=YYYY but the actual date might be: 1934-10 1934-10-23
  • 35. A quick caveat... start_date_filter.xsl expects start_date=YYYY but the actual date might be: 1934-10 c1830 1934-10-23
  • 36. A quick caveat... start_date_filter.xsl expects start_date=YYYY but the actual date might be: 1934-10 c1830 1934-10-23 1900s
  • 37. A quick caveat... start_date_filter.xsl expects start_date=YYYY but the actual date might be: 1934-10 c1830 1832-1847 1934-10-23 1900s
  • 38. A quick caveat... start_date_filter.xsl expects start_date=YYYY but the actual date might be: 1934-10 c1830 1832-1847 1934-10-23 1900s “before 1832”
  • 39. A quick caveat... start_date_filter.xsl expects start_date=YYYY but the actual date might be: 1934-10 c1830 1832-1847 1934-10-23 1900s “before 1832” Figuring this out is a TODO...
  • 40. Here’s how the rendered files look: 1 80 0
  • 42. 1820
  • 43. 1830
  • 44. 1840
  • 49. Elliot House 1 89 0
  • 50. Train station goods warehouse 1900
  • 51. Midland Hotel 19 1 0
  • 53. 1930
  • 54. Town Hall Extension Central Library 1940
  • 55. 1950
  • 56. Peter House 1960
  • 58. 1 980
  • 59. Heron House 1990
  • 61. Great Northern Tower 20 1 0 (?)
  • 62. But there’s a problem with this map! There are buildings I don’t have dates for yet But more importantly, there are old buildings, long demolished which should be shown. 1 80 0
  • 63. Take a look at this old map of the area for example... We could trace all these old buildings, and tag them with...
  • 65. But there’s a problem:
  • 66. But there’s a problem: We don’t want long-demolished buildings appearing on the maps!
  • 67. But there’s a problem: We don’t want long-demolished buildings appearing on the maps! Renderers could filter out features with end_date < Date.now...
  • 68. But it’d probably be best to move the filtering to the API:
  • 69. But it’d probably be best to move the filtering to the API: GET http://www.openstreetmap.org/api/0.7/[...]?date=1932
  • 70. But it’d probably be best to move the filtering to the API: GET http://www.openstreetmap.org/api/0.7/[...]?date=1932 Default = [today]
  • 71. We also need to date attributes:
  • 72. We also need to date attributes: • Name changes (old_name=)
  • 73. We also need to date attributes: • Name changes (old_name=) • Change in use (amenity=cinema becomes sport=bingo)
  • 74. We also need to date attributes: • Name changes (old_name=) • Change in use (amenity=cinema becomes sport=bingo) • Change in scale (highway=unclassified to highway=primary)
  • 75. We also need to date attributes: • Name changes (old_name=) • Change in use (amenity=cinema becomes sport=bingo) • Change in scale (highway=unclassified to highway=primary) • Accessibility modifications (bicycle=yes)
  • 76. One solution is add two extra columns:
  • 77. One solution is add two extra columns: Tag start_date end_date amenity=bank 1934 2001 name=Lloyd’s Bank 1934 2001 landuse=construction_site 2001 2002 amenity=pub 2002 name=Wetherspoons 2002 wheelchair=yes 2005
  • 78. One solution is add two extra columns: Tag start_date end_date amenity=bank 1934 2001 name=Lloyd’s Bank 1934 2001 landuse=construction_site 2001 2002 amenity=pub 2002 name=Wetherspoons 2002 wheelchair=yes 2005
  • 79. One solution is add two extra columns: Tag start_date end_date amenity=bank 1934 2001 name=Lloyd’s Bank 1934 2001 landuse=construction_site 2001 2002 amenity=pub 2002 name=Wetherspoons 2002 wheelchair=yes 2005
  • 80. One solution is add two extra columns: Tag start_date end_date amenity=bank 1934 2001 name=Lloyd’s Bank 1934 2001 landuse=construction_site 2001 2002 amenity=pub 2002 name=Wetherspoons 2002 wheelchair=yes 2005
  • 81. One solution is add two extra columns: Tag start_date end_date amenity=bank 1934 2001 name=Lloyd’s Bank 1934 2001 landuse=construction_site 2001 2002 amenity=pub 2002 name=Wetherspoons 2002 wheelchair=yes 2005
  • 82. One solution is add two extra columns: Tag start_date end_date amenity=bank 1934 2001 name=Lloyd’s Bank 1934 2001 landuse=construction_site 2001 2002 amenity=pub 2002 name=Wetherspoons 2002 wheelchair=yes 2005
  • 83. One solution is add two extra columns: Tag start_date end_date amenity=bank 1934 2001 name=Lloyd’s Bank 1934 2001 landuse=construction_site 2001 2002 amenity=pub 2002 name=Wetherspoons 2002 wheelchair=yes 2005
  • 84. We may also need to date changes in positions (nodes)
  • 85. We may also need to date changes in positions (nodes) • Boundary changes
  • 86. We may also need to date changes in positions (nodes) • Boundary changes • Extensions to buildings
  • 87. We may also need to date changes in positions (nodes) • Boundary changes • Extensions to buildings • Road straightening
  • 88. We may also need to date changes in positions (nodes) • Boundary changes • Extensions to buildings • Road straightening • Flooding?
  • 89. The solution is probably to use Relations (??)
  • 90. Dating things poses some Philosophical Issues
  • 91. How long does a feature remain the same feature? (Is a building with a preserved facade the same building, or a new one?)
  • 93. Final thought.... Can we predict the future?
  • 94. Final thought.... Can we predict the future? (Should we tag planned new buildings, roads and features?)
  • 95. Thanks (get mapping history!) Frankie Roberto frankie@frankieroberto.com Twitter: frankieroberto