HackMD
  • New!
    New!  “Bookmark” and save your note
    Find a note that's worth keeping or want reading it later? “Bookmark” it to your personal reading list.
    Got it
      • Create new note
      • Create a note from template
    • New!  “Bookmark” and save your note
      New!  “Bookmark” and save your note
      Find a note that's worth keeping or want reading it later? “Bookmark” it to your personal reading list.
      Got it
      • Options
      • Versions and GitHub Sync
      • Transfer ownership
      • Delete this note
      • Template
      • Save as template
      • Insert from template
      • Export
      • Dropbox
      • Google Drive
      • Gist
      • Import
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
      • Download
      • Markdown
      • HTML
      • Raw HTML
      • ODF (Beta)
      • Sharing Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • More (Comment, Invitee)
      • Publishing
        Everyone on the web can find and read all notes of this public team.
        After the note is published, everyone on the web can find and read this note.
        See all published notes on profile page.
      • Commenting Enable
        Disabled Forbidden Owners Signed-in users Everyone
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
        • Everyone
      • Invitee
      • No invitee
    Menu Sharing Create Help
    Create Create new note Create a note from template
    Menu
    Options
    Versions and GitHub Sync Transfer ownership Delete this note
    Export
    Dropbox Google Drive Gist
    Import
    Dropbox Google Drive Gist Clipboard
    Download
    Markdown HTML Raw HTML ODF (Beta)
    Back
    Sharing
    Sharing Link copied
    /edit
    View mode
    • Edit mode
    • View mode
    • Book mode
    • Slide mode
    Edit mode View mode Book mode Slide mode
    Note Permission
    Read
    Owners
    • Owners
    • Signed-in users
    • Everyone
    Owners Signed-in users Everyone
    Write
    Owners
    • Owners
    • Signed-in users
    • Everyone
    Owners Signed-in users Everyone
    More (Comment, Invitee)
    Publishing
    Everyone on the web can find and read all notes of this public team.
    After the note is published, everyone on the web can find and read this note.
    See all published notes on profile page.
    More (Comment, Invitee)
    Commenting Enable
    Disabled Forbidden Owners Signed-in users Everyone
    Permission
    Owners
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Invitee
    No invitee
       owned this note    owned this note      
    Published Linked with
    Like BookmarkBookmarked
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # View OSM changes in time by [mahdi1234](https://www.openstreetmap.org/user/mahdi1234) ### Geofrabrik data First let's get historical OSM data these can be downloaded from [Geofabrik](http://download.geofabrik.de/europe.html) select the country and download **internal.osh.pbf** - OSM login is required to download. Then grab latest.osm.pbf which is up-to-date file with no history. ### Osmium Download [Osmium](https://osmcode.org/osmium-tool/) Prepare data for certain date as baseline e.g. Jan 1st 2019 ``` osmium time-filter ./czech-republic-internal.osh.pbf 2019-01-01T00:00:00Z -o 2019_CZ_full.pbf ``` cut the area from whole country to bounding box of interest ``` osmium extract -b 16.842041,49.0288644,17.0145607,49.1162425 ./2019_CZ_full.pbf -o zdanice_2019.pbf ``` and optionally convert it to osm xml file (needed for JOSM; not needed for Maperitive) ``` osmium cat zdanice_2019.pbf -o zdanice_2019.osm ``` Prepare latest data by cutting the same area ``` osmium extract -b 16.842041,49.0288644,17.0145607,49.1162425 ./czech-republic-latest.osm.pbf -o zdanice_latest.pbf ``` remove everything apart from paths and tracks ``` osmium tags-filter zdanice_latest.pbf w/highway=track,path -o zdanice_latest_cesty.pbf ``` and optionally convert to osm xml ``` osmium cat zdanice_latest_cesty.pbf -o zdanice_latest_cesty.osm ``` ### Compare There are varios scripts and tools which can be used like basic perl script [Osmdiff](https://wiki.openstreetmap.org/wiki/Osmdiff) or big GIS package [QGIS](https://www.qgis.org/en/site/) (which I never had luck with to understand it) I decided to go first with [JOSM](https://josm.openstreetmap.de/) which's my tool-to-go for map edits. It can open osm xml, but was quite sluggish with the files (filtering historical extract for only some entities would help). Next I tried [Maperitive](http://maperitive.net/) (sorry, Win only) which I found better option in this case. Simply turning on/off layer with added path/tracks in current data file did the trick (had to edit a bit rules of Maperitive renderer, but that's different story). 2019 - ![](https://i.imgur.com/SQcBGfJ.png) July 2020 - ![](https://i.imgur.com/j9BIon5.png) ### Timelapse To create timelapse more historical snapshots are needed. To avoid processing big file many times I though sorting it would help (note this is pretty RAM intensive operation, for Czech republic - relatively small country - it didn't work on less than 16GB RAM and ate 8GB swap as well). ``` osmium sort --verbose czech-republic-internal.osh.pbf -o czech-republic-sorted.pbf ``` however it didn't ``` osmium extract -b 16.842041,49.0288644,17.0145607,49.1162425 ./czech-republic-sorted.pbf -o zdanice_with_history.pbf [======================================================================] 100% Node ID twice in input. Maybe you are using a history or change file? This command expects the input file to be ordered: First nodes in order of ID, then ways in order of ID, then relations in order of ID. ``` so I wrote perl script to create ways from historical country dump ``` #! /usr/bin/perl -W use strict; use warnings; sub cut_data() { my ($date) = @_; system('osmium time-filter czech-republic-internal.osh.pbf ' . $date . '-01T00:00:00Z -o ' . $date . '_CZ_full.pbf'); system('osmium extract -b 16.842041,49.0288644,17.0145607,49.1162425 ' . $date . '_CZ_full.pbf -o zdanice_' . $date . '.pbf'); system('rm ' . $date . '_CZ_full.pbf'); system('osmium tags-filter zdanice_' . $date . '.pbf w/highway=track,path -o zdanice_cesty_' . $date . '.pbf'); system('rm zdanice_' . $date . '.pbf'); } &cut_data('2019-03'); &cut_data('2019-05'); &cut_data('2019-07'); &cut_data('2019-09'); &cut_data('2019-11'); &cut_data('2020-01'); &cut_data('2020-03'); &cut_data('2020-05'); &cut_data('2020-07'); ``` this produced point-at-time files with paths and tracks only ``` ls | grep pbf zdanice_cesty_2019-03.pbf zdanice_cesty_2019-05.pbf zdanice_cesty_2019-07.pbf zdanice_cesty_2019-09.pbf zdanice_cesty_2019-11.pbf zdanice_cesty_2020-01.pbf zdanice_cesty_2020-03.pbf zdanice_cesty_2020-05.pbf zdanice_cesty_2020-07.pbf ``` In Maperitive make png for each of them (we already have latest and Jan 2019 from earlier on) by simply turning on/off layers and export (CTRL+E). ``` ls | grep png 2019_01.png 2019_03.png 2019_05.png 2019_07.png 2019_09.png 2019_11.png 2020_01.png 2020_03.png 2020_05.png 2020_07.png 2020_latest.png ``` To make a movie I used imagemagick's utility convert ``` convert -delay 100 -quality 100 *.png timelapse.mp4 ``` which produced video below, each frame is one second. https://tube.tchncs.de/videos/watch/b32b0f29-aadc-48d3-8e65-ee4d5b2a8226

    Import from clipboard

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lost their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template is not available.
    All
    • All
    • Team
    No template found.

    Create a template

    Delete template

    Do you really want to delete this template?

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in via Google

    New to HackMD? Sign up

    Help

    Documents

    Tutorials
    YAML Metadata
    Slide Example
    Book Example

    Contacts

    Talk to us
    Report an issue
    Send us email

    Cheatsheet

    Example Syntax
    Header # Header
    • Unordered List
    - Unordered List
    1. Ordered List
    1. Ordered List
    • Todo List
    - [ ] Todo List
    Blockquote
    > Blockquote
    Bold font **Bold font**
    Italics font *Italics font*
    Strikethrough ~~Strikethrough~~
    19th 19^th^
    H2O H~2~O
    Inserted text ++Inserted text++
    Marked text ==Marked text==
    Link [link text](https:// "title")
    Image ![image alt](https:// "title")
    Code `Code`
    var i = 0;
    ```javascript
    var i = 0;
    ```
    :smile: :smile:
    Externals {%youtube youtube_id %}
    LaTeX $L^aT_eX$

    This is a alert area.

    :::info
    This is a alert area.
    :::

    Versions

    Versions and GitHub Sync

    Sign in to link this note to GitHub Learn more
    This note is not linked with GitHub Learn more
     
    Add badge Pull Push GitHub Link Settings

    Version named by    

    More Less
    • Edit
    • Delete

    Note content is identical to the latest version.
    Compare with
      Choose a version
      No search result
      Version not found

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub

        Please sign in to GitHub and install the HackMD app on your GitHub repo. Learn more

         Sign in to GitHub

        HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully