Overv / openstreetmap-tile-server

Docker file for a minimal effort OpenStreetMap tile server
Apache License 2.0
1.2k stars 482 forks source link

How to change map style #351

Open devopsnot opened 1 year ago

devopsnot commented 1 year ago

I am currently using the default map style, 'carto', I would like to be adding the embossed style.

Is it possible to use two different styles on the same server?

I use the following docker compose to be running my server;

######################## nominatim: container_name: nominatim image: mediagis/nominatim:4.2 restart: always networks: nominatim: aliases:

Istador commented 1 year ago

Theoretically that'd be possible.

The simplest solution would be to just run them as two separte docker containers that have nothing to do with each other (just define overv/openstreetmap-tile-server as a second service in the docker-compose.yml).

But that would be - depending on the size of the region - a big resource wasting on the server, because both would have their own copy of the database, requiring double disk space, memory and CPU time.


You could change both images to not host their database themselves, but to host postgresql in a third container that both access (or configuring one of them to access the other one).

The question for if this is possible, is what is imported into the database exactly. Does the import of this style contain all the data that the other need or vice versa. The import is also doing some custom imports/steps additional to the plain PBF import. You'd need to find a way to import the PBF in a way that is compatible with both styles (or even modify one of the styles slightly if there are incompatibilities) and do all additional imports/steps needed for both styles.

(For understanding: when importing the PBF into the postgres database, it uses information from the style in use to import only required data and/or even rename columns/tables to create a database structure that the style expects and benefits from.)