CINXE.COM
2hu4u's Diary | OSM Progress timelapse videos with QGIS and Ohsome API | OpenStreetMap
<!DOCTYPE html> <html lang="en" dir="ltr"> <head data-locale="en" data-preferred-editor="id" data-preferred-languages="[]"> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <script src="/assets/es6-cc19e63b7a2e5f3f8c46ccc37c11ad86296fc884065d87953d54ce1ea036b383.js"></script> <script src="/assets/turbo-130bc04eb27728ef810e643ee13c633b1f3d40f94e3008b768da944d51362570.js" type="module"></script> <script src="/assets/application-bc84c5afd71743fd58bca7e8076cacd389274f5fd5c7fd9a719aa267738315b0.js"></script> <script src="/assets/i18n/en-d5230800fcd121573166ba17d5bd19a3c85ef44bf73681078ab732a3b8848a69.js"></script> <link rel="stylesheet" href="/assets/screen-auto-ltr-70b9ec9d24ed4c62cc921a7b9274378a99261bd15c17ea4db141540768861834.css" media="screen" /> <link rel="stylesheet" href="/assets/print-ltr-2b3d6571f8a48820d650d5ce29f567269af78d5158f89ecab755db8c5d3d62db.css" media="print" /> <link rel="stylesheet" href="/assets/leaflet-all-7224da9b323ba8c997b953386cd9f33bfe5f0860fab29e9e4c12b71f369b9dc9.css" media="screen, print" /> <link rel="icon" type="image/x-icon" href="/assets/favicon-042c50e8224a5c999369ec96f5367cb5b14db4671f1485caeec1277481073093.ico" /> <link rel="apple-touch-icon" type="image/png" href="/assets/apple-touch-icon-57x57-0af2b52ac2b1a8cb0aba42f17aa901bfdedb9174bd978f838e3b3e1dd8602f52.png" sizes="57x57" /> <link rel="apple-touch-icon" type="image/png" href="/assets/apple-touch-icon-60x60-cff74c9066d8e7fd08b29407712edbae5613cc9a4c03ee0398a89502a6a41d1f.png" sizes="60x60" /> <link rel="apple-touch-icon" type="image/png" href="/assets/apple-touch-icon-72x72-63c6fdf3ddf65feebac1c0441bf6a378d1e4bde7107f598ae86733c402895eae.png" sizes="72x72" /> <link rel="apple-touch-icon" type="image/png" href="/assets/apple-touch-icon-76x76-1740d6e7a59521693c496dd8fbe1caf3d5ad302017cb0f5073b6914b4f5b7544.png" sizes="76x76" /> <link rel="apple-touch-icon" type="image/png" href="/assets/apple-touch-icon-114x114-20ba9df1a8f9b341040d661b7942b7b10288b9b4c4ce0663e10018958dc7f4a8.png" sizes="114x114" /> <link rel="apple-touch-icon" type="image/png" href="/assets/apple-touch-icon-120x120-c304991e604d1be82639709b96fb87f7b6b6688cc0d04d5f6141604259299648.png" sizes="120x120" /> <link rel="apple-touch-icon" type="image/png" href="/assets/apple-touch-icon-144x144-fbf20bdf9d2f7c1fe8eb85d7869a9bda285be88c93a39438150f5eb5955758ce.png" sizes="144x144" /> <link rel="apple-touch-icon" type="image/png" href="/assets/apple-touch-icon-152x152-af45dc979e972cab863517b2cb33a3dcf3e04e02a2eb2734c6f93edc21fa395d.png" sizes="152x152" /> <link rel="apple-touch-icon" type="image/png" href="/assets/apple-touch-icon-180x180-ea6361d7ae5b3f08c6290652ad703fa239364cc09c84873044f3299845f24652.png" sizes="180x180" /> <link rel="icon" type="image/png" href="/assets/favicon-32x32-99b88fcadeef736889823c8a886b89d8cada9d4423a49a27de29bacc0a6bebd1.png" sizes="32x32" /> <link rel="icon" type="image/png" href="/assets/favicon-194x194-79d3fb0152c735866e64b1d7535d504483cd13c2fad0131a6142bd9629d30de2.png" sizes="194x194" /> <link rel="icon" type="image/png" href="/assets/favicon-96x96-6ffbc38962fddb870f9577b76430a0ee4db5fb4eca485f850cd45436d7f3eb87.png" sizes="96x96" /> <link rel="icon" type="image/png" href="/assets/android-chrome-192x192-f970b9be3965dfda6ea9481b305c39b2ec794e296f802235e30d4671f0f896e1.png" sizes="192x192" /> <link rel="icon" type="image/png" href="/assets/favicon-16x16-474476c1b2381628a81361a9e2bf04b936d21f77c59e84b48c6c69ea376fb6cf.png" sizes="16x16" /> <link rel="mask-icon" href="/assets/tab-icon-3e700a12d38a1bba06d674ed663824232025cd6b0ca5c439c846740a7468b302.svg" color="#7ebc6f"> <link rel="manifest" href="/assets/manifest-b2cc1407226d3e16e6149425747239c259fbe44b41bff3aca36ca6d9e56a6e18.json"> <meta name="msapplication-config" content="/assets/browserconfig-c59184dc0264731151cbf50ae58f7fa8ae5153138013f125203e1193800f862f.xml"> <meta name="msapplication-TileColor" content="#00a300"> <meta name="msapplication-TileImage" content="/assets/mstile-144x144-02723f6f7cb2c18e6f8041c93f80982decb52b24a7e447477bc2ce3136d75806.png"> <meta name="theme-color" content="#ffffff"> <meta name="turbo-refresh-method" content="morph"> <meta name="turbo-refresh-scroll" content="preserve"> <link href="https://www.openstreetmap.org/user/2hu4u/diary/405565" rel="canonical" /> <link rel="search" type="application/opensearchdescription+xml" title="OpenStreetMap Search" href="/assets/osm-42b7b3fbcee2193e455a773db6cd3d34a2f48ca94547fed54901dd9d8307b02b.xml"> <meta name="description" content="OpenStreetMap is the free wiki world map."> <meta property="og:site_name" content="OpenStreetMap"> <meta property="og:title" content="OSM Progress timelapse videos with QGIS and Ohsome API"> <meta property="og:type" content="website"> <meta property="og:url" content="https://www.openstreetmap.org/user/2hu4u/diary/405565"> <meta property="og:description" content="https://www.youtube.com/watch?v=xUkLQj29vE4"> <meta property="og:image" content="https://i.imgur.com/9oXBbJB.png"> <meta property="og:image:alt" content="Blue mountains before I started mapping"> <meta property="article:published_time" content="2024-11-13T05:19:25Z"> <link rel="alternate" type="application/rss+xml" title="RSS" href="https://www.openstreetmap.org/user/2hu4u/diary/rss" /> <meta name="csrf-param" content="authenticity_token" /> <meta name="csrf-token" content="pAvF4Ejm08ottvK9NqaP78SqHi9A-snyPzrmhklMcMD5Uom1dcBG1zPEry6me-QI2qxr_mC4gsT9sesExq370A" /> <meta name="csp-nonce" content="rO0tsIFQg7Ig3ZkIGm9iH1/ceiJFThaM" /> <title>2hu4u's Diary | OSM Progress timelapse videos with QGIS and Ohsome API | OpenStreetMap</title> </head> <body class="diary_entries diary_entries-show"> <header class="d-flex bg-body text-nowrap closed z-3"> <h1 class="d-flex m-0 fw-semibold"> <a href="/" class="icon-link gap-1 text-body-emphasis text-decoration-none geolink"> <img alt="OpenStreetMap logo" src="/assets/osm_logo-4b074077c29e100f40ee64f5177886e36b570d4cc3ab10c7b263003d09642e3f.svg" width="30" height="30" /> OpenStreetMap </a> </h1> <a href="#" id="menu-icon"></a> <nav class='primary'> <div id="edit_tab" class="btn-group"> <a class="btn btn-outline-primary geolink editlink" id="editanchor" data-editor="id" href="/edit">Edit</a> <button class='btn btn-outline-primary dropdown-toggle dropdown-toggle-split flex-grow-0' type='button' data-bs-toggle='dropdown'></button> <ul class='dropdown-menu'> <li> <a data-editor="id" class="geolink editlink dropdown-item" href="/edit?editor=id">Edit with iD (in-browser editor)</a> </li> <li> <a data-editor="remote" class="geolink editlink dropdown-item" href="/edit?editor=remote">Edit with Remote Control (JOSM, Potlatch, Merkaartor)</a> </li> </ul> </div> </nav> <nav class='secondary d-flex gap-2 align-items-center'> <ul class='nav flex-nowrap'> <li class="compact-hide nav-item"> <a class="nav-link text-secondary" href="/history">History</a> </li> <li class="compact-hide nav-item"> <a class="nav-link text-secondary" href="/export">Export</a> </li> <li class="compact-hide nav-item"> <a class="nav-link text-secondary" href="/traces">GPS Traces</a> </li> <li class="compact-hide nav-item"> <a class="nav-link text-secondary" href="/diary">User Diaries</a> </li> <li class="compact-hide nav-item"> <a class="nav-link text-secondary" href="/communities">Communities</a> </li> <li class="compact-hide nav-item"> <a class="nav-link text-secondary" href="/copyright">Copyright</a> </li> <li class="compact-hide nav-item"> <a class="nav-link text-secondary" href="/help">Help</a> </li> <li class="compact-hide nav-item"> <a class="nav-link text-secondary" href="/about">About</a> </li> <li id="compact-secondary-nav" class="dropdown nav-item"> <button class="dropdown-toggle nav-link btn btn-outline-secondary border-0 bg-body text-secondary" type="button" data-bs-toggle="dropdown">More</button> <ul class="dropdown-menu"> <li><a class="dropdown-item" href="/history">History</a></li> <li><a class="dropdown-item" href="/export">Export</a></li> <li><a class="dropdown-item" href="/traces">GPS Traces</a></li> <li><a class="dropdown-item" href="/diary">User Diaries</a></li> <li><a class="dropdown-item" href="/communities">Communities</a></li> <li><a class="dropdown-item" href="/copyright">Copyright</a></li> <li><a class="dropdown-item" href="/help">Help</a></li> <li><a class="dropdown-item" href="/about">About</a></li> </ul> </li> </ul> <div class="d-inline-flex btn-group login-menu" role=""> <a class="geolink btn btn-outline-secondary" href="/login?referer=%2Fuser%2F2hu4u%2Fdiary%2F405565">Log In</a> <a class="btn btn-outline-secondary" href="/user/new">Sign Up</a> </div> </nav> </header> <div id="content" class=""> <div class="content-heading bg-body-secondary border-bottom border-secondary-subtle"> <div class="content-inner "> <div class="row"> <div class="col-sm-auto"> <img class="user_image border border-secondary-subtle bg-body" alt="" width="100" height="100" src="https://www.openstreetmap.org/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzU3MjI1LCJwdXIiOiJibG9iX2lkIn19--ee6517d838f4eb30ed32c34252edf85615f16049/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOlsxMDAsMTAwXX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--71e417a328c02e35ec87b6c7cd4e4524c74e4ec8/dpsmall.jpg" /> </div> <div class="col"> <h1><a href="/user/2hu4u/diary">2hu4u's Diary</a></h1> <p><a href="/user/2hu4u/diary/rss"><img class="align-text-bottom" src="/assets/RSS-3e2f4eddf1fa4751b43493728dbc559c766daf848ccbda961627ca36e39dfe88.png" width="16" height="16" /></a></p> </div> </div> </div> </div> <div class="content-body"> <div class="content-inner"> <article class='diary_post border-top border-secondary-subtle py-3 user_11484057'> <div class='mb-3'> <h2><a href="/user/2hu4u/diary/405565">OSM Progress timelapse videos with QGIS and Ohsome API</a></h2> <small class='text-body-secondary'> Posted by <a href="/user/2hu4u">2hu4u</a> on 13 November 2024 in <a href="/diary/en">English</a>. </small> </div> <div class="richtext text-break" xml:lang="en" lang="en"> <h2 id="finished-result">Finished result:</h2> <p><a href="https://www.youtube.com/watch?v=xUkLQj29vE4" rel="nofollow noopener noreferrer">https://www.youtube.com/watch?v=xUkLQj29vE4</a></p> <h1 id="preamble">Preamble</h1> <p>I have been interested in making “before and after” comparisons of mapping progress for a while. The rich and beautiful OSM-carto style as it appears in standard OSM is a particularly important element of what I wanted to achieve, but it remains quite difficult to render historical map data in this style.</p> <p>This guide mostly follows the <a href="https://giscienceblog.uni-heidelberg.de/2018/12/14/how-to-become-ohsome-part-1-visualizing-the-historical-evolution-of-osm-buildings-of-your-city/" rel="nofollow noopener noreferrer">ohsome guide</a> from 2018 but taken further and with updates. Please be aware that I have done little to optimise the workflow so far; this is more of a proof-of-concept at the moment.</p> <p>I started out mapping in August 2020 and mapped almost exclusively in my old hometown whilst I was stuck there during COVID. I spent a lot of time mapping this area very comprehensively and wanted to visualise my work. Big shoutout to user John Bek who greatly helped with building tracing, which is quite tedious. The Blue Mountains towns of Katoomba, Leura and Wentworth Falls featured are now some of the most comprehensively mapped in Australia.</p> <h2 id="previous-method">Previous method</h2> <p>The most genuine way of rendering historical tiles is from the planet file. I previously tried running an OSM tile server in docker with data extracted from the pbf file downloaded from geofabrik. In windows I installed docker in an ubuntu VM and then installed the <a href="https://github.com/Overv/openstreetmap-tile-server" rel="nofollow noopener noreferrer">“minimal effort” tile server</a> following the github instructions. After a lot of messing around, I was able to generate tiles for a particular moment in time: <img src="https://i.imgur.com/9oXBbJB.png" alt="Blue mountains before I started mapping"> I think the way the pbf was spliced made the large <code>natural=wood</code> relations disappear, so elements are missing unless I generated tiles for a much wider area. Either way a lot of effort, and I never figured out how to procedurally generate tiles at different timesteps.</p> <h1 id="new-method">New method</h1> <h2 id="software-requirement">Software requirement</h2> <ul> <li>Internet browser (I hope you have this already)</li> <li>QGIS (version must be 3.14 or newer)</li> <li>ffmpeg</li> </ul> <h2 id="get-the-data">Get the data</h2> <p>I have been using ohsome visualisation tools for a while, but only quite recently I became aware of the ohsome API endpoint for Full History extraction of a region of interest. The first step is to get the bounding box coordinates of your area of interest. Tip: in OSM, the url is formatted like this:</p> <p><code>https://www.openstreetmap.org/#map=19/{y}/{x}</code></p> <p>where <code>{y}</code> is the latitude in [-90,90] and <code>{x}</code> is the longitude [-180,180] Note down the lat/lon pairs <i>x₁</i>,<i>y₁</i> for the northwest corner and <i>x₂</i>,<i>y₂</i> for the southeast corner.</p> <p>Now you can construct the API GET request. Amend the following example as necessary and paste it into your browser URL bar. The <code>bboxes</code> parameter is structured like <code>bboxes={x_1},{y_1},{x_2},{y_2}</code> as below.</p> <pre><code>https://api.ohsome.org/v1/elementsFullHistory/geometry ?bboxes=150.298548,-33.679397,150.391572,-33.743226 &keys=highway &properties=tags,metadata &showMetadata=false &time=2008-01-01,2024-11-01 &types=way </code></pre> <p>I have split up the request by querystring parameter for readability. Change <code>bboxes</code>, <code>keys</code>, <code>time</code> and <code>types</code>.</p> <p>You’ll now want to repeat this step using the following combinations:</p> <table rules="groups" class="table table-sm w-auto"> <thead> <tr> <th class="text-start">Key</th> <th class="text-center">Way</th> <th class="text-end">Relation</th> <th class="text-end">Vector geometry</th> </tr> </thead> <tbody> <tr> <td class="text-start"><code>highway</code></td> <td class="text-center">Yes</td> <td class="text-end">No</td> <td class="text-end">Linestring</td> </tr> <tr> <td class="text-start"><code>waterway</code></td> <td class="text-center">Yes</td> <td class="text-end">No</td> <td class="text-end">Linestring</td> </tr> <tr> <td class="text-start"><code>railway</code></td> <td class="text-center">Yes</td> <td class="text-end">No</td> <td class="text-end">Linestring</td> </tr> </tbody> <tbody> <tr> <td class="text-start"><code>building</code></td> <td class="text-center">Yes</td> <td class="text-end">Yes</td> <td class="text-end">Polygon</td> </tr> <tr> <td class="text-start"><code>landuse</code></td> <td class="text-center">Yes</td> <td class="text-end">Yes</td> <td class="text-end">Polygon</td> </tr> <tr> <td class="text-start"><code>natural</code></td> <td class="text-center">Yes</td> <td class="text-end">Yes</td> <td class="text-end">Polygon and Linestring</td> </tr> <tr> <td class="text-start"><code>amenity</code></td> <td class="text-center">Yes</td> <td class="text-end">Yes</td> <td class="text-end">Polygon</td> </tr> <tr> <td class="text-start"><code>leisure</code></td> <td class="text-center">Yes</td> <td class="text-end">Yes</td> <td class="text-end">Polygon</td> </tr> </tbody> </table> <p>These categories should cover the vast majority of what you can see rendered in OSM-carto. You might want to also download <code>power</code> as linestring for power lines, etc.</p> <p>You will get 13 GeoJSON files out of this; you can simply drag them into QGIS. Note that when downloading <code>type=way</code> geometry, in QGIS you will be given a choice of what geometry type to use as a vector layer. For instance, <code>natural=*</code> ways may be either a polygon (area) such as in <code>natural=wood</code> or Linestring such as in <code>natural=cliff</code>. I recommend you import them both separately if required. You should also download relation areas (multipolygons) for common area types according to the table. Conveniently, ohsome API will also clip large relations to the bbox that you chose. Altogether you will probably have 14 vector layers.</p> <h2 id="styling-in-qgis">Styling in QGIS</h2> <p>The most time-consuming part is styling everything to look like it does on OSM. I suggest adding OpenStreetMap as a layer on top so you can colour-sample directly. Start by setting your QGIS project canvas colour to the OSM blank land colour #F2EFE9 (Project > Properties… (Ctrl + Shift + P) > General > Background Colour).</p> <h3 id="highways">Highways</h3> <p>After importing your GeoJSONs into QGIS, you can open the Layer Properties and go to the Symbology tab. Set the type to Categorized, set the filter to your key (eg. <code>highway</code>) and click Classify.</p> <p>At this point, you’ll probably get a bunch of junk mixed in with the common highway types. Just delete the ones you don’t want. Then change Categorized to “Rule based”. You don’t really need to do that many modifications here, just a few like discriminating service roads from driveways and parking aisles etc. I didn’t bother with the more subtle stuff like <code>tracktype</code>, <code>surface</code> and <code>access</code> etc.</p> <p><img src="https://i.imgur.com/UOT3Y2B.png" alt="Highway symbology"></p> <p>You now want to decide on a zoom level to encompass all your data, and consider the resolution of your final animation (I recommend 1080 x 1920). My map scale for the animation is 1:16255, which is between zoom level 15 and 16, I picked that just arbitrarily.</p> <p><img src="https://i.imgur.com/dtbzmN1.png" alt="Trunk symbology"></p> <p>OSM roads are composed of an inner stroke and an outer stroke. You can symbolise this with two lines, one slightly thicker than the other. For mine, major roads were set to 1.8mm and 2.0mm for the thin and thick lines.</p> <p><img src="https://i.imgur.com/Xqh8fJF.png" alt="Residential"></p> <p>Minor roads such as <code>link</code>s, <code>residential</code>, <code>unclassified</code> etc should be thinner. I used 1.3mm and 1.5mm. For all cases, make sure you set the Join and Cap style to “Round”.</p> <p>If you want to be able to render your map at multiple zoom levels, you’ll need to adjust the thicknesses for each zoom level and enable Scale range such as below, according to <a href="https://gis.stackexchange.com/questions/7430/what-ratio-scales-do-google-maps-zoom-levels-correspond-to" rel="nofollow noopener noreferrer">this guide</a>. This will be quite time consuming.</p> <p><img src="https://i.imgur.com/nXj4l0U.png" alt="Scale range"></p> <p>After you’ve finished copying all the colours, you’ll want to set the rendering order. Click “Symbol Order…” button and set the order as below;</p> <p><img src="https://i.imgur.com/J05dUcH.png" alt="Symbol order"></p> <p>The aim is to have the thick, dark outer stroke to level 0 and the thin, lighter stroke to higher numbers according to the road classification.</p> <p>Finally, in the Temporal property tab, enable Dynamic Temporal Control and set the Limits to “include start, include end” and set the Start field to <code>@validFrom</code> and the End field to <code>@validTo</code>. Note that this is a fairly new feature in QGIS and performs much better in my experience than the plugins that the original ohsome blog post used.</p> <p>You can now check if everything is working by opening the Temporal Controller Panel (clock icon) in one of the toolbars up the top of the QGIS main UI. Try scrubbing through the timeline and see how the data changes.</p> <p><img src="https://i.imgur.com/RQXuitu.png" alt="Temporal controller"></p> <p>I ended up turning driveways and parking aisles off because they encumbered the map too much at my zoom level.</p> <h3 id="other-stuff">Other stuff</h3> <p>This is what my Leisure non-relation polygons look like. These are the only categories I kept.</p> <p><img src="https://i.imgur.com/X4PfS9p.png" alt="Leisure"></p> <p>Most of them are fairly straightforward, however some things like <code>leisure=natural_reserve</code> are less intuitive and also drawn above everything else, so you may want to separate it into its own layer.</p> <p><img src="https://i.imgur.com/WGJP5Bt.png" alt="Nature reserve"></p> <p>To get the green stroke that is only inside the polygon, I set the effect “Inner glow” with zero blur radius. Make sure you uncheck “Source” otherwise the inner part won’t be transparent. I set it to #B6DEB6 and slightly transparent just by estimating it, I’m sure you could probably figure out the actual correct colour from OSM-carto repository but this will do for now.</p> <p>Here are my settings for <code>leisure=garden</code>.</p> <p><img src="https://i.imgur.com/imnQujt.png" alt="Garden"></p> <p>Some other interesting ones are <code>natural=cliff</code>;</p> <p><img src="https://i.imgur.com/FTo0zS4.png" alt="Cliff"></p> <p><code>wetland=marsh</code>;</p> <p><img src="https://i.imgur.com/c1H3xFs.png" alt="wetland"></p> <p>and <code>natural=scrub</code> and <code>natural=wood</code> were basically the same but with different SVG symbols that I thought were a fairly close match from what I already had installed. I didn’t really try that hard for it to be accurate because most of this stuff you can’t really see anyway.</p> <p>For waterways, I set it to rule-based where <code>intermittent=yes</code> was the only rule for the dashed line style, and then everything else was rendered the same.</p> <p>You can check this <a href="https://imgur.com/a/LegZHnE" rel="nofollow noopener noreferrer">imgur album</a> for other settings.</p> <p>Finally, make sure your layers are all in a sensible order. I put linestrings and nature reserve over the top of everything else. Landuse was on the bottom; amenities and leisure above that and then natural on top of those. OSM-carto has a lot of rules for this but the goal is not really an exact replication here.</p> <p>Note that I didn’t render labels or point icons, this is on purpose; I feel like it isn’t really appropriate for a timelapse video.</p> <h2 id="animating-everything">Animating everything</h2> <p>Make sure all layers have the same Temporal settings. Now in the Temporal Controller, check to make sure everything looks good. Set the Step interval to 1 month, make sure your viewport is roughly in the centre of your Area of Interest, Save the project, and now you should be ready to export the animation. Set the resolution to something sensible, I suggest 1080 x 1920. I tried 4K but my laptop struggled hard. Again, I suggest testing it with a short timespan first to make sure your settings are dialled in correctly. It should save the frames as png images in the format usually “projectname0001.png” etc.</p> <h3 id="compile-the-video-with-ffmpeg">Compile the video with ffmpeg</h3> <p>Open your terminal and change the directory to the folder with all your png frames. Here is my script below. It includes a date counter in the format <code>YYYY mm</code> in the top left corner. You can get rid of the <code>-vf</code> flag if you don’t want the counter. Make sure you change the input name to your own one.</p> <pre><code>ffmpeg -framerate 24 -i "openstreetmap timelapse%04d.png" -vf "drawbox=x=w-150:y=h-45:w=150:h=45:color=black@0.8:t=fill,drawtext=fontfile=NotoSans-Bold: text='%{eif\:2008+floor(n/12)\:d} %{eif\:(mod(n,12)+1)\:d}': fontsize=30: fontcolor=white: x=10: y=10: borderw=1: bordercolor=black" -pix_fmt yuv420p output.mp4 </code></pre> <p>The <code>drawbox</code> and <code>drawtext</code> draws a transparent background for the date counter and the text with the counter. This increments the month every frame, and the year every 12 frames, starting Jan 2008. I found that the video won’t play for some people, or in Windows media player, or upload to Reddit without adding the pixel format flag <code>-pix_fmt yuv420p</code>.</p> <h2 id="wrapping-up">Wrapping up</h2> <p>If you have trouble with any of the steps, or suggestions on how to improve the workflow or the rendering, please leave a comment. Good luck and have fun.</p> <p>Also check out the discussion on reddit <a href="https://www.reddit.com/r/openstreetmap/comments/1gpia24/16_years_of_openstreetmap_progress_timelapse/" rel="nofollow noopener noreferrer">here</a>.</p> </div> Location: <a href="/#map=14/-33.713702345946025/150.32773017883304"><abbr class="geo" title="-33.7137; 150.3277">Leura, Sydney, Blue Mountains City Council, New South Wales, 2780, Australia</abbr></a> <nav class='secondary-actions'> <ul class='clearfix'> </ul> </nav> </article> <div id="comments" class="comments mb-3 overflow-hidden"> <div class="row border-bottom border-secondary-subtle"> <h2 class="col">Discussion</h2> </div> <div class="row diary-comment border-bottom py-3"> <div class="col-auto pe-0 text-center"> <img class="user_thumbnail border border-secondary-subtle bg-body" alt="" width="50" height="50" src="https://www.openstreetmap.org/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzM5MTg0NDAsInB1ciI6ImJsb2JfaWQifX0=--a71d818a68473636bba0068f7830c176b1ddec59/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls1MCw1MF19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--dea07cf4fabdae9c56d9008d879a5332bbf580ce/tNXHm8hg_400x400.jpg" /> </div> <div class="col"> <p class="text-body-secondary m-0" id="comment58467">Comment from <a href="/user/rphyrin">rphyrin</a> on <a href="/user/2hu4u/diary/405565#comment58467">13 November 2024 at 10:01</a> </p> <div class="richtext text-break"><p>Really cool.</p> <p>I wonder if you could export and share those OSMCarto-like QGIS symbology settings so we can skip the time-consuming setup and benefit from your hard work instead 😂</p> <p><img src="https://pbs.twimg.com/media/GcQaSGJbEAAI55n?format=png&name=small" alt=""></p> </div> </div> </div> <div class="row diary-comment border-bottom py-3"> <div class="col-auto pe-0 text-center"> <img class="user_thumbnail border border-secondary-subtle bg-body" alt="" width="50" height="50" src="https://www.openstreetmap.org/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzU3MjI1LCJwdXIiOiJibG9iX2lkIn19--ee6517d838f4eb30ed32c34252edf85615f16049/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls1MCw1MF19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--dea07cf4fabdae9c56d9008d879a5332bbf580ce/dpsmall.jpg" /> </div> <div class="col"> <p class="text-body-secondary m-0" id="comment58469">Comment from <a href="/user/2hu4u">2hu4u</a> on <a href="/user/2hu4u/diary/405565#comment58469">13 November 2024 at 14:10</a> </p> <div class="richtext text-break"><p>Thanks for the comment. It was my intention to share the styles, I tried exporting the qml style and loading it onto a previous version of QGIS on a different PC but it wasn’t playing nice with me, but I didn’t troubleshoot it very hard yet so there’s a good chance I was doing something wrong, probably something simple. Will put a bit more work into getting more tags set up and fine tuning. Perhaps I’ll put it on github. Watch this space</p> </div> </div> </div> <div class="row diary-comment border-bottom py-3"> <div class="col-auto pe-0 text-center"> <img class="user_thumbnail border border-secondary-subtle bg-body" alt="" width="50" height="50" src="https://www.openstreetmap.org/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MTU4LCJwdXIiOiJibG9iX2lkIn19--550e19fa09b946600432cf96ca46d9fc6e4d8516/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls1MCw1MF19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--dea07cf4fabdae9c56d9008d879a5332bbf580ce/0651754.jpg" /> </div> <div class="col"> <p class="text-body-secondary m-0" id="comment58471">Comment from <a href="/user/PlaneMad">PlaneMad</a> on <a href="/user/2hu4u/diary/405565#comment58471">13 November 2024 at 19:27</a> </p> <div class="richtext text-break"><p>Fantastic resource, thank you for the writeup. Watching these animations for any place is fascinating and it really should be more simple for anyone to do it for their area.</p> <p>Thats is a ton of work to get the QGIS styles right, would love to also play around with the styles to try this out.</p> </div> </div> </div> <div class="row diary-comment border-bottom py-3"> <div class="col-auto pe-0 text-center"> <img class="user_thumbnail border border-secondary-subtle bg-body" alt="" width="38" height="50" src="https://www.openstreetmap.org/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6Mjc0LCJwdXIiOiJibG9iX2lkIn19--0791af8e3c851a038990fa0d874443a31993b04d/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls1MCw1MF19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--dea07cf4fabdae9c56d9008d879a5332bbf580ce/geonick2.jpg" /> </div> <div class="col"> <p class="text-body-secondary m-0" id="comment58487">Comment from <a href="/user/Geonick">Geonick</a> on <a href="/user/2hu4u/diary/405565#comment58487">17 November 2024 at 21:04</a> </p> <div class="richtext text-break"><p>Hey 2hu4u: You can share QGIS symbology using the QGIS Resource Sharing plugin <a href="https://qgis-contribution.github.io/QGIS-ResourceSharing/" rel="nofollow noopener noreferrer">https://qgis-contribution.github.io/QGIS-ResourceSharing/</a> .</p> </div> </div> </div> <div class="row diary-comment border-bottom py-3"> <div class="col-auto pe-0 text-center"> <img class="user_thumbnail border border-secondary-subtle bg-body" alt="" width="38" height="50" src="https://www.openstreetmap.org/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6Mjc0LCJwdXIiOiJibG9iX2lkIn19--0791af8e3c851a038990fa0d874443a31993b04d/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls1MCw1MF19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--dea07cf4fabdae9c56d9008d879a5332bbf580ce/geonick2.jpg" /> </div> <div class="col"> <p class="text-body-secondary m-0" id="comment58488">Comment from <a href="/user/Geonick">Geonick</a> on <a href="/user/2hu4u/diary/405565#comment58488">17 November 2024 at 21:06</a> </p> <div class="richtext text-break"><p>And regarding the time consuming styling: Soon the QGIS plugin “AIAMAS - AI-Assisted Map Styler” will also support line and area symbology. This plugin allows quick symbolization and automatically suggests fitting colors and symbols for newly loaded vector layers. Feedback welcome! <a href="https://plugins.qgis.org/plugins/AIAMAS/" rel="nofollow noopener noreferrer">https://plugins.qgis.org/plugins/AIAMAS/</a></p> </div> </div> </div> <div class="row diary-comment border-bottom py-3"> <div class="col-auto pe-0 text-center"> <img class="user_thumbnail border border-secondary-subtle bg-body" alt="" width="50" height="50" src="https://www.gravatar.com/avatar/1df835d513b1282e0edd7405d29cd8d9.jpg?s=50&d=https%3A%2F%2Fwww.openstreetmap.org%2Fassets%2Favatar_large-54d681ddaf47c4181b05dbfae378dc0201b393bbad3ff0e68143c3d5f3880ace.png" /> </div> <div class="col"> <p class="text-body-secondary m-0" id="comment58510">Comment from <a href="/user/joost%20schouppe">joost schouppe</a> on <a href="/user/2hu4u/diary/405565#comment58510">19 November 2024 at 21:42</a> </p> <div class="richtext text-break"><p>Awesome work, thanks for sharing. I did similar stuff back in 2014 with osm history data, but it was way more complex at the time. And the tools aren’t maintained anymore. And my maps aren’t online anymore it seems…<a href="https://www.openstreetmap.org/user/joost%20schouppe/diary/21826" rel="nofollow noopener noreferrer">https://www.openstreetmap.org/user/joost%20schouppe/diary/21826</a></p> </div> </div> </div> </div> <div> <h3 id="newcomment"><a href="/login?referer=%2Fuser%2F2hu4u%2Fdiary%2F405565">Log in</a> to leave a comment</h3> </div> </div> </div> </div> <noscript><p><img src="https://matomo.openstreetmap.org/matomo.php?idsite=1" class="matomo" alt="" /></p></noscript> </body></html>