I am trying to build a tile server that serves tiles of multiple styles(osm and osm-bright). I have followed this link for implementing this. But here I found that osm2pgsql query for importing .pdf file is specifing the --style argument and --tag-transform-script for importing data to postgres database.

osm2pgsql -s -C 300 -c -G --hstore --style openstreetmap-carto.style --tag- 
transform-script openstreetmap-carto.lua -d gis -H $HOSTNAME -U postgres 
[.osm or .pbf file]

So my question is that - Is it mandatory to use --style argument and --tag-transform-script osm2pgsql? If yes , what should be the alternate way for serving multiple styles?

1 Answer 1


It really depends on the style you want to render.

Without --style, the default.style for importing will be used, and the --tag-transform-script can be used, but not mandatory. I have never used it with my own Mapnik style.

See https://github.com/openstreetmap/osm2pgsql/blob/master/docs/usage.md for the complete options description.

  • Thank you. Is it possible to use same database for multiple carto style ( in my case, I want to use osm and osm bright)?
    – APL
    Commented Jul 12, 2018 at 11:58
  • 2
    Surely. Make sure that your style file contains all fields that are inside openstreetmap-carto.style and the standard default.style that is used for osm-bright.
    – AndreJ
    Commented Jul 13, 2018 at 6:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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