In order to change style you can use Kosmtik (OSM carto tutorial Kosmtik and git). It is easy to use and it's great that it shows changes right away.
The other solution would be manual change of .mss files in ~/src/openstreetmap-carto
(most usual path). You can edit them with your favorite text editor and change every style of map. But before manually changing stuff, I would recommend that you make backup of every .mss file. Also you can use Scripts like generate_road_colours.py
and others for easier style change. And then you need to restart renderd.
I usually remove all files at /var/lib/mod_tile
-> there are generated tiles in meta file extenstion. Be aware that removal of that files will remove your previous render. Command I use is sudo rm -rf /var/lib/mod_tile/default
. You just need to check what is the name of your folder inside mod_tile (mine is default). After that you need to create XML file. Go into ~/src/openstreetmap-carto
and create XML like this carto project.mml > mapnik.xml
(Be aware that mapnik.xml can be named differently and you need to check what is your name of xml file -> it could be style.xml or something else). And after all you need to start new renderd sudo -u 'USERNAME' renderd -f -c /etc/renderd.conf
where you swap 'USERNAME' with your username. And that's it, you can refresh your map in browser and check your new style!
If there are errors at command sudo -u 'USERNAME' renderd -f -c /etc/renderd.conf
like "Socket bind failed for: /var/run/renderd/renderd.sock", you need to check if you have folder /var/run/renderd
. If you don't have it, create one and grant access to your user like this:
sudo mkdir /var/run/renderd
sudo chown 'USERNAME' /var/run/renderd
(Swap 'USERNAME' with your account username).
Also if you get an error while renderd is generating, then probably you didn't edit .mss files correctly and you need to check them. Just take your time and read errors & backup data.
answered
10 Oct '19, 08:53
LukashArts
16●1●1●3
accept rate:
0%