Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recreate tiles with new mapnik.xml file #42

Closed
MichalPopieluch opened this issue Jul 4, 2019 · 2 comments
Closed

Recreate tiles with new mapnik.xml file #42

MichalPopieluch opened this issue Jul 4, 2019 · 2 comments

Comments

@MichalPopieluch
Copy link

Hey,

I am trying to create tiles with my own style. I've created mapnik.xml file and replaced the old one in /home/renderer/src/openstreetmap-carto/mapnik.xml. Next, I've restart container and enter to http:/[host]/0/0/0.png website and... nothing happened.

So I've tried to run renderd script (from /home/renderer/src/mod_tile) and run.sh file, but with no results.

Could you tell tell how can I reproduce tiles with new mapnik.xml file?

Thanks in advance
Michal

@Istador
Copy link
Contributor

Istador commented Jul 4, 2019

What do you mean by

and... nothing happened

Did you get an image with the old style or did you get no image at all?


Exchanging the XML file and restarting the container does work in my experience.

But if the server already existed and worked before, then it still holds the tiles (image files) generated with the old style. The tiles cache needs to either be deleted (e.g. with rm -rf . in the tiles directory), (force) re-rendered, or expired (aka. re-render after the next client access) to use the new style.


Which renderd / mod_tile script did you run exactly and with which arguments?
render_expired?
render_list?
(render_list_geo.pl?)


Did you manually edited the mapnik.xml or did you compiled it with carto or another tool?

Before I knew about carto I started manually editing the default XML file, to create my own style. I changed it a few times because of changing requirements / wishes from the product owner(s).

Sometimes I made mistakes editing it, so it's important to monitor the logs at startup of the container (e.g. for invalid XML syntax or invalid semantic) and while rendering (e.g. invalid database queries), because there might be errors preventing it from re-rendering tiles, resulting in serving old cached tiles or an http error code.

(Tip: it's a good idea not to deploy new styles directly to the productive tile server, but to test them out on a little test tile server serving only a small region).

[Edit: I also tried out other Mapnik XML styles than openstreetmap-carto at some point, but often had errors with them because they might have different runtime requirements (e.g. fonts) and might need other data inside the postgres database].

@singhyadvendra
Copy link

@MichalPopieluch you can run "docker logs container_id" or "sudo docker logs container_id" to see the errors in rendering

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants