I have set up an instance of OSM on my computer, using this tutorial.

I also installed kosmtik and when I make changes in the styles, kosmtik does take them into account.

Now, I'd like to see my changes reflected in the tiles generated by rendered. So far I'm doing this, with no success:

1°) Stop Apache & renderd:

  • sudo /etc/init.d/renderd stop
  • sudo systemctl disable renderd
  • sudo service apache2 stop

2°) Delete the cache & re-generate my mapnik.xml file:

  • rm -Rf /var/lib/mod_tile/mymap
  • carto project.mml > mapnik.xml

3°) Start Apache & renderd

  • sudo service apache2 start
  • sudo systemctl enable renderd
  • sudo /etc/init.d/renderd start

What I am missing?


So, answer to myself: I was already doing was is needed, not sure why it was not working (I since installed some stuff and restarted the VM)...

The following steps are enough:

cd ./openstreetmap-carto
carto project.mml > mapnik.xml
rm -Rf ~/tile-cache/mod_tile/osm
sudo /etc/init.d/renderd restart
  • I suspect you'll also want to add a restart of renderd to that to make sure it's using the mapnik.xml (or maybe that's triggered by a "service restart" of apache2?). – SomeoneElse Jul 2 '18 at 13:56
  • As an example, when I don't need to do a database reload but just want to a apply a style change I run this, and when I do need to do a database reload I run this. For completeness that latter script does some special processing to use Welsh names in parts of Wales, which you likely won't need. – SomeoneElse Jul 2 '18 at 13:57
  • Oops indeed, wrong copy paste I think: I need to restart renderd, not Apache. I updated my answer, thanks. – Tim Autin Jul 3 '18 at 12:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.