NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Why do I need to specify the style when importing data to postgis? How should that work with multiple styles?

The slightly longer version:

I'd like to setup mapnik, so that it supports multiple styles.

So far I have managed to get a tile server set up by following the instructions for Ubuntu 18.04 on (and working around a couple of problems while doing that).

Having done that I want to add another style(osm-bright), but when I look at the installation instructions of the "original" style then I see that I would have needed to specify that style already when importing the data to postgis:

osm2pgsql -d gis ~/path/to/data.osm.pbf --style --tag-transform-script openstreetmap-carto.lua

Why does the style influence the database? How can I get multiple style to work? (Like at the german site where I can switch between styles on the right.)

asked 15 Jul '18, 15:19

anuranpal's gravatar image

accept rate: 0%

edited 15 Jul '18, 15:30

Different visual styles are written against different database schemas.

The osm2pgsql style file transforms OSM data into a particular database schema. Reading through is a good enough way to see what it is doing. is loading tiles from multiple servers, it is not rendering all the styles available.

permanent link

answered 15 Jul '18, 16:30

maxerickson's gravatar image

accept rate: 32%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 15 Jul '18, 15:19

question was seen: 3,296 times

last updated: 15 Jul '18, 16:30

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum