Hi, I’m unfamiliar with After Effects, but hopefully I can point you in the right direction. Are you referring to the GEOlayers 3 plugin and MapTiler’s GEOlayers licensing? All the tutorials I found focused on raster tiles, but MapTiler does seem to suggest that they support custom styles, so hopefully they do support vector tiles. If so, you could upload a variation of one of our official stylesheets that filters all the layers based on the start_date
and end_date
properties.
Since you’ve already gone through the trouble of downloading the planet, Osmium is normally a fine tool to use, but its tag processing is a bit primitive. First, if you only care about international borders, add a filter for admin_level=2
.
As for the dates, note that in our data model, a version of a boundary that exists from 1900 to 2000 will only be recorded in the database as a single boundary relation, not 100 boundary relations. To get the boundaries in 1938, you’ll need to filter for start_date=*
that’s less than or equal to 1938 and end_date=*
that’s greater than or equal to 1938. The osmium
command line tool doesn’t have a built-in operator for inequalities or regular expressions. If you’re comfortable with Python, Node.js, or C++, there are Osmium libraries for those languages that would enable you to do date comparisons.
The Overpass API is fine for this purpose. This OverpassQL query returns all the international borders in 1938:
relation["boundary"="administrative"]["admin_level"="2"]["start_date"](if:
t["start_date"] < "1939" &&
(!is_tag("end_date") || t["end_date"] >= "1938"));
out geom;
If you ever find yourself needing more than just the international boundaries at a given time, QLever would fare better than the Overpass API with that greater volume of data. Here’s a SPARQL query based on this documented example that returns all the international borders in 1938:
PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:>
PREFIX osm2rdfkey: <https://osm2rdf.cs.uni-freiburg.de/rdf/key#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
SELECT ?boundary ?name ?start_date ?end_date ?geometry WHERE {
?boundary osmkey:boundary "administrative" .
?boundary osmkey:admin_level "2"^^xsd:int .
?boundary osm2rdfkey:start_date ?start_date .
?boundary osmkey:name ?name .
?boundary geo:hasGeometry/geo:asWKT ?geometry .
OPTIONAL {
?boundary osm2rdfkey:end_date ?end_date .
}
FILTER(YEAR(?start_date) < 1939 && COALESCE(YEAR(?end_date), 9999) >= 1938)
}
After running this query, click the “Map view” button and then “Export as GeoJSON” to get the geometries in a format that QGIS can handle. This query includes intrayear boundary changes, so there may be some overlapping geometries.
Depending on your needs, this tutorial might also be relevant. It focuses on pulling in a vector basemap from Mapbox, but that shouldn’t be necessary because we already provide a freely usable vector tileset.