Zh-hans:Standard tile layer
Baclaran, Paranaque and Pasay Rotunda, Pasay
|作者||Andy Allan 与|
|Tiles license||CC-BY-SA 2.0|
可以在GitHub账号。（仅限样式问题，例如：特定物品的渲染问题）或 （报告在OSM.org, caching等地方的某个特定瓦片渲染问题）报告问题……两个网址都需要
如果要在其他应用里使用 openstreetmap.org 瓦片服务器的标准瓦片，必须要遵循Tile usage policy。
鉴于样式的特点比较丰富，OSM.org 体现出来的关键字十分有限，请查看Standard tile layer/Key及其子页面以获取最完整及最新的版本：
- 2012 - 将 XML 版本移植为 CartoCSS（OSM Carto 的开始）
- 2013 - 部署 OSM 瓦片服务器
- 2014 - 重写建筑部分代码
- 2015 - 调整道路样式、SVG图标
- 2016 - 更好的地名渲染
- 2017 - 水域颜色，中缩放等级提升，数据库架构变更
- 2018 - 办公室及卫生机构关键字渲染，新 POI 颜色分类
尽管 OpenStreetMap Carto 试图展现尽可能多的物件，渲染数据库里的所有东西仍然是不可能的，所以进行了挑选。
Mapnik 与 CartoCSS
OpenStreetMap Carto 瓦片通过 Mapnik 工具集进行渲染，也就是说，OpenStreetMap Carto 与 Mapnik 不是同一个东西！Mapnik 是一个被许多地图样式表（包括OpenStreetMap Carto）使用了的地图渲染库。
CartoCSS 是用来预处理样式表为 Mapnik XML格式（2013年8月起）。
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 is not rendered. It is done for example for cities, where labels for smaller that would collide with label for 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.
For example small leisure=park area will be rendered over larger landuse=residential area.
There is also a separate overlay layer containing for example tree symbols for forest landcover, that 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
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 by the osm2pgsql tool.
General project configuration is included in(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 and they are defined in the vector file itself in such cases. 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, so it should be easy to migrate to a vector format when possible.
Noto font is used if possible, with DejaVu Sans, Hanazono and Unifont used as fallbacks.
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, seeon GitHub:
- Contribution guidelines are documented .
- One can set a simple for testing.
- Some has 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. Some complex tasks that need attention are:
Forks and independent deployments
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)
- (before osm-carto)
- Vector map basing on OSM Carto cartography by Esri
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.
- Topic on OSM forum
- OpenStreetMap Carto Tutorials - unofficial documentation (by Ircama)
- - independent Docker environment (by OnkelTem)
- (by Lukas Sommer)
- Pre-rendered low zoom tiles (by Paul Norman)
- check https://osm.org, see git-chef line 109 (109 :revision => "vx.xx.x",) and current used carto-version on
- Timelapse videos of changes in osm-carto 2012-2016 (by Michael Glanznig)
- Custom map style (1) - tweaking the standard OpenStreetmap style for the old, pre-2012 XML format (by Volker Schatz)
- 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)
- Andy Allan talks: SoTM US 2013, SoTM EU 2014, SoTM US 2015
- Rory McCann talk on SoTM 2016 ("Converting a regular carto project to vector tiles: OSM-carto case study")
- Paul Norman talk on SoTM 2017