issue tracker

Id:OpenStreetMap Carto

From OpenStreetMap Wiki
Jump to navigation Jump to search
 Open bug tracker
OpenStreetMap Carto
Standard, osm-carto
Contoh OpenStreetMap Carto (Baclaran, Parañaque, Filipina, pada tahun 2016)
Contoh OpenStreetMap Carto (Baclaran, Parañaque, Filipina, pada tahun 2016)
Penulis: Andy Allan dan kontributor lainnya
Peta yang dapat diseret: openstreetmap.org
Kebijakan pengunaan: operations.osmfoundation.org/policies/tiles/
Lisensi petak: ODbL 1.0
Lisensi gaya: CC0 1.0
Versi: 5.9.0 rilis (2024-10-17)
Kode sumber: gravitystorm/openstreetmap-carto GitHub

Gaya Mapnik OpenStreetMap serbaguna, dalam CartoCSS


OpenStreetMap Carto GitHub[1] (atau OSM Carto, singkatan osm-carto) adalah lembar gaya sumber terbuka untuk tampilan data OpenStreetMap menjadi petak raster. Sejak 2013, halaman utama pertama OpenStreetMap telah menampilkan petak OSM Carto tiles sebaagai lapisan petak default dengan nama Standar.

Laporan bug dapat diajukan di sini GitHub (untuk gaya itu sendiri, misalnya masalah tampilan kelas objek tertentu) atau di sana GitHub (untuk tampilan petak aktual dalam OSM.org, caching dsb.) –keduanya memerlukan login dengan akun GitHub.

Penyebaran server OSM

Halaman utama OSM dengan lapisan petak standar

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.

Database schema changes should not be requested more often than 1–2 times a year (probably combined with major PostgreSQL release).

If using the Standard tiles from openstreetmap.org tile servers in other applications, you must follow the Tile usage policy.

Kunci peta

Karena gaya ini kaya fitur, kunci peta singkat yang disertakan dalam halaman utama OSM.org sangat terbatas. Lihat Id:OpenStreetMap Carto/Kunci dan subhalamannya untuk versi legenda terlengkap dan terbaru:

Artikel utama: /Simbol
Artikel utama: /Garis
Artikel utama: /Area

Perubahan besar

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

Detail teknis

Desain

Gaya ini dirancang sebagai peta dunia untuk keperluan umum, jadi misalnya:

  • objek khusus (seperti tanda laut atau detail rel kereta api) tidak akan ditampilkan
  • label ditampilkan dengan nilai name=* (apa pun yang dikandungnya untuk tertentu),
  • tidak ada simbol khusus negara (seperti misalnya papan nomor rute atau rambu logo kereta api bawah tanah/metro); semuanya memiliki tampilan yang seragam.

Sementara OpenStreetMap Carto mencoba menampilkan banyak objek berbeda, tidaklah mungkin untuk menampilkan semua yang tersimpan dalam basis data, jadi pemilihan ikut serta dilakukan.

Kasus pengunaan GitHub untuk beberapa tingkat zoom didefinisikan.

Mapnik dan 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).

Urutan perenderan

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

Basis data

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.

Struktur kode

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.

Ikon dan pola

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.

Huruf

Jika memungkinan, font Noto digunakan, sedangkan DejaVu Sans, Hanazono dan Unifont digunakan sebagai pengganti.

Sumber eksternal

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.

Kontribusi dan instalasi

You can set up a copy of the OpenStreetMap Carto rendering stylesheets for yourself. For more technical information, including setup instructions, see gravitystorm/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. Some complex tasks that need attention are:

Cabang dan penyebaran independen

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:

Vector-based solutions and testing:

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]

Tautan eksternal

Umum:

Sejarah:

Postingan blog:

Diskusi:

Catatan