-
Notifications
You must be signed in to change notification settings - Fork 4
openstreetmap carto
Steffen Exler edited this page Aug 5, 2020
·
1 revision
The openstreetmap-carto project is the official repo for the style sheets of OpenStreetMap.org.
For this project there is a fork of openstreetmap-carto, which can handle the time request on Postgres SQL. The fork is hosted on github.com.
The difference between the fork version and the original is the file /project.mml
.
For each request is a WHERE
clause added, which check in the columns valid_since
& valid_until
if the request is for the current date. The data parameter is added
by {{ date.strftime('%Y-%m-%d') }}
and will be converted in a python script
with jinja2 into the requested date. Below, we depict an example of modified clause.::
(SELECT
valid_since,
valid_until,
way
FROM planet_osm_line
WHERE valid_since <= '{{ date.strftime('%Y-%m-%d') }}'
AND valid_until >= '{{ date.strftime('%Y-%m-%d') }}'
AND (man_made = 'cutline')
) AS landcover_line