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

Hi all

I have came across two kinds of stylesheet files when I setup my own osm tile server following the steps in switch2osm.

  1. /usr/local/share/maps/style/OSMBright/OSMBright.xml which is generated by OSMBright and will be configured in my renderd.conf.

  2. The .style file when using osm2pgsql to load osm data into database, for example openstreetmap-carto.style, the default style file which supersedes the old xml style. When I used the above OSMBright, I didnot really specify such a .style file when loading with osm2pgsql.

So I got concept confused and is the two stylesheets the same thing? If not, what is the difference?

Thanks.

asked 07 Sep '15, 03:38

dalishi's gravatar image

dalishi
1264411
accept rate: 0%

edited 07 Sep '15, 04:28


  • The osm2pgsql .style file controls what information is loaded from raw OpenStreetMap data into the PostGIS database
  • The osmbright.xml style file controls what information is taken from that PostGIS database and how it is shown in the map images

So both style files are required, one for OSM -> PostGIS, and the second for PostGIS -> map images. In many cases the cartographic style sheets (like OSM Bright) work with the default osm2pgsql .style file, so they don't really mention it in their instructions. OSM Bright says in the readme "If you are using osm2pgsql the default style file should work well" but that's easy to overlook!

In summary, both types of "style" file are required, but usually the default osm2pgsql .style works fine for most cartographic styles.

permanent link

answered 07 Sep '15, 10:07

Andy%20Allan's gravatar image

Andy Allan
12.5k23128153
accept rate: 28%

@Andy Allan thanks Andy, this has clearly explained the facts and eliminated my confusion.

(07 Sep '15, 10:43) dalishi

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×65
×24

question asked: 07 Sep '15, 03:38

question was seen: 4,546 times

last updated: 07 Sep '15, 10:43

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