This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

build tile server manually with Postgres db on a different server

0

I have set up my map tile server and have used the following components:

  1. Mod_tile
  2. osm2pgsql
  3. postgres
  4. Mapnik
  5. open street map carto

In my configuration, postgres is on a different server. when I access the /osm_tiles/0/0/0.png, I get a blank square. I think the data is not being fetched from postgres database. How do I tell my server that the postgres db is on another server? I have mentioned the configuration in the osm2pgsql/project.yaml file.

  1. Do I need to mention the db details in some other place as well?
  2. Which of tool fetches the tiles from the postgres db to be displayed?

P.s I've used this link as the setup guide.

asked 27 Feb '19, 05:28

vishy91's gravatar image

vishy91
666611
accept rate: 0%


One Answer:

2

project.yaml (in the openstreetmap-carto directory, not in the osm2pgsql directory) is the source of the style description and contains database access information, but when you run renderd it will actually access project.xml (cf. your renderd.conf which will likely point to that). Your project.xml will still contain the old database parameters. To re-generate project.xml, you have to do this:

carto -a 3.0.0 project.yaml > project.xml

answered 27 Feb '19, 10:19

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Source code available on GitHub .