Itâs not really related to toll gantries, but here goes anyway
- as a non-root user on a Linux machine such as Ubuntu 24.04 or Debian 12:
cd
mkdir src
cd src
git clone https://github.com/SomeoneElseOSM/SomeoneElse-style
git clone https://github.com/SomeoneElseOSM/SomeoneElse-vector-extract
git clone https://github.com/SomeoneElseOSM/SomeoneElse-vector-web-display
git clone https://github.com/systemed/mod_mbtiles
git clone https://github.com/systemed/tilemaker
Install some useful software:
sudo apt install screen git tar unzip wget bzip2 apache2 socat net-tools curl
Install mod_mbtiles to allow Apache to server .mbtiles from one big file:
cd mod_mbtiles
sudo apxs -lsqlite3 -i -a -c mod_mbtiles.c
sudo systemctl restart apache2
mkdir ~/data
Install software needed to build tilemaker:
sudo apt install build-essential libboost-dev libboost-filesystem-dev libboost-iostreams-dev libboost-program-options-dev libboost-system-dev liblua5.1-0-dev libshp-dev libsqlite3-dev rapidjson-dev zlib1g-dev
cd ~/src/tilemaker
make
sudo make install
(note what âLua language versionâ is shown here - you will need that later)
If weâre just installing into the default Apache config, then edit â000-default.confâ to add:
MbtilesEnabled true
below âDocumentRootâ
cd ~/src/SomeoneElse-vector-extract/
sudo cp update_vector.sh /usr/local/sbin/
sudo nano /usr/local/sbin/update_vector.sh
(replacing nano with your preferred editor)
In there:
-
change:
local_filesystem_user=ajtown
to whatever local user account you are using.
-
Use the lua version you noted down above in place of 5.3 in lines referring to âshare/luaâ
-
Change â-27.57,34.5,40.17,71.64â to a bounding box that covers your country.
-
Change âeurope britain-and-irelandâ to the path to your desired area as navigated to at https://download.geofabrik.de/ .
-
Change âhttp://map.atownsend.org.ukâ and âhttps://map.atownsend.org.ukâ throughout to something that matches the name or address of the machine to serve things from. It can be https if you have a valid https certificate. For testing, a web server on an IP address will work, perhaps something like âhttp://192.168.1.113â.
-
Change â/etc/apache2/sites-available/000-default.confâ to whatever is the active apache config.
Then run:
sudo /usr/local/sbin/update_vector.sh
If that works it should say Filled the tileset with good things at ...
. If it fails try and understand why.
If it works, browse to your site. If it was just e.g âhttp://192.168.1.113/â then initially go there to see an âit worksâ page. Then go to âhttp://192.168.1.113/vector/â - if directory listing is enabled, you should see lots of files including index_svwd01.html
.
Next, browse to e.g. âhttp://192.168.1.113/vector/index_svwd01.htmlâ
You will need to zoom out, manually move the map to the area than you generated tiles for, and zoom in. The grid squares and the URL should help you do do this.
To turn off the debug and the grid squares edit index_svwd01.html
and comment out the six lines below the comment âComment the following lines out to remove debug UIâ
One more thing is that if you need coastline, thatâs an extra step to create (documented at tilemaker) and youâll want to replace ânocoastâ in your âupdate_vector.shâ script with the path to that coastline .mbtiles.