OpenStreetMap Carto - OpenStreetMap Wiki
#OpenStreetMapCarto
#OpenStreetMapCarto
issue tracker
OpenStreetMap Carto
From OpenStreetMap Wiki
(Redirected from
Standard tile layer
Jump to navigation
Jump to search
Help
Standard tile layer
In other languages
Afrikaans
asturianu
azərbaycanca
Bahasa Indonesia
Bahasa Melayu
bosanski
brezhoneg
català
čeština
Crnogorski
dansk
eesti
Esperanto
euskara
Frysk
Gàidhlig
galego
hrvatski
Ido
interlingua
íslenska
italiano
Kreyòl ayisyen
kréyòl gwadloupéyen
kurdî
latviešu
Lëtzebuergesch
lietuvių
magyar
Nederlands
norsk
norsk nynorsk
occitan
polski
português
română
sardu
shqip
slovenčina
slovenščina
srpski (latinica)
suomi
svenska
Tagalog
Tiếng Việt
Türkçe
Zazaki
Ελληνικά
беларуская
български
македонски
монгол
русский
српски / srpski
українська
հայերեն
עברית
العربية
سرائیکی
فارسی
پنجابی
پښتو
नेपाली
मराठी
हिन्दी
বাংলা
ਪੰਜਾਬੀ
தமிழ்
മലയാളം
සිංහල
ไทย
မြန်မာဘာသာ
한국어
ქართული
ⵜⴰⵎⴰⵣⵉⵖⵜ
中文(简体)
中文(繁體)
粵語
Other languages...
OpenStreetMap Carto
Standard, osm-carto
OpenStreetMap Carto example (Baclaran, Parañaque, Philippines c. 2016)
Author:
Andy Allan
and
other contributors
Slippy map:
openstreetmap.org
Usage policy:
operations
.osmfoundation
.org
/policies
/tiles
Tiles license:
ODbL 1.0
Style license:
CC0 1.0
Version:
6.0.0
releases
(2026-03-11)
Source code:
openstreetmap-carto/openstreetmap-carto
GitHub
A general-purpose OpenStreetMap mapnik style, in CartoCSS
OpenStreetMap Carto
GitHub
(or
OSM Carto
or
osm-carto
for short) is an open-source
stylesheet
for
rendering
OpenStreetMap data to raster tiles. Since 2013,
the main OpenStreetMap homepage
has featured OSM Carto tiles as the default
tile layer
by the name
Standard
Bug reports can be raised
here
GitHub
(for the style itself, e.g. rendering problems of specific object classes) or
there
GitHub
(for actual tiles rendering on OSM.org, caching etc.) – both need a login with a
GitHub
account.
Contents
OSM servers deployment
Map key
Major changes
Technical details
4.1
Design
4.2
Mapnik and CartoCSS
4.3
Rendering order
4.4
Database
4.5
Code structure
4.6
Icons and patterns
4.7
Fonts
4.8
External sources
Contributing and installing
Forks and independent deployments
External links
Footnotes
OSM servers deployment
OSM homepage with standard tile layer
OSM tileservers have used the OpenStreetMap Carto style since August 2013.
OSM tileserver
generation statistics
are available
, you can read also about the
tiles rendering process
If using the Standard tiles from openstreetmap.org tile servers in other applications, you must follow the
Tile usage policy
Map key
Since this style is feature-rich, the short map key included on the OSM.org homepage is very limited. See
OpenStreetMap Carto/Key
and its subpages for the most complete and up to date legend version:
Main article:
/Symbols
Main article:
/Lines
Main article:
/Areas
Major changes
Change taking place October 2015 (
blog
).
Comparison of OSM Carto in 2017 with the
old version
(London, zoom level 10)
2012 – porting XML version to CartoCSS (start of the OSM Carto)
2013 – OSM tileservers deployment
2014 – rewrite of buildings code
2015 – road style change, SVG icons →
see image on the right
2016 – better rendering of placenames
2017 – water color, mid zoom improvements, database schema change
2018 – office and healthcare keys rendering, new POI color categories
Technical details
Design
The style is designed as a general-purpose map of the world, so for example:
special objects (like seamarks or railway details) will not be rendered
labels are rendered with a
name
=*
value (whatever it contains for a given object), so it's not displaying English names all over the world
there are no country-specific symbols (like for example road shields or subway/metro signs), they all have a uniform look
While OpenStreetMap Carto tries to show many different objects, it's not possible to render everything stored in a database, so opt-in selection is made.
Use cases
GitHub
for some zoom levels are defined.
Mapnik and CartoCSS
OpenStreetMap Carto tiles are rendered using the
Mapnik
toolkit. That being said, OpenStreetMap Carto and Mapnik are not the same thing! Mapnik is a map rendering library used for
many
map stylesheets (including OpenStreetMap Carto).
CartoCSS
is used to pre-process the stylesheet into Mapnik XML format (since August 2013).
Rendering order
In this case upper residential area is larger than forest area and lower residential area is smaller than forest area
This style has multiple layers. For example, names of waterways are rendered over waterways, shops are rendered over buildings, tunnels are rendered over buildings, roads are rendered over landcover, etc.
The remaining question is how objects are rendered within layer. For some cases collisions are not allowed, and objects that would cover already rendered object from given layer are not rendered. It is done for example for cities, where labels for smaller ones that would collide with label for a larger one are not rendered.
Landcover areas are ordered by area, with smaller ones later, and collisions are allowed. It means that for a given layer smaller areas will cover larger ones.
For example, a small
leisure
park
area will be rendered over a larger
landuse
residential
area.
There is also a separate overlay layer containing, for example, tree symbols for forest landcover. This layer is rendered over landcover fill.
area covered by small
landuse
forest
and large
landuse
residential
forest fill will be rendered over residential fill and cover it, later forest overlay will be rendered over that
area covered by large
landuse
forest
and small
landuse
residential
residential fill will be rendered over forest fill and cover it, later forest overlay will be rendered over that
Database
OpenStreetMap Carto uses as its standard database
PostgreSQL
with
PostGIS
geospatial extension and is named "gis". It is derived from the
OSM database
, but does not store the full dataset – only the rendering-related elements are available. Since v4.0.0, OpenStreetMap Carto uses the PostgreSQL
hstore
(extension and data type) and is pre-processed with
a lua script
GitHub
by the
osm2pgsql
tool.
Code structure
General project configuration is included in
project.mml
GitHub
(YAML). There are defined so called "layers", which include mainly SQL statements selecting the objects, while actual styling is done in multiple MSS files.
Roads code is very complex and is partially generated by the helper scripts.
Icons and patterns
Icons are pixel-aligned vector images (SVG), generally based on 14 px matrix. While most of them are monochrome and their rendering color is defined in the MSS files, some of the icons have more than one color; in the latter cases, the colors are defined in the vector file itself. Halftones might be used.
Some patterns are also done as vector images, but if they are still raster images (PNG), they are derived from vector elements and the process is
documented
GitHub
, so it should be easy to migrate to a vector format when possible.
Fonts
Noto font is used if possible, with DejaVu Sans, Hanazono and Unifont used as fallbacks.
External sources
The style relies partly on some external data files coming from
Natural Earth
and preprocessed OSM data repository
OpenStreetMapData
. They can be updated with a Python script (
scripts/get-shapefiles.py
GitHub
) or by hand.
Rendering coastline on openstreetmap.org is described here:
Coastline#Rendering in Standard tile layer on openstreetmap.org
Contributing and installing
You can set up a copy of the OpenStreetMap Carto rendering stylesheets for yourself. For more technical information, including setup instructions, see
openstreetmap-carto/openstreetmap-carto
GitHub
on GitHub:
Contribution guidelines are documented
here
GitHub
One can set a simple
Docker-based environment
GitHub
for testing.
Some
easy tasks
GitHub
have been selected for getting started with the process.
If you still don't know where to start, just ask for the assistance (for example in the ticket comments).
More experienced developers are also very welcomed. Complex tasks that need attention are tagged with
Help wanted
GitHub
Issues where input from map users is needed are tagged with
Input needed
GitHub
Forks and independent deployments
Apart from OSM.org deployment, osm-carto is being used for different independent services, like
OSM Japan
or
Geofabrik Maps
OpenStreetMap Carto is used as a base for other map style rendering forks, especially:
German osm-carto style
(does also contain a branch with a localized version of OpenStreetMap Carto)
French osm-carto style
GitHub
British osm-carto style (AJT)
GitHub
Swiss osm-carto style
GitHub
Belgian osm-carto style
GitHub
Japan fork of XML style
GitHub
(before osm-carto)
Style for hi-res (Retina) displays
GitHub
Style for the Sahara and other desert regions
GitHub
Style in black and white
GitHub
Style for displaying and exporting contour data
GitHub
imagico fork for testing different cartography ideas
GitHub
Vector-based solutions and testing:
osm-carto vector-tiles
GitHub
OpenStreetMap Cartographic
GitHub
Vector map based on OSM Carto (Esri ArcGIS)
Tracestrack
TracesMap
OSM OpenMapTiles
, part of the
OpenMapTiles
project
OpenStreetMap Vecto
, part of the
Apache Baremaps
project
There is also a separate project called
OpenGeofiction
(OGF), which uses OSM tools – including osm-carto as default style – for creating maps of fictional places. An
OpenHistoricalMap
contributor has also prototyped a port of OSM Carto to that project's vector tile schema.
[1]
External links
General:
Topic on OSM forum
Current project activity
GitHub
OpenStreetMap Carto Tutorials
– unofficial documentation (by Ircama)
Docker things for openstreetmap carto
GitHub
– independent Docker environment (by OnkelTem)
Tutorial about how to render on a map road line surfaces
GitHub
(by Lukas Sommer)
Pre-rendered low-zoom tiles
(by Paul Norman)
Check
current released github-carto-version
GitHub
and current used carto-version on
, see
git-chef line 95
(95 :revision => "vx.xx.x",)
History:
Timelapse videos of changes in osm-carto 2012–2016
(by Michael Glanznig)
Old XML format Mapnik stylesheets for OpenStreetMap "standard" style
GitHub
Custom map style (1) - tweaking the standard OpenStreetmap style
for the old, pre-2012 XML format (by Volker Schatz)
Blog posts:
OpenStreetMap Carto Complexity
(Paul Norman blog, 2015)
OpenStreetMap-Carto – a look back at the last year
(Christoph Hormann blog, 2017)
OpenStreetMap-Carto – a look into the future
(Christoph Hormann blog, 2017)
Adding a change to "OSM Carto"
(Andy Townsend diary, 2017)
Talks:
Andy Allan talks:
SoTM US 2013
SoTM EU 2014
SoTM US 2015
R. A. McCann talk on SoTM 2016
("Converting a regular carto project to vector tiles: OSM-carto case study")
Paul Norman talk on SoTM 2017
Footnotes
openstreetmap-carto/openstreetmap-carto/issues/2927
GitHub
openstreetmap.org
Interface elements
Share map with marker
Map Data layer
Query features tool
Routing
Changeset Discussions
Nearby users
Notes
Top menu
Edit
History
Export
GPS traces
How to upload a GPS
Troubleshooting
Visibility of GPS traces
Layers
Standard
CyclOSM
OpenCycleMap
Transport Map
Tracestrack Topo
Humanitarian
Former:
MapQuest Open
Account
and login
Lost password
Account deletion
See also
Main OSM blog
User diaries
When do I see my work on OpenStreetMap?
Retrieved from "
Categories
Slippy map
Tiles layer
Main OSM website
OSM Carto
Map style
CC0
Hidden categories:
Pages unavailable in Italian
Pages unavailable in Dutch
Navigation menu
US