pax_global_header 0000666 0000000 0000000 00000000064 14530664656 0014531 g ustar 00root root 0000000 0000000 52 comment=47a96cb6092198ba37992351a4059336ed58ae96
openstreetmap-carto-5.8.0/ 0000775 0000000 0000000 00000000000 14530664656 0015537 5 ustar 00root root 0000000 0000000 openstreetmap-carto-5.8.0/.dockerignore 0000664 0000000 0000000 00000000066 14530664656 0020215 0 ustar 00root root 0000000 0000000 *
!scripts/tune-postgis.sh
!openstreetmap-carto.style
openstreetmap-carto-5.8.0/.editorconfig 0000664 0000000 0000000 00000000721 14530664656 0020214 0 ustar 00root root 0000000 0000000 # http://EditorConfig.org
root = true
# Defaults apply to all files
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
# 4 space indentation for Lua and Python
[*.{lua,py}]
indent_size = 4
# Leave SVG files alone, we have a mix of tabs and spaces
[*.svg]
indent_style = undef
indent_size = undef
# Lastmod files are used by the scripts and should not contain newlines
[*.lastmod]
insert_final_newline = false
openstreetmap-carto-5.8.0/.gitattributes 0000664 0000000 0000000 00000000453 14530664656 0020434 0 ustar 00root root 0000000 0000000 # Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
# Declare files that will always have LF line endings on checkout.
*.sh text eol=lf
*.py text eol=lf
# YAML highlighting on GitHub webpage for CartoCSS MML files.
*.mml linguist-language=YAML linguist-detectable
openstreetmap-carto-5.8.0/.github/ 0000775 0000000 0000000 00000000000 14530664656 0017077 5 ustar 00root root 0000000 0000000 openstreetmap-carto-5.8.0/.github/issue_template.md 0000664 0000000 0000000 00000000140 14530664656 0022437 0 ustar 00root root 0000000 0000000 ### Expected behavior
### Actual behavior
### Screenshots with links illustrating the problem
openstreetmap-carto-5.8.0/.github/pull_request_template.md 0000664 0000000 0000000 00000000223 14530664656 0024035 0 ustar 00root root 0000000 0000000 Fixes # (id of the issue to be closed)
Changes proposed in this pull request:
-
Test rendering with links to the example places:
Before
After
openstreetmap-carto-5.8.0/.github/workflows/ 0000775 0000000 0000000 00000000000 14530664656 0021134 5 ustar 00root root 0000000 0000000 openstreetmap-carto-5.8.0/.github/workflows/ci.yml 0000664 0000000 0000000 00000005745 14530664656 0022265 0 ustar 00root root 0000000 0000000 name: CI
on:
- push
- pull_request
jobs:
syntax:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.7
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install python dependencies
run: pip install pyyaml colormath
- name: Set up xmllint
run: sudo apt-get update -qq && sudo apt-get install -qq --no-install-recommends libxml2-utils
- name: Set up CartoCSS
run: npm install -g carto@1.2.0
- name: Set up shell
run: set -o pipefail
- name: Validate YAML files
run: |
find . \( -type f -name '*.yaml' -o -name '*.yml' -o -name '*.mml' \) -print0 \
| xargs -0 -I '{}' python3 -c 'from yaml import safe_load; safe_load(open("{}"))'
- name: Validate SVGs for valid XML
run: find symbols/ -name '*.svg' | xargs xmllint --noout
- name: Check indexes are up to date
run: diff -qu <(scripts/indexes.py) indexes.sql
- name: Check colors of paved roads are up to date
run: diff -qu <(scripts/generate_road_colours.py) style/road-colors-generated.mss
- name: Check colors of unpaved roads are up to date
run: |
cp -r symbols/unpaved temp
scripts/generate_unpaved_patterns.py
diff -qu temp symbols/unpaved
- name: Check for unsupported class usage
run: '! grep "class:" project.mml > /dev/null'
- name: Validate with CartoCSS
run: 'carto project.mml --api 3.0.22 --quiet > /dev/null'
- name: Check that index script works without errors
run: |
scripts/indexes.py --fillfactor 100 > /dev/null &&
scripts/indexes.py --concurrent > /dev/null &&
scripts/indexes.py --reindex > /dev/null &&
scripts/indexes.py --concurrent --reindex > /dev/null &&
scripts/indexes.py --notexist > /dev/null &&
scripts/indexes.py --null > /dev/null &&
scripts/indexes.py --null > /dev/null
import:
needs: [syntax]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install osm2pgsql and database
run: sudo apt-get update -qq && sudo apt-get install -qq --no-install-recommends osm2pgsql postgresql-14-postgis-3 gdal-bin
- name: Wait for database
run : sudo pg_ctlcluster 14 main start; until pg_isready; do sleep 0.5; done
- name: Setup database
run: sudo -i -u postgres createuser -s $USER && createdb -E utf8 gis && psql -Xq -d gis -c "CREATE EXTENSION postgis; CREATE EXTENSION hstore;"
- name: Import empty file
run: |
osm2pgsql -G --hstore --style openstreetmap-carto.style --tag-transform-script openstreetmap-carto.lua -d gis -r xml <(echo '')
- name: Create indexes
run: psql -1Xq -v ON_ERROR_STOP=1 -d gis -f indexes.sql
- name: Load empty shapefiles
run: scripts/get-external-data.py --no-update --cache -D scripts/empty_files
- name: Test queries are valid
run: scripts/test-queries.py project.mml
openstreetmap-carto-5.8.0/.gitignore 0000664 0000000 0000000 00000000270 14530664656 0017526 0 ustar 00root root 0000000 0000000 .thumb.png
layers/
data/
fonts/
tmp/
*.xml
*.osm.pbf
node_modules/
localconfig.json
localconfig.js
.kosmtik-config.yml
.env
.DS_Store
# Generated at runtime by Python.
*.pyc
**/*.pyc
openstreetmap-carto-5.8.0/CARTOGRAPHY.md 0000664 0000000 0000000 00000010046 14530664656 0017645 0 ustar 00root root 0000000 0000000
# Design goals and guidelines for this style
This is an attempt to outline the goals of this style and the principles under
which the maintainers make decisions. These rules are not set in stone, they
can change and they may not be followed in all cases but contributors should
be able to expect that they are generally the guiding principles design wise.
It does not make much sense to try following these principles blindly as a
contributor without understanding them, they are meant to guide you to develop
an intuition and understanding how to make design decisions to fit into the
overall concept of this style.
## General purpose
This style has multiple purposes:
* It's an important feedback mechanism for mappers to validate their edits and helps to prevent unfavorable fragmentation of tag use.
* It's a major part of the public face of OpenStreetMap, for many people the map on osm.org rendered with this style _is_ OpenStreetMap.
* It's used in many map applications as a general purpose map.
* It's an exemplar stylesheet for rendering OSM data.
There is no ranking of these purposes. To allow serving all of them and to
avoid satisfying only some at the cost of the others the following main goals
have been identified.
## Main goals
The following goals need to be balanced against each other to serve the purposes
above. There is no fixed order of priorities. Apart from these goals there are
of course also technical constraints and requirements that need to be taken into
account.
* **Legibility and clarity** - The map should be intuitively readable by users with some general experience using maps without a map key, preferrably with relatively little effort. A map key or more extensive experience using this map style can be required for clearly identifying minor differences or the exact meaning of certain features but in broad strokes orientation and identification of map elements should be possible on an intuitive level. We also aim for the map appearance to be esthetically pleasing.
* **Being understandable and supportive for mappers** - To serve as feedback for mappers and encourage correct mapping this style needs to render the data in a way that allows mappers to understand how the data produces a certain rendering result based on basic observation without in depth understanding how map rendering works or looking at the style implementation.
* **Diversity** - The style should represent the diversity of the OSM community and geography in general. The most obvious element to serve this goal is showing the local names everywhere on earth in their respective scripts. This goal however goes beyond labels. Both physical and cultural geography differs a lot globally and the aim is to represent this variety with equal determination - well mapped areas are not supposed to have more weight here than less mapped parts of the world. This also means the target map user is the potential global map user and no special consideration is given to the current geographic distribution of actual map use.
* **A rich map** - This style deliberately creating a fairly rich map showing a significant number of different features. This way it shows the richness of OSM data and gives a broad recognition to the mappers' work. The aim is not however to show all or even most of the OSM data.
* **Maintainability** - The implementation of this style should not be too hard to maintain. This refers to both the volume and complexity of the code and how fast the style can be parsed when rendering it, which is very important for efficient development work. So the amount of code should be kept small and complex and fragile interdependencies should be avoided. If the code is difficult to maintain this would ultimately seriously affect all of the above goals.
* **Adaptability and ease of use** - The style should be easy to customize, like for creating localized or special purpose maps. It is also important to keep demands on rendering infrastructure for serving the style low so it is not too difficult and costly to set up a tile server for this style or a specialized variant of it.
openstreetmap-carto-5.8.0/CHANGELOG.md 0000664 0000000 0000000 00000122627 14530664656 0017362 0 ustar 00root root 0000000 0000000 ## [Unreleased](https://github.com/gravitystorm/openstreetmap-carto/compare/v5.8.0...master)
## [v5.8.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v5.7.0...v5.8.0) - 2023-11-26
### Changes
- Changing color of leisure=pitch to be more distinct and less similar to the water color (#4480)
- Fixing color of ref label for railway=subway_entrance (#4835)
- Fixes for highway=mini_roundabout rendering on various road types (#4904)
- Fixing merge error in previous change of rendering natural=bay/natural=strait (#4841)
- Removing point symbol rendering for golf=hole (#4857)
- Restoring rendering for railway=platform + covered=yes (#4797)
- Adding rendering of roller_coaster=track (#4666)
- Adding rendering of landuse=flowerbed (#4889)
## [v5.7.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v5.6.2...v5.7.0) - 2023-01-11
### Changes
- Unpaved roads are now indicated on the map (#3399)
- Country label placement improved, particularly for countries in the north (#4616)
- Added elevation to wilderness huts (#4648)
- New index for low-zoom performance (#4617)
- Added a script to switch between script variations for CJK languages (#4707)
- Ordering fixes for piers (#4703)
- Numerous CI improvements
## [v5.6.2](https://github.com/gravitystorm/openstreetmap-carto/compare/v5.6.1...v5.6.2) - 2022-11-10
### Changes
- Locally installed fonts fixed (#4672)
## [v5.6.1](https://github.com/gravitystorm/openstreetmap-carto/compare/v5.6.0...v5.6.1) - 2022-08-12
### Changes
- Rendering of water areas on zooms 0 to 4 fixed (#4640)
## [v5.6.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v5.5.1...v5.6.0) - 2022-08-03
### Major Changes
- The style now uses locally installed fonts, using `scripts/get-fonts.sh` to download the fonts.
### Changes
- Code and performance improvements (#4591, #4601)
- Recommend disabling PostgreSQL JIT for rendering (#4592)
- Change tree and tree row colours to the same colour as areas with trees (#4448)
- Don't label public transport shelters with elevation (#4313)
- Update code of conduct to explicitly prohibit doxxing (#4554)
- Add parcel lockers (#4512)
- Render name labels of bays and straights from z14 only, and lakes from z5 (#3750)
## [v5.5.1](https://github.com/gravitystorm/openstreetmap-carto/compare/v5.5.0...v5.5.1) - 2022-07-13
### Changes
- Fix unintentional colour change of gates
## [v5.5.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v5.4.0...v5.5.0) - 2022-07-09
### Changes
- Fixed colour mismatch of car repair shop icon and text (#4535)
- Cleaned up SVG files to better align with Mapnik requirements (#4457)
- Allow Docker builds on ARM machines (e.g. new Apple laptops) (#4539)
- Allow file:// URLs in external data config and caching of downloaded files (#4468, #4153, #4584)
- Render mountain passes (#4121)
- Don't use a cross symbol for more Christian denominations that don't use a cross (#4587)
## [v5.4.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v5.3.1...v5.4.0) - 2021-09-22
### Changes
- Added a new `planet_osm_line_label` index (#4381)
- Updated Docker development setup to use offical PostGIS images (#4294)
- Fixed endline conversion issues with python setup scripts on Windows (#4330)
- Added detailed rendering of golf courses (#4381, #4467)
- De-emphasized street-side parking (#4301)
- Changed subway stations to start text rendering at z15 (#4392)
- Updated road shield generation scripts to Python 3 (#4453)
- Updated external data loading script to support pyscopg2 2.9.1 (#4451)
- Stopped displaying tourism=information with unknown information values
- Switched the Natural Earth URL to point at its new location (#4466)
- Added more logging to the external data loading script (#4472)
## [v5.3.1](https://github.com/gravitystorm/openstreetmap-carto/compare/v5.3.0...v5.3.1) - 2021-02-04
### Changes
- Natural Earth URL changed to directly point at the NACIS CDN (#4306)
- Added an option to the external data loader to grant SELECT permissions on the tables (#4307)
## [v5.3.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v5.2.0...v5.3.0) - 2021-01-28
### Major Changes
- External shapefiles for coastline and other data are now loaded into the database with a provided script. (#4092)
- The recommended indexes are now required. Attempting to render without them will result in abysmal performance.
### Changes
- amenity=embassy is no longer rendered, and office=diplomatic with diplomatic=embassy or diplomatic=consulate is instead (#4168)
- Mini-roundabouts are rendered like a turning circle (#4218)
- There is a new partial index for waterways
## [v5.2.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v5.1.0...v5.2.0) - 2020-05-8
### Changes
- Add rendering for man_made=goods_conveyor (#4102)
- Tunnel style rendering of waterway=canal with tunnel=flooded (#4087)
- Remove rendering of residential, unclassified, cycleway, path, track highway areas (#4096)
- Remove rendering of protect_class = 7, 24, 97, 98, 99 boundary=protected_area features (#4113)
- Move place=square to amenity-points layer with placenames text style from z17 (#4085)
- Change wetland pattern initial zoom level back to z10 (#4094)
- Render bare_rock pattern from z13, same as shingle and scree (#4072)
- Restore admin-text rendering for admin_level 3 to 5 (#4126)
- Move aerialways and amenity-line layers text labels to text-line layer (#4107)
- Fix python3 installation for Docker (#4125)
## [v5.1.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v5.0.0...v5.1.0) - 2020-04-10
### Changes
- Remove way_area filtering for low zoom water (#4060)
- Move small amenities to z18 (#4044)
- Rework admin-boundaries to show admin_level=5/6/7 sooner but admin_level=10 later (#4100)
- Add rendering for addr:flats (#4082)
- Add rendering for man_made=pipeline ways (#4070)
- Add line rendering plus name labels for ridges and aretes (#3767)
- Add rendering for landuse=salt_pond (#4059)
- Remove power=sub_station/station rendering, add power=plant fill color (#4088)
- Remove icon for shop=ice_cream (#4093)
- Remove information=tactile_model rendering (#4086)
- Remove duplicate selection of natural = cave_entrance, peak, volcano, saddle (#4068)
- Move natural=spring back to amenity-points layer (#4069)
- Change quarry outline to 10% darkened quarry color (#4063)
- Change bridge-text way_pixels minimum and maximum (#4066)
- Update Dockerfile keyserver URL for osmadmins PPA (#4079)
- Code clean-ups (#4080, #4081, #4083, #4099)
## [v5.0.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.25.0...v5.0.0) - 2020-03-18
### Major changes
- Update Lua tag transforms. (#4032)
Linestring and polygon decisions have changed and a database reload is required for this update.
### Changes
- Added upper way_area limits to most features using ST_PointOnSurface to avoid performance problems from large polygons (#4042)
- Moved MSS files into their own directory (#4047)
- Update index for route=ferry (#3909)
- Removed rendering of power=cable features (#4045)
- Removed overlay pattern for natural=sand (#3855)
- Reduced landcover fading at mid-low zoom levels (#3952)
- Update scripts to use Python3 (#4062, #4029, #4033)
## [v4.25.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.24.1...v4.25.0) - 2020-02-01
### Changes
- Remove rendering of barrier=embankment (#4010)
Embankments are now commonly tagged with man_made=embankment or man_made=dyke
- Remove rendering of barrier=kerb (#3969)
This feature is not similar to common barriers (fences and walls)
- Remove boundary=protected_area fill color at low zoom levels (#3887)
Also changes protected area line and text to new `@protected-area`
- Remove polygon fill rendering for barrier=hedge areas (#3844)
This makes the rendering consistent between walls and hedges as areas
- Remove operator text label for most amenity=vending_machine (#3965)
Operator= label is still rendered for vending=public_transport_tickets
- Add svg icon for parking=multi-storey + amenity=parking_entrance (#3599)
- Fix syntax of font list and enable Armenian font (#3989)
- Use ST_PointOnSurface for bridge names (#3902)
- Use ST_PointOnSurface for text-poly-low-zoom (#3921)
- Use ST_PointOnSurface for roads-area-text-name (#3932)
- Use ST_PointOnSurface for junctions (#3933)
- Use text-dy for wind generators only, not for other power=generator features (#3964)
### Minor code clean-ups:
- Remove way_pixels selection from bridge layer (#3950)
- Remove name from SQL select when unused (#3947)
- Combine line-barriers and area-barriers layers into one
## [v4.24.1](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.24.0...v4.24.1) - 2019-10-28
### Changes
- Revert PR #3930 which added river-color (#3955)
## [v4.24.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.23.0...v4.24.0) - 2019-10-25
### Changes
- Create darker river-color for river & canal areas and waterway lines (#3930)
The color of river, canal, ditch and drain waterway lines
and river and canal areas is changed to `#8fcadd` (Lch78,21,227)
- Fix rendering of water body labels (#3919)
Restores rendering of water body labels on points (node features)
Fixes rendering of natural=bay to use italic font at all z levels
Cleans up duplicate natural=strait code in water.mss
- Precedence of junctions over POIs (#3915)
Junction=yes, =motorway and man_made=bridge labels now render before amenity-points
This prevents icons from blocking the display of these text labels
- Remove rendering of waterway=wadi (#3931)
The tag waterway=wadi is deprecated, suggested replacement:
waterway=river/stream + intermittent=yes OR natural=valley
- Move parking to amenity-points layers, change way_pixels limit and initial zoom level (#3923)
Moved parking features back to amenity-points layers
Changed parking text intial zoom to z14, as planned in PR #3612
Change way_pixels limit for parking icon (750) and text (3000)
- Don't use classes anymore (#3912)
- Convert state & country layers to ST_PointOnSurface (#3920)
- Convert addresses to use ST_PointOnSurface (#3898)
- Apply bbox to part of "addresses" query (#3942)
The 4 changes above are needed to allow use of vector tiles
ST_PointOnSurface is used to generate a point for labeling
Classes are removed, replaced with the layer id
- Documentation updates (#3911) & (#3910)
- Code clean-up (#3899) & (#3922)
Document inner line rendering, update docker documentation
Clean-up text-placement / marker-placement, remove natural=marsh
## [v4.23.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.22.0...v4.23.0) - 2019-9-20
### Changes
- Combine low priority layers using ST_PointOnSurface (#3874)
Fixes a bug which rendered `parking` icons twice
- Restore rendering of landcover text labels on points (#3878)
- Adjust `aerodrome` initial & final zoom levels (#3879)
- Adjust width of `hedge` & `citywall` up to z20, adjust hedge color (#3847)
- Increase `office=` initial zoom to z18 and move some values to z19 (#3796)
- Create new layer for `ref` of `highway=residential/unclassified/track` (#3709)
Changes `ref` to standard halo-radius, oblique font, and same size as `name` at >z17
- Add fill colors for `wetland=mangrove/saltmarsh/reedbed` (#3807)
Also adds salt dots pattern for `wetland=saltmarsh`
## [v4.22.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.21.0...v4.22.0) - 2019-08-27
### Changes
- Shop label fixes and use ST_PointOnSurface for building label placement (#3781)
This fixes some bugs and makes building label placement consistent with shop
label placement.
- Use `cache-feature: true` to improve performance of layers with attachments (#3838)
- Use retail colour fill on malls (#3790)
- Drop `highway=steps` from zoom 13 (#3825)
This makes step rendering consistent with footways
- Render `place=locality` from zoom 16 (#3749)
This fits current usage of the tag and what it is normally tagged on.
- Render `natural=bay` from linear ways (#3754)
- Render administrative boundary labels from relations only (#3762)
- Stop rendering natural=marsh (#3829)
It is recommended marshes are tagged with `natural=wetland` + `wetland=marsh`
- Use a whitelist for barrier rendering, and render `historic=citywalls` like
`barrier=city_wall`. (#3745)
- Support new Tibetan font name (#3842)
Noto has renamed Noto Sans Tibetan to Noto Serif Tibetan. The old name is
still supported.
- Add adjustments for `highway=motorway` and `highway=service` width at z20 (#3763)
- Code cleanups to increase reuse and improve consistency (#3735, #3760, #3771, #3773, #3774)
## [v4.21.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.20.0...v4.21.0) - 2019-05-01
## Major changes
- Removed unused `world_boundaries-spherical.tgz` file from scripts
This file can be safely removed and has not been used for some time.
- Switch to osmdata.openstreetmap.de for water & icesheet shapefiles
The script will handle the change automatically, but if manually downloading
or using a different method, you will need to adjust paths.
- Change from land to ocean polygons and render water areas above landcover
- Started using ST_PointOnSurface for some label placements
These changes are part of an effort to make it easier for forks using a
vector tile architecture as well as reducing the duplication among POI
layers. Some load has been shifted from Mapnik to the database.
- Adjusted index for military areas
The query was adjusted last version but the index was missed. The old
`planet_osm_polygon_military` can be removed, and for servers in use, the new
one can be taken from the `scripts/indexes.py --concurrent` output.
## Changes
- Adjusted starting zooms for labeling of administrative areas.
The new zooms are based on `admin_level` and size.
- Revert rendering of healthcare key
The original PR which implemented this had technical issues that prevented it
from working properly.
- Stop place some place labels when the objects become too big or at high
zooms.
- Only render capes as points and render them like other points.
- Only render ferry lines from ways, not relations
- Improved developer internal documentation
## [v4.20.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.19.0...v4.20.0) - 2019-02-15
## Changes
- Progressive lightening major buildings fill and outline (#3659)
- Adding rendering for aboriginal areas (#3521)
- Dropping rendering of leisure=common (#3619)
- Adding missing oneway arrows for tracks and paths (#3614)
- Changing way_pixels limit to 750 for protected_area boundaries (#3661)
- Adding rendering for ref of track roads (#3654)
- Improving rendering of text labels on admin and nature-reserve borders (#3652)
- Changing way_pixels calculation to use scale_denominator (#3657)
- Fixing layering order for construction=* highway categories (#3646)
- Reducing saturation of pitch outline color (#3658)
- roads-text-ref-low-zoom: remove unused SQL CASE conditions in ORDER BY (#3680)
## [v4.19.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.18.0...v4.19.0) - 2019-01-18
## Changes
- Adding rendering for boundary=protected_area (#3509)
- Nature reserve boundaries revision (#3574)
- Adding support of amenity=vending_machine (#3601)
- Adding more barrier icons (#3602)
- Changing allotments color and adding outline (#3625)
- Reducing priority of tourism=attraction and rendering from z17 (#3603)
- Changing tourism outline color (#3582)
- Making country borders thicker at z8 and z9 (#3563)
- Rendering parking from z14 (#3612)
- Starting to render most patterns at z13 instead of z14 (#3610)
- Changing zoom level and text size for place=hamlet (#3626)
- Rendering airport gate refs black instead of purple (#3620)
- Updating zoom levels by height for masts, towers and telescopes (#3536)
- Hiding underground parking (#3600)
- Rendering ref of minor roads more than once (#3627)
- Adjusting width of highway=construction (#3580)
- Selecting only motorway_link to tertiary_link as link (#3567)
- Reducing tertiary-link width (#3570)
- Changing certain amenity icons to grey (#3586)
- Converting springs to use ST_PointOnSurface and reformatting SQL (#3233)
- Adding "religious-icon" as color variable for #000000 (#3642)
- Adding "barrier-icon" color variable in #3f3f3f for barriers (#3643)
- Fixing inconsistency of leisure=ice_rink (#3598)
- Fixing label opacity for tourism features (#3616)
- Reverting lowzoom nobuilding test change (#3622)
- Removing trailing whitespace (#3637)
## [v4.18.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.17.0...v4.18.0) - 2018-12-21
## Changes
- Adding rendering for healthcare tag scheme
- Changing hospital icon
- Changing healthcare color to red
- Changing natural=scrub color
- Changing landuse=allotments color and pattern
- Adding rendering for natural=cape
- Rendering leisure=ice_rink
- Adding rendering for man_made=crane
- Adding icons for shop=fabric and shop=carpet
- Updating icons for amenity=arts_centre, leisure=slipway, amenity=restaurant/amenity=food_court and man_made=storage_tank/man_made=silo
- Using dedicated icon for artwork_type=bust
- Rendering railway pattern on z12
- Showing labels of big states (like Alaska)
- Moving railway=tram_stop and station=subway later
- Adding rendering for more private POIs
- Removing smoothing in leisure=track and attraction=water_slide
- Using subway bridge style for subway construction bridges
- Rendering wind turbines names and other tweaks
- Changing man_made gray and text color, making text-dy uniform
- Small documentation and code fixes
## [v4.17.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.16.0...v4.17.0) - 2018-11-23
## Changes
- Showing natural areas from z5
- Cleaning up medium zoom rendering, including:
- Making societal amenities look like residential on z10-z12
- Rendering motorway junction names from z13 instead of z12
- Dropping buildings up to z13 instead of z12
- Correctly dropping minor waterways from z13
- Rendering intermittent streams/ditches/drains from z15
- Reducing lightening of tramways
- Rendering religious landuse and place of worship lighter
- Adding text-repeat-distance for highway names
- Rendering dots for gastronomy objects on z17
- Changing icon for tourism=artwork
- Adding icons for memorial subtags
- Rendering man_made=telescope
- Rendering amenity=internet_cafe
- Adding icon for amenity=public_bookcase
- Adding icons for barrier=cattle_grid and barrier=stile
- Adding icon for leisure=fishing
- Rendering entrance for underground parking
- Rendering basin=detention/infiltration as intermittent water
- Tweaking outline of swimming pools and rendering it from z17
- Moving danger_area into landuse-overlay
- Buildings code rewrite
## [v4.16.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.15.0...v4.16.0) - 2018-10-19
## Changes
- Changing societal amenities color to less intensive
- Adding rendering for natural=strait
- Adding rendering for leisure=track on lines
- Adding icon for amenity=vehicle_inspection
- Adding icon for leisure=sports_centre + sport=swimming and leisure=swimming_area
- Adding icon for tourism=gallery
- Changing color for aeroway=apron in aerodromes
- Moving amenity=post_box to z19+
- Moving amenity=atm to z19+
- Replacing icon for information=tactile_model
- Ordering amenity_lines by layer
- Small documentation and code fixes
## [v4.15.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.14.0...v4.15.0) - 2018-09-21
## Changes
- Changing gastronomy objects color to orange (affects restaurant, fast_food, ice_cream, food_court, bar, cafe, nightclub, pub and biergarten)
- Changing farmland and societal amenities (like school, hospital etc.) colors to fit better into the overall color systematic
- Adding rendering for man_made=wastewater_plant and man_made=water_works
- Adding icon for man_made=storage_tank and man_made=silo
- Adding icon for amenity=bicycle_repair_station
- Adding icon for leisure=amusement_arcade
- Adding icon for shop=bookmaker
- Adding icon for shop=trade and shop=wholesale
- Adding rendering for attraction=water_slide
- Rendering most of the road links thinner (affects trunk_link, primary_link, secondary_link)
- Moving manors to z16+
- Fixing missing country labels on z4 (affects Canada, Russia and Greenland)
- Small code and icon fixes
## [v4.14.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.13.0...v4.14.0) - 2018-08-17
## Changes
- Added text-repeat-distance for waterways
- Added text-repeat-distance for railways
- Added icon for leisure=bowling_alley
- Added icon for leisure=outdoor_seating
- Added icon for leisure=bird_hide
- Added icon for shop=video
- Added icon for shop=paint
- Added icon for shop=massage
- Increased casing width of tertiary road on z12
- Standard text halo for fitness_centre and fitness_station
- Updated Docker images definitions
- Small documentation updates
## [v4.13.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.12.0...v4.13.0) - 2018-07-23
## Changes
- Increased shield distances on roads
- Added icon for shop=ticket
- Added icon for shop=houseware
- Added icon for shop=charity
- Added icon for shop=second_hand
- Added icon for shop=interior_decoration
- Added icon for amenity=bureau_de_change
- Added icon for amenity=casino
- Added icon for amenity=boat_rental
- Updated shop=department_store icon
- Small documentation and code fixes
## [v4.12.1](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.12.0...v4.12.1) - 2018-06-29
## Changes
- Stop rendering "surface" tag, which was causing breaking performance issues
## [v4.12.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.11.0...v4.12.0) - 2018-06-22
### Major changes
- Dropped subpixel accuracy for areas, which includes tuning some database indexes. When deployed, it might speed up reading data.
### Changes
- Added rendering “surface” tag on roads with a pattern
- More vertical objects rendering and tuning (man_made=tower types, man_made=chimney, man_made=communications_tower)
- tourism=information types rendering and tuning (information=audioguide, board, guidepost, map, office, tactile_map, tactile_model and terminal)
- Added rendering for place=quarter
- Added rendering of historic=city_gate
- Added rendering of lock_name
- Ditch and drain name labels are rendered with some offset
- Pixel aligned ford icon
- Made amenity=shelter icon brown
- Finer man_made=pier width rendering
- Rendering living street tunnels different from residential
- Added rendering of overground power=cable like power=line
- Small documentation and code fixes
## [v4.11.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.10.0...v4.11.0) - 2018-05-11
### Changes
- Fixed office/amenity conflict
- Brightened built-up areas on z12
- Refurbished natural=spring icon
- Added rendering for amenity=police and amenity=fire_station areas
- Added rendering of amenity=nursing_home
- Added rendering of amenity=childcare
- Added rendering of amenity=driving_school
- Added area rendering for amenity=bus_station
- Added area rendering of amenity=taxi
- Made highway=traffic_signals icon less obtrusive
- Moved barriers to higher zoom level
- Hiding railway=platform with location=underground, tunnels and covered=yes
- Small documentation and code fixes
## [v4.10.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.9.0...v4.10.0) - 2018-04-20
### Changes
- Adding rendering for historic=castle and historic=manor
- Adding rendering office=* as dots + names
- Adding rendering for waterway=waterfall
- Adding place=square name rendering for nodes
- Adding rendering for big natural=bay
- Adding rendering for leisure=beach_resort
- Adding rendering for amenity=parking_space
- Adding rendering of aerialway=zip_line
- Adding rendering for shop=bed
- Adding rendering for shop=video_games
- Adding halo to roads on z6 and z7
- Extending intermittent waterbody rendering to landuse=basin
- Moving highway=mini_roundabout rendering to higher zoom level
- Dropping waterway=derelict_canal rendering
- Small documentation and code fixes
## [v4.9.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.8.0...v4.9.0) - 2018-03-23
### Major changes
- A bug where closed ways with natural=cliff or natural=tree_row were not rendering has been fixed. This required fixing a transform bug. The fix will apply to all objects when they are created in OSM, but there is no migration for existing databases. Deployments will have to decide if the effects are serious enough to require them to reload the database.
### Changes
- Adding place=square name rendering
- Adding rendering for different types of towers and masts
- Making gardens to use grass color with plant nursery pattern
- Adding rendering for intermittent water bodies
- Give oceans outline and simplify shapefiles on z0-7
- Simplify (generalize) admin borders
- Move natural=grassland and landuse=meadow earlier
- Start rendering aerialway name
- Adding icons for amenity=bbq, amenity=shower, leisure=sauna and advertising=column
- Adding special icons for shop=dairy, shop=medical_supply and shop=music
- Move amenity=toilets to higher zoom levels
- Fixing some SVG icons artifacts
- Make military=danger_area font dark pink and slanted
- Changing rendering for construction=steps to distinguish it from roads
- Changing label colour of private parking
- Small documentation and code fixes
## [v4.8.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.7.0...v4.8.0) - 2018-02-23
### Changes
- Made military area rendering less prominent
- Adding rendering for historic=wayside_shrine
- Adding rendering for historic=fort
- Adding rendering for amenity=public_bath
- Adding rendering for shop=chocolate
- Adding rendering for barrier=toll_booth (nodes)
- Adding rendering barrier=log
- Adding rendering for amenity=waste_disposal
- Moving tourism-boundary under barrier layer
- Docker: run osm2pgsql in slim mode
- Fix operator precedence for hstore queries
- Small documentation fixes
## [v4.7.1](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.7.0...v4.7.1) - 2018-01-31
### Changes
- Fix rendering bug (#3043) with access=yes|permissive tags
## [v4.7.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.6.0...v4.7.0) - 2018-01-26
### Changes
- Adding icon for tourism=apartment
- Adding icon for leisure=firepit
- Yellow background for amenity=arts_centre
- Start rendering natural=heath earlier
- Start rendering entrances
- Changing tourism=picnic_site icon colour to green
- Move emergency=phone to higher zoom level
- Rendering seasonal waterways as intermittent
- Update Noto fonts to Phase III
- Fine-tuning of bridge labels
- Documentation changes and updates
## [v4.6.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.5.0...v4.6.0) - 2017-12-17
### Changes
- Change sports_centre and stadium color to light green
- Change shades of green for landuse/leisure=recreation_ground and garden
- Do not render glaciers and icesheets on z6 and z7
- Do not render very small water areas on low zoom
- Do not render small national parks and nature reserves
- Do not render ferries on z7
- Improve rendering for bus guideways
- For built-up areas, replace the external data on z8 and z9 by OSM data
- Do not render bicycle/motorbike parking icons to z17
- Render community_centre and social_facility areas in light yellow
## [v4.5.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.4.0...v4.5.0) - 2017-11-17
### Major changes
- Cleaning up low zoom levels (z5-z7):
- Rendering roads from z6 instead of z5
- Rendering national parks from z8 instead of z7
- Rendering railways from z8 instead of z7
- Changing parking color from yellow to gray
### Changes
- Unified rendering of leisure=fitness_station and leisure=fitness_centre
- Rendering of military=bunker
- Rendering all station buildings as major buildings
- Text wrapping for station labels
- Changing windmill color from amenity brown to man_made gray
- Some other documentation and code changes
## [v4.4.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.3.0...v4.4.0) - 2017-10-20
### Major changes
- Rendering inland water areas and labels from z0
- Rendering island and islet labels earlier
### Changes
- Rendering of amenity=marketplace
- Rendering of landuse=religious
- Rendering shop=pastry like shop=confectionery
- Rendering of addr:unit
- Rendering natural=bare_rock earlier
- Rendering elevation also on polygon alpine_hut and shelter
- Introducing Noto Sans Arabic
- Rendering icon for slipway ways
- Better minimal distance between housenumbers
- Moving aeroways to their own layer
- Creating amenity POI categories
- Some other documentation and code cleaning
## [v4.3.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.2.0...v4.3.0) - 2017-09-16
### Changes
- Moving ford and emergency phone to a new tagging scheme
- Moving natural=tree to higher zoom level (z18+)
- Changing embassy color to brown
- Rendering name for waterway=dock
- The same line wrap of amenities for all zoom levels
- Fixing combined railway/highway ordering regression
- Fixing line wrapping bug in Docker
- Some documentation and code cleaning
- Improve ferry line text legibility
- Hide small theme parks and zoos
- Use solid lines for admin borders at low zooms
## [v4.2.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.1.0...v4.2.0) - 2017-08-25
### Major changes
- Water color and default water text color are changed to be more visible
- Medium zoom level (z8-z12) rework:
- Landuses colors are faded and some of them are visible earlier
- Most of the man related landuses are combined into one color and more visible
- More important roads are better legible
### Changes
- Leaf type rendering in woods and forests
- Cemetary symbols are not so dense now and muslim cemetary has its own symbol
- Rendering of amenity=ferry_terminal
- Plaque rendering is now different and moved to z19
- Rendering railway labels
- Smaller line spaces in labels
- Junction names on areas
- Area color for railway=station is the same as for railways
- Database perfomance tuning available for Docker
- Different patterns and all remaining icons moved to SVG
- Some documentation and code cleaning
## [v4.1.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v4.0.0...v4.1.0) - 2017-07-30
### Changes
- Malls are no longer rendered as dots (bug fix)
- Special icon for shop=tyres
- Airports rendering changes: removing clutter on z10 and moving name labels under the icon
- Switching forest, scrub and quarry patterns to SVG
- Introducing easy to use Docker-based development environment
- New version of script get-shapefiles.py
- Small code and documentation improvements
## [v4.0.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v3.3.0...v4.0.0) - 2017-05-22
### Major changes
- The database schema has changed from the osm2pgsql default. This requires a database reload.
- osm2pgsql Lua transforms are used for some preprocessing. This requires osm2pgsql built with lua support, which most versions will have.
### Changes
- Old-style multipolygons (those with tags on the outer way instead of the relation) are no longer supported
- Multipolygons composed of multiple areas are now rendered with one label
- Fixes to various problems determining if an object is an area or not
- CartoCSS 0.18.0 is required
## [v3.3.1](https://github.com/gravitystorm/openstreetmap-carto/compare/v3.3.0...v3.3.1) - 2017-05-22
### Changes
- Fix a regression in intermittent waterways
## [v3.3.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v3.2.0...v3.3.0) - 2017-05-10
### Changes
- Most shops are now rendered as dots z17 to deal with overcrowding
- Font selection is moved to its own file to make customization easier, and to make it easier for other styles to reuse our font work
- Rare CJK characters outside the BMP should now render better
- Waterway tunnels in forests and lakes are clearer
## [v3.2.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v3.1.0...v3.2.0) - 2017-04-17
### Changes
- Render aeroway terminal buildings like other buildings
- Removed rendering of `landuse=farm`
- Added rendering for arts centre, fitness centre, plant nursery, mixed lift aerialways
- Rendering for fens changed
- Typography for point road-related features, addresses, and water features changed
- Removed rendering of `waterway=canal` as an area
- Take text properties of roads under construction from the type of road they will be
## [v3.1.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v3.0.1...v3.1.0) - 2017-01-28
### Changes
- Added coffee shop rendering
- Added health clinic rendering
- Adjusted place label typography
- Road shield rendering improvements
- Internal code cleanups
## [v3.0.1](https://github.com/gravitystorm/openstreetmap-carto/compare/v3.0.0...v3.0.1) - 2016-12-22
### Changes
- Revert of junction area changes which were preventing index usage
## [v3.0.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v2.45.1...v3.0.0) - 2016-12-21
### Major Changes
- Mapnik 3 is now required
- CartoCSS 0.16.x is now required
- Official Tilemill support is dropped
- Shapefiles are downloaded with a new python script
### Changes
- Noto Naskh is now used for Arabic
- Visual impact of campsites and quarries reduced below z13
- Wilderness huts rendered
- "ref" (reference) text of subway entrances rendered
## [v2.45.1](https://github.com/gravitystorm/openstreetmap-carto/compare/v2.45.0...v2.45.1) - 2016-12-03
### Changes
- Bug fix for tobacco shop and memorial icons
## [v2.45.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v2.44.1...v2.45.0) - 2016-11-28
### Changes
- Render all shops without a specific icon as a dot, not just a whitelist
- Scrub pattern change to random
- Change pitch and track color
- Railway stations rendering as major buildings
- Rendering the name of man_made=bridge inside the polygon
- Documentation updates (including cartography design goals and icon design guidelines)
- Icons general code cleaning
- Various bug fixes
## [v2.44.1](https://github.com/gravitystorm/openstreetmap-carto/compare/v2.44.0...v2.44.1) - 2016-10-12
### Changes
- Bug fixes to low zoom place rendering changes
- Documentation improvements for fonts and non-latin rendering
## [v2.44.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v2.43.0...v2.44.0) - 2016-09-26
### Major Changes
- Rendering of restricted access roads and paths significantly changed
- Changed to use Noto fonts for all languages
### Dependency Changes
- The fonts required have changed
### Changes
- A code of conduct adopted, based on the Go code of conduct
- Adjustments to city wall rendering
- Revised low zoom place rendering
- Fixed oneway arrows on unnamed roads
- Render both house name and number if address has both
## [v2.43.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v2.42.0...v2.43.0) - 2016-09-05
### Changes
- Adjust alotments pattern
- Whitespace cleanups of code
- Adjust colours of dog parks and construction sites
- Increase font size of addresses
- Fix combination of long names and oneway arrows
## [v2.42.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v2.41.0...v2.42.0) - 2016-08-03
### Changes
- Add rendering of `amenity=charging_station` and `tourism=artwork`
- Change icon of `shop=department_store`
- Increase font size for various labels
- Change playground color
- Various bug fixes
## [v2.41.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v2.40.0...v2.41.0) - 2016-07-13
### Changes
- More consistent fonts for POI labels
- Less saturated stadiums
- Rendering obelisks and dog parks
- An updated list of font packages
- Cleaning up the font list
- Rewriting the road colours script for easier changes
- Various bug fixes
### New contributors
- @jdhoek
## [v2.40.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v2.39.0...v2.40.0) - 2016-06-21
### Changes
- More consistent size of icon labels (bigger labels in most cases).
- Changed rendering of power lines on low zoom levels.
- Changed rendering of turning circles.
- Changed icon for libraries and book shops.
- Larger labels for place names.
- Various bug fixes.
## [v2.39.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v2.38.0...v2.39.0) - 2016-03-02
### Changes
- Render swing gates
- More SVG icons
## [v2.38.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v2.37.0...v2.38.0) - 2016-02-17
### Changes
- Add rendering for natural=shoal, and natural=reef.
- Change of rendering of linear barriers: keep rendering of barrier
types `chain`, `city_wall`, `embankment`, `ditch`, `fence`, `guard_rail`,
`handrail`, `hedge`, `kerb`, `retaining_wall`, and `wall`, and drop rendering of
all other barrier types.
- Add rendering for social facilities.
- New icon for sports shops.
- Changed rendering of cutlines.
- Changed rendering for beach surfaces: add rendering for
`surface=fine_gravel`, `surface=pebbles`, and `surface=pebblestone`; drop
rendering for `surface=peeples`
- Various other bug fixes and minor improvements.
## [v2.37.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v2.36.0...v2.37.0) - 2015-11-30
### Changes
- Improved admin boundaries and labels on low zoom levels
- New farmland colour, making farmland less prominent
- New icons for `shop=copyshop` and `shop=beverages`
- Some refinements to the road rendering, based on the feedback we
received on this topic. In particular, roads are now rendered slightly
narrower on z13, z18 and z19.
- Various other bug fixes and minor improvements.
## [v2.36.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v2.35.0...v2.36.0) - 2015-10-30
### Major Changes
Major rewrite of road and railway rendering, as part of Mateusz Konieczny's Google Summer of Code project. See https://blog.openstreetmap.org/2015/10/30/openstreetmap-org-map-changing/
for more information.
### Changes
- Added rendering of the following tags:
- `amenity=fountain`
- `amenity=car_wash`
- `historic=wayside_cross` and `man_made=cross`
- `shop=bag`
- `shop=outdoor`
- `power=plant` (labels)
- Changed rendering of the following objects:
- Placenames (new algorithm for deciding what placenames to render
on low zoomlevels)
- Road shields
- Oneway arrows
- Glaciers
- Marina labels
- Station labels
- Dropped rendering of the following tags:
- `amenity=car_sharing` (not relevant for the general public)
- `shop=antique` (use `shop=antiques`)
- `shop=betting` (use `shop=lottery` or `shop=bookmaker`)
- `shop=delicatessen` (use `shop=deli`)
- `shop=dive` (use `shop=scuba_diving`)
- `shop=fish` (use `shop=seafood`, `shop=pet`, `shop=angling` or `amenity=fast_food`)
- `shop=gambling` (use `shop=lottery`, `shop=bookmaker`, or
`leisure=adult_gaming_centre`)
- `shop=insurance` (use `office=insurance`)
- `shop=pharmacy` (use `office=pharmacy`)
- `shop=bags` (use `shop=bag`)
- Various other bug fixes and minor improvements.
## [v2.35.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v2.34.0...v2.35.0) - 2015-09-16
### Changes
- Add new icon for ford
- Stop rendering of `landuse=conservation`
- Restore rendering of `amenity=kindergarten/school/college/university/grave_yard` names
- Various other bug fixes.
## [v2.34.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v2.33.0...v2.34.0) - 2015-08-28
### Changes
Changes include
- better rendering for highway=path/footway/cycleway - this is the
next iteration of improving how footways and cycleways are
displayed. Unpaved footways are now visible on natural=bare_rock
and there are now three classes: paved, unpaved and unknown surface
- `man_made=bridge` is now rendered
- new rendering for `landuse=quarry`
- `amenity=veterinary` is now rendered
- `amenity=community_centre` is now rendered
- `amenity=prison` and `landuse=military` rendering takes in account area size
- consistent color for boundaries
- tweaked zoom level for `amenity=car_sharing` and `amenity=car_rental`
- Mapnik 3 preparations are now finished. The style now supports Mapnik 3. Most of the work was done on the Mapnik side.
## [v2.33.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v2.32.0...v2.33.0) - 2015-08-14
### Major changes
- A randomized symbology for forests for `natural=wood` and `landuse=forest`
A long time in the works, this improvement has finally landed. The two
tags were merged - they are indistinguishable to the data consumer.
A randomized symbology was first suggested by SK53 at SOTM-EU 2014,
and this feature would not have happened without his extensive research,
or imagico's tools for creating an irregular but uniformly distributed
and periodic dot pattern
- Unification of footway/path and rendering surface of them
The mess that is highway=path is well-known, and it is necessary
to do some kind of processing as a data consumer. A distinction is
now made between paved and unpaved footways.
### Changes
- Mapnik 3 preperations
The style is not yet fullly tested with Mapnik 3 and we don't claim to
support it, but several bugs were fixed. Most of the work was done on
the Mapnik side
- Power area colour adjusted
## [v2.32.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v2.31.0...v2.32.0) - 2015-07-31
# New files
Shapefiles are now used for Antartic ice sheets
### Changes
- Rendering minor roads and service rail later for mid-zoom clarity
As all residential, unclassified, and service roads in a city became
mapped the rendered view became over-crowded, bloblike, and difficult
to read.
- Rendering of Antartic ice sheets from shapefiles
Ice sheets in Antartica are a bit of a special case, and pre-generated
shapefiles are now used
- No longer rendering proposed roads
- Better place label order
- meadow/grassland and orchard/vineyard color unification
- Render educational area borders later
- New POI icons
openstreetmap-carto-5.8.0/CODE_OF_CONDUCT.md 0000664 0000000 0000000 00000012750 14530664656 0020343 0 ustar 00root root 0000000 0000000 # OpenStreetMap Carto Community Code of Conduct
## Why have a Code of Conduct?
Online communities include people from many different backgrounds. The OpenStreetMap Carto contributors are committed to providing a friendly, safe and welcoming environment for all, regardless of age, disability, gender, nationality, ethnicity, religion, sexuality, or similar personal characteristic.
The first goal of the Code of Conduct is to specify a baseline standard of behavior so that people with different social values and communication styles can talk about OpenStreetMap Carto effectively, productively, and respectfully.
The second goal is to provide a mechanism for resolving conflicts in the community when they arise.
The third goal of the Code of Conduct is to make our community welcoming to people from different backgrounds. Diversity is critical to the project; for OpenStreetMap Carto to be successful, it needs contributors and users from all backgrounds.
With that said, a healthy community must allow for disagreement and debate. The Code of Conduct is not a mechanism for people to silence others with whom they disagree.
## Where does the Code of Conduct apply?
If you participate in or contribute to the OpenStreetMap Carto ecosystem in any way, you are encouraged to follow the Code of Conduct while doing so.
Explicit enforcement of the Code of Conduct applies to the OpenStreetMap Carto GitHub project and code reviews.
## Values
These are the values to which people in the OpenStreetMap Carto should aspire.
- Be friendly and welcoming
- Be patient
- Remember that people have varying communication styles and that not everyone is using their native language. (Meaning and tone can be lost in translation.)
- Be thoughtful
- Productive communication requires effort. Think about how your words will be interpreted.
- Remember that sometimes it is best to refrain entirely from commenting.
- Be respectful
- In particular, respect differences of opinion.
- Be charitable
- Interpret the arguments of others in good faith, do not seek to disagree.
- When we do disagree, try to understand why.
- Avoid destructive behavior:
- Derailing: stay on topic; if you want to talk about something else, start a new conversation.
- Unconstructive criticism: don't merely decry the current state of affairs; offer—or at least solicit—suggestions as to how things may be improved.
- Snarking (pithy, unproductive, sniping comments)
- Discussing potentially offensive or sensitive issues unless directly technically relevant; this all too often leads to unnecessary conflict.
- Microaggressions: brief and commonplace verbal, behavioral and environmental indignities that communicate hostile, derogatory or negative slights and insults to a person or group.
People are complicated. You should expect to be misunderstood and to misunderstand others; when this inevitably occurs, resist the urge to be defensive or assign blame. Try not to take offense where no offense was intended. Give people the benefit of the doubt. Even if the intent was to provoke, do not rise to it. It is the responsibility of *all parties* to de-escalate conflict when it arises.
## Unwelcome behavior
These actions are explicitly forbidden in OpenStreetMap Carto spaces:
- Insulting, demeaning, hateful, or threatening remarks.
- Discrimination based on age, disability, gender, nationality, ethnicity, religion, sexuality, or similar personal characteristic.
- Bullying or systematic harassment.
- Revealing private information about other participants without explicit permission ("doxxing").
- Unwelcome sexual advances.
- Incitement to any of these.
## Moderation
The OpenStreetMap Carto spaces are not free speech venues; they are for discussion about OpenStreetMap Carto.
When using the OpenStreetMap Carto spaces you should act in the spirit of the values. If you conduct yourself in a way that is explicitly forbidden by the CoC, you will be warned and asked to stop. If you do not stop, you will be removed from our community spaces temporarily. Repeated, willful breaches of the CoC will result in a permanent ban.
## Reporting issues
The OpenStreetMap Carto maintainers are responsible for handling conduct-related issues. Their goal is to de-escalate conflicts and try to resolve issues to the satisfaction of all parties.
If you encounter a conduct-related issue, you should report it to the maintainers by sending them [all an email](mailto:openstreetmap-carto@gravitystorm.co.uk,osm@paulnorman.ca,chris_hormann@gmx.de,daniel@xn--ko-wla.pl,sommerluk@gmail.com,joseph.eisenberg@gmail.com). In the event that you wish to make a complaint against a maintainer, you may instead contact the other maintainers.
**Note that the goal of the Code of Conduct and the maintainers is to resolve conflicts in the most harmonious way possible.** We hope that in most cases issues may be resolved through polite discussion and mutual agreement. Bans and other forceful measures are to be employed only as a last resort.
Changes to the Code of Conduct should be proposed as pull requests.
## Summary
- Treat everyone with respect and kindness.
- Be thoughtful in how you communicate.
- Don’t be destructive or inflammatory.
- If you encounter an issue, please mail the maintainers.
## Acknowledgements
This document is based on the [Go Community Code of Conduct](https://go.dev/conduct), which in turn has parts derived from the Code of Conduct documents of the Django, FreeBSD, and Rust projects.
This documented is licensed under the Creative Commons Attribution 3.0 License.
openstreetmap-carto-5.8.0/CONTRIBUTING.md 0000664 0000000 0000000 00000020255 14530664656 0017774 0 ustar 00root root 0000000 0000000 # OpenStreetMap Carto contribution guidelines
## Reporting issues
As OpenStreetMap data is always changing, rendering bug reports should **always**
contain a cropped screenshot of the problem, and a link to the area. Don't assume
that we will see exactly what you see. If a particular OSM object is an issue,
the issue should contain the tagging of the object.
## Workflow
We operate the "Fork & Pull" model explained at
https://help.github.com/articles/about-pull-requests/
You should fork the project into your own repo, create a topic branch
there and then make one or more pull requests back to the gravitystorm repository.
Your pull requests will then be reviewed and discussed.
Pull requests that change the cartography should contain a few images selected
to show the changes. The easiest way to make these is by taking screenshots and
cropping them, then pasting them into the issue. Avoid adding an overwhelming
number of screenshots.
The images are not intended to replace reviewing changes in Kosmtik or TileMill,
but to provide an overview.
### Previews
Some changes benefit from a review over a wider area and many zooms, where static
images might not be sufficient and a demo layer is necessary. pnorman has a server
which can host layers and has some data from parts of the world loaded. Before
requesting this in a pull request, make sure that it is in a stable condition.
## Easy pickings
Some [easy issues](https://github.com/gravitystorm/openstreetmap-carto/labels/good%20first%20issue) have been selected
that are particularly suitable for new contributors to get familiar with the project's code base and the contribution process.
## Editing layers
OpenStreetMap Carto uses a YAML file for defining layers, because it [works much
better for big projects](https://github.com/gravitystorm/openstreetmap-carto/issues/711).
This requires CartoCSS 0.18.0 or later. If you need JSON MML, you can generate it
with `python -c 'import sys, yaml, json; json.dump(yaml.safe_load(sys.stdin), sys.stdout)' < project.mml > project.json`
or the equivalent in a different language.
[Kosmtik](https://github.com/kosmtik/kosmtik) and CartoCSS can directly load the project from
the YAML file with `node index.js serve path/to/openstreetmap-carto/project.mml`
## CartoCSS style guidelines
* Always specify zoom levels as either >= or < . Don't use = or =< or >
* Open curly braces on the same line, and close on an empty line.
* One space before and after = etc
* Two space indents. No tabs.
* space after : but not before
* Dashes, not underscores, in layer names
* Avoid restating defaults, e.g. don't add `point-allow-overlap = false`. Where
Mapnik 2.x and 3.0 have different defaults, they should be stated
* Avoid repeating the layer name for layers with multiple attachments, i.e., prefer
```mss
#layer {
::outline {
line-width: 6;
line-color: black;
}
::inline {
line-width: 2;
line-color: white;
}
}
```
instead of
```mss
#layer::outline {
line-width: 6;
line-color: black;
}
#layer::inline {
line-width: 2;
line-color: white;
}
```
* Order the selectors in a style-sheet in rough order of importance (i.e.,
`highway=primary`, then `highway=secondary`) and beyond that, add layers that
are rendered later (i.e., higher) lower in the file.
* For features where the symbolizer attributes change on different zoom levels,
the main definition should be for the lowest zoom level. Also, avoid nesting
zoom-based overrides. For example:
```mss
#layer[feature = 'foo'][zoom >= 13] {
line-width: 6;
line-color: black;
[zoom >= 15] {
line-width: 7;
}
[zoom >= 17] {
line-width: 10;
}
}
```
instead of
```mss
#layer[feature = 'foo'][zoom >= 13] {
line-width: 10;
line-color: black;
[zoom < 18] {
line-width: 7;
[zoom < 16] {
line-width: 6;
}
}
}
```
## SQL style guidelines
Because SQL within JSON or YAML will not generally be syntax highlighted, indentation and caps are particularly important.
* SQL keywords in caps, as in PostgreSQL documentation
* Two space indents. No tabs.
* Start with `(SELECT` and start the columns on the next line.
* Two indents for columns, to bring them to the same indent level as later clause contents
* Add indentation after `SELECT`s until the end of the sub-select.
* Add indentation for contents of `FROM`, `WHERE`, `ORDER BY` and other clauses
* Put content with WHERE, etc if it's short
* Add indentation if necessary for complex function calls, WHERE parentheses, and CASE statements
* One space before and after = etc
* Name SQL subqueries after the layer name (but use underscores)
* When extracting tags from hstore, use `tags->'foo'`, not `tags -> 'foo'`, and only add parentheses if needed for order of operations
* Hstore queries tested for NULL should be enclosed in parentheses, e.g. `(tags->'foo') IS NULL`.
* To check if a tag is in the tags hstore, use `tags @> 'foo=>bar'`, relying on automatic conversion from `text` to `hstore`.
## Map icon guidelines
* All new icons must be SVG format only. The SVG must be saved as standards compliant SVG without any proprietary tags. In Inkscape software, you will need to "Save As..." and choose the format Optimized SVG (preferable) or Plain SVG.
* Icons must use SVG fills only, not SVG strokes or any feature Mapnik does not support.
* Use no color for the icon's fill if the icon is monochromatic. This allows the color to be set in the MSS.
* Use a common canvas size, which is usually 14x14 px.
* Convert shapes and other components to paths and merge them into a compound path.
* Draw a simple siloutte of the subject with an "on the shelf" perspective.
* Align vectors to the pixel grid.
* Make a clean design, so reduced complexity where possible.
### External icon design resources
The project's goals and design philsophy are different from other projects, but some external resources with general information about icon design are:
* [Maki Icons Design Guidelines](https://labs.mapbox.com/maki-icons/guidelines/)
* [GNOME Icon Design Guildelines](https://developer.gnome.org/hig/guidelines/ui-icons.html)
## Typography
This style uses the font "Noto" for a world-wide coverage of scripts. The font
size should be ≥ 10 (legibility).
### Multi-line labels
Additional to text-size we have to set text-wrap-width and text-line-spacing.
For both, the absolute value is quite meaningless; it should rather be
interpreted relative to the font size (em) that has been set in “text-size”:
```mss
text-size: 10;
text-wrap-width: 30; // 3.0 em
text-line-spacing: -1.5; // -0.15 em
```
- The text-size is 10, so we have: 1 em = 10
- The text-wrap-width should be 3.0 em, so we have: 3.0 * 10 = 30
- The text-line-spacing should be -0.15 em, so we have: -0.15 * 10 = -1.5
If text-size increases on higher zoom levels the other parameters also have
to be adjusted to guarantee the same line wrap and same relative line spacing:
```mss
text-size: 12;
text-wrap-width: 36; // 3.0 em
text-line-spacing: -1.8; // -0.15 em
```
Usually, with higher zoom levels we increase the line length
(text-wrap-width measured in em!).
Following an old typography convention, we use narrow
line spacing for short lines and wider line spacing for longer lines.
```mss
text-size: 15;
text-wrap-width: 75; // 5.0 em
text-line-spacing: -0.75; // -0.05 em
```
Noto’s line spacing is rather large to allow also tall scripts like Myanmar
to be rendered without collisions. But the line spacing is too large for
cartographic usage; therefore we reduce the line spacing. Currently, the
line spacing ranges from -0.15 em to -0.05 em. (Even at -0.15 em, collisions
are seldom and even then the text stays legible).
## Syntax highlighting
Most of the style development happens within CartoCSS MSS and MML files. Syntax highlighting can make editing more pleasant.
Editors based on KDE Frameworks (Kate, KWrite, KDevelop…) provide syntax highlighting for CartoCSS MSS out-of-the-box, and starting with KF 5.100 also for CartoCSS MML including SQL highlighting within the YAML structure.
Also, Yohan Boniface [has developed](https://github.com/yohanboniface/carto-atom) highlighting for CartoCSS MSS for editors that use the TextMate Language Grammar for syntax highlighting: Atom (install package “language-carto”), Visual Studio Code, Jetbrains…
openstreetmap-carto-5.8.0/DOCKER.md 0000664 0000000 0000000 00000025516 14530664656 0017041 0 ustar 00root root 0000000 0000000 # Running OpenStreetMap Carto with Docker
[Docker](https://www.docker.com/) is a virtualized environment running a [_Docker daemon_](https://docs.docker.com/get-started/overview/), in which you can run software without altering your host system permanently. The software components run in _containers_ that are easy to setup and tear down individually. The Docker demon can use operating-system-level virtualization (Linux, Windows) or a virtual machine (macOS, Windows).
This enables easily setting up a development environment for OpenStreetMap Carto. Specifically, this environment consists of a
PostgreSQL database to store the OpenStreetMap data and [Kosmtik](https://github.com/kosmtik/kosmtik) for previewing the style.
## Prerequisites
* Docker is available for Linux, macOS and Windows. [Install](https://www.docker.com/products/docker-desktop/) the software packaged for your host system in order
to be able to run Docker containers. You also need Docker Compose, which should be available once you install
Docker itself. Otherwise, you need to [install Docker Compose manually](https://docs.docker.com/compose/install/).
* You need sufficient disk space of _several Gigabytes_.
* Docker creates a disk image for its virtual machine that holds the virtualised operating system and the containers.
* The format (Docker.raw, Docker.qcow2, \*.vhdx, etc.) depends on the host system. It can be a sparse file allocating large amounts of disk space, but still the physical size starts with 2-3 GB for the virtual OS and grows to 6-7 GB when filled with the containers needed for the database, Kosmtik, and a chosen small region of OSM data.
* An additional 1-2 GB are needed for shapefiles to be downloaded and stored in the openstreetmap-carto/data repository.
## Quick start
If you are eager to get started, here is an overview over the necessary steps:
* `git clone https://github.com/gravitystorm/openstreetmap-carto.git` to clone openstreetmap-carto repository into a directory on your host system
* Download OpenStreetMap data in osm.pbf format to a file `data.osm.pbf` and place it within the openstreetmap-carto directory (for example some small area from [Geofabrik](https://download.geofabrik.de/))
* If necessary, `sudo service postgresql stop` to make sure you don't have a currently-running native PostgreSQL server which would conflict with Docker's PostgreSQL server.
* `docker-compose up import` to import the data (only necessary the first time or when you change the data file). Additionally, you can set import options through [environment variables](#Importing-data). More on that [later](#Hands-on-approach)
* `docker-compose up kosmtik` to run the style preview application
* Browse to [http://127.0.0.1:6789](http://127.0.0.1:6789) to view the output of Kosmtik
* Ctrl+C to stop the style preview application
* `docker-compose stop db` to stop the database container
## Repositories
The instructions above will clone the main OpenStreetMap Carto repository. To test your own changes, you should [fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) gravitystorm/openstreetmap-carto repository and [clone your fork](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository).
This OpenStreetMap Carto repository needs to be a directory that is shared between your host system and the Docker virtual machine. Home directories are shared by default; if your repository is in another place you need to add this to the Docker sharing list (e.g. macOS: Docker Preferences > File Sharing; Windows: Docker Settings > Shared Drives).
## Importing data
OpenStreetMap Carto needs a database populated with rendering data to work. You first need a data file to import.
For testing purposes, it's probably easiest to grab a PBF export of OSM data from [Geofabrik](https://download.geofabrik.de
Once you have that file put it into the openstreetmap-carto directory and run `docker-compose up import` in the openstreetmap-carto directory.
This starts the PostgreSQL container (downloads it if it not exists) and starts a container that runs [osm2pgsql](https://github.com/openstreetmap/osm2pgsql) to import the data. The container is built the first time you run that command if it not exists.
At startup of the container the script `scripts/docker-startup.sh` is invoked which prepares the database and itself starts osm2pgsql for importing the data. Then the `scripts/get-external-data.py` is called to download and import needed shapefiles.
### Supplying command line options as environment variables
**osm2pgsql** has a few [command line options](https://manpages.debian.org/testing/osm2pgsql/osm2pgsql.1.en.html) and the import by default uses a RAM cache of 512 MB, 1 worker, **and expects the import file to be named `data.osm.pbf`**.
If you want to customize any of these parameters, you have to set any number of the following environment variables:
* `OSM2PGSQL_CACHE` (e.g. `export OSM2PGSQL_CACHE=1024` on Linux to set the cache to 1 GB) for the RAM cache (the value depends on the amount of RAM you have available - the more you can use here the faster the import may be)
* `OSM2PGSQL_NUMPROC` for the number of workers (this depends on the number of processors you have and whether your hard disk is fast enough e.g. is a SSD)
* `OSM2PGSQL_DATAFILE` if your file has a different name
You can also [tune the **PostgreSQL**](https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server) during the import phases, with `PG_WORK_MEM` (default to 16MB) and `PG_MAINTENANCE_WORK_MEM` (default to 256MB), which will eventually write `work_mem` and `maintenance_work_mem` to the `postgresql.auto.conf` once, making them applied each time the database started. Note that unlike osm2pgsql variables, once thay are set, you can only change them by running `ALTER SYSTEM` on your own, changing `postgresql.auto.conf` or remove the database volume by `docker-compose down -v && docker-compose rm -v` and import again.
**get-external-data.py script** has option `-C (--cache)` to save data after download (useful when you are tinkering with docker and ending up deleting volumes).
It also has option `--no-update` to stop program from downloading newer versions of shapefiles if you don't deem updating them necessary. Best used in conjunction with `-C`.
If everything goes out of the window, option `--force` will forcefully download data and import it. Option `--force-import` will try to force just import part.
Use `EXTERNAL_DATA_SCRIPT_FLAGS` env variable to pass those options. For example:
```
EXTERNAL_DATA_SCRIPT_FLAGS="--cache --no-update"
```
will keep data you downloaded and not update them (saving you on bandwidth) until you change this options.
### Hands on approach
If you want to customize and remember the values, supply it during your first import:
```
PG_WORK_MEM=128MB PG_MAINTENANCE_WORK_MEM=2GB \
OSM2PGSQL_CACHE=2048 OSM2PGSQL_NUMPROC=4 \
OSM2PGSQL_DATAFILE=taiwan.osm.pbf \
EXTERNAL_DATA_SCRIPT_FLAGS="--cache --no-update" \
docker-compose up import
```
Note that on Linux you need to export those environment variables before calling docker-compose. If you are using sudo to call docker (because your user is not in the docker group (which we don't recommend)), you need to also use sudo -E option
Variables will be remembered in `.env` if you don't have that file, and values in the file will be applied unless you manually assign them. Keep in mind this means if you change your `.env` file, but keep your environment variables untouched (you haven't unset them or you haven't rebooted your host), they will be used instead of anything that you changed in `.env`.
Depending on your machine and the size of the extract the import can take a while. When it is finished you should have the data necessary to render it with OpenStreetMap Carto.
## Test rendering
After you have the necessary data available you can start Kosmtik to produce a test rendering. To do that, run `docker-compose up kosmtik` in the openstreetmap-carto directory. This starts a container with Kosmtik and also starts the PostgreSQL database container if it is not already running. The Kosmtik container is built the first time you run the command if it does not yet exist.
When the container starts, the script `scripts/docker-startup.sh` is invoked, which downloads supplemental shapefiles specified in `scripts/get-external-data.py` (if they are not already present). Afterward, it runs the Kosmtik server. If you have to customize anything, you can do so in the script. The Kosmtik config file can be found in `.kosmtik-config.yml`.
If you want to have a [local configuration](https://github.com/kosmtik/kosmtik#local-config) for your `project.mml`, you can place a `localconfig.js` or `localconfig.json` file into the openstreetmap-carto directory.
The shapefile data that is downloaded is owned by the user with UID 1000. If you have another default user id on your system, consider changing the line `USER 1000` in the file `Dockerfile`.
After startup is complete you can browse to [http://127.0.0.1:6789](http://127.0.0.1:6789) to use the Kosmtik web tool. You can stop the container by pressing Ctrl+C on the command line used to start the container. If this happens, the PostgreSQL database container is still running (you can check with `docker ps`). If you want to stop the database container as well, you can do so by running `docker-compose stop db` in the openstreetmap-carto directory.
## Troubleshooting
Importing the data needs a substantial amount of RAM in the virtual machine. If you find the import process (Reading in file: data.osm.pbf, Processing) being _killed_ by the Docker demon, exiting with error code 137, increase the Memory assigned to Docker (e.g. macOS: Docker Preferences / Windows: Docker Settings > Advanced > Adjust the computing resources).
Docker copies log files from the virtual machine into the host system, their [location depends on the host OS](https://stackoverflow.com/questions/30969435/where-is-the-docker-daemon-log). E.g. the 'console-ring' appears to be a ringbuffer of the console log, which can help to find reasons for killings.
While installing software in the containers and populating the database, the disk image of the virtual machine grows in size, by Docker allocating more clusters. When the disk on the host system is full (only a few MB remaining), Docker can appear stuck. Watch the system log files of your host system for failed allocations.
Docker stores its disk image by default in the home directory of the user. If you don't have enough space here, you can move the images elsewhere. (E.g. macOS: Docker > Preferences > Disk).
## Style Debugging
When working with the style's database tables after an import, it can be helpful to log in at the [console](https://www.postgresql.org/docs/current/app-psql.html) to inspect the table structure or view imported data. The following command will open a psql console on the database:
```
docker-compose exec -e PGUSER=postgres -e PGDATABASE=gis db psql
```
openstreetmap-carto-5.8.0/Dockerfile 0000664 0000000 0000000 00000002653 14530664656 0017537 0 ustar 00root root 0000000 0000000 FROM ubuntu:focal
# https://serverfault.com/questions/949991/how-to-install-tzdata-on-a-ubuntu-docker-image
ARG DEBIAN_FRONTEND=noninteractive
# Style dependencies
RUN apt-get update && apt-get install --no-install-recommends -y \
ca-certificates curl gnupg postgresql-client python3 python3-distutils \
fonts-hanazono fonts-noto-cjk fonts-noto-hinted fonts-noto-unhinted \
mapnik-utils nodejs npm ttf-unifont unzip git && rm -rf /var/lib/apt/lists/*
# Kosmtik with plugins, forcing prefix to /usr because Ubuntu sets
# npm prefix to /usr/local, which breaks the install
# We install kosmtik not from release channel, but directly from a specific commit on github.
RUN npm set prefix /usr && npm install -g --unsafe-perm "git+https://git@github.com/kosmtik/kosmtik.git"
WORKDIR /usr/lib/node_modules/kosmtik/
RUN kosmtik plugins --install kosmtik-overpass-layer \
--install kosmtik-fetch-remote \
--install kosmtik-overlay \
--install kosmtik-open-in-josm \
--install kosmtik-map-compare \
--install kosmtik-osm-data-overlay \
--install kosmtik-mapnik-reference \
--install kosmtik-geojson-overlay \
&& cp /root/.config/kosmtik.yml /tmp/.kosmtik-config.yml
# Closing section
RUN mkdir -p /openstreetmap-carto
WORKDIR /openstreetmap-carto
USER 1000
CMD sh scripts/docker-startup.sh kosmtik
openstreetmap-carto-5.8.0/Dockerfile.db 0000664 0000000 0000000 00000000157 14530664656 0020120 0 ustar 00root root 0000000 0000000 FROM postgis/postgis:10-2.5-alpine
COPY ./scripts/tune-postgis.sh /docker-entrypoint-initdb.d/tune-postgis.sh
openstreetmap-carto-5.8.0/Dockerfile.import 0000664 0000000 0000000 00000001431 14530664656 0021041 0 ustar 00root root 0000000 0000000 FROM ubuntu:bionic
RUN apt-get update && apt-get install --no-install-recommends -y \
ca-certificates curl gnupg && rm -rf /var/lib/apt/lists/*
RUN echo 'deb http://ppa.launchpad.net/osmadmins/ppa/ubuntu bionic main\n\
deb-src http://ppa.launchpad.net/osmadmins/ppa/ubuntu bionic main' > \
/etc/apt/sources.list.d/osmadmins-ppa.list
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 \
--recv A438A16C88C6BE41CB1616B8D57F48750AC4F2CB
RUN apt-get update && apt-get install --no-install-recommends -y \
osm2pgsql gdal-bin python3-psycopg2 python3-yaml unzip \
python3-requests postgresql-client && rm -rf /var/lib/apt/lists/*
ADD openstreetmap-carto.style /
RUN mkdir -p /openstreetmap-carto
WORKDIR /openstreetmap-carto
CMD sh scripts/docker-startup.sh import
openstreetmap-carto-5.8.0/INSTALL.md 0000664 0000000 0000000 00000013335 14530664656 0017174 0 ustar 00root root 0000000 0000000 # Installation
This document describes how to manually configure your system for running OpenStreetMap Carto. If you prefer quick, platform independent setup for a development environment, without the need to install and configure tools by hand, follow a Docker installation guide in [DOCKER.md](DOCKER.md).
## OpenStreetMap data
You need OpenStreetMap data loaded into a PostGIS database (see below for [dependencies](#dependencies)). These stylesheets expect a database generated with osm2pgsql using the pgsql backend (table names of `planet_osm_point`, etc), the default database name (`gis`), and the [lua transforms](https://osm2pgsql.org/doc/manual.html#lua-tag-transformations) documented in the instructions below.
Start by creating a database
```sh
sudo -u postgres createuser -s $USER
createdb gis
```
Enable PostGIS and hstore extensions with
```sh
psql -d gis -c 'CREATE EXTENSION postgis; CREATE EXTENSION hstore;'
```
Then, grab some OSM data; It's probably easiest to grab an PBF of OSM data from [Geofabrik](https://download.geofabrik.de/). Once you've done that, import with osm2pgsql:
```sh
osm2pgsql -G --hstore --style openstreetmap-carto.style --tag-transform-script openstreetmap-carto.lua -d gis ~/path/to/data.osm.pbf
```
You can find a more detailed guide to setting up a database and loading data with osm2pgsql at [switch2osm.org](https://switch2osm.org/serving-tiles/manually-building-a-tile-server-16-04-2-lts/).
### Disable JIT
We do not recommend [PostgreSQL JIT](https://www.postgresql.org/docs/current/jit-reason.html), which is on by default in PostgreSQL 12 and higher. JIT is benifitial for slow queries where executing the SQL takes substantial time and that time is not spent in function calls. This is not the case for rendering, where most time is spent either fetching from disk, in PostGIS functions, or the query is fast. In theory, the query planner will only use JIT on slower queries, but it is known to get the type of queries map rendering requires wrong.
Disabling JIT is **essential** for use with Kosmtik and other style development tools.
JIT can be disabled with `psql -d gis -c 'ALTER SYSTEM SET jit=off;' -c 'SELECT pg_reload_conf();'` or any other means of adjusting the PostgreSQL config.
### Custom indexes
Custom indexes are required for rendering performance and are essential on full planet databases. These are generated by the `scripts/indexes.py` script, see `scripts/indexes.py --help` for various advanced options, but the command below will work to create the indexes on a new installation:
```sh
psql -d gis -f indexes.sql
```
The indexes can be created in parallel with
```sh
scripts/indexes.py -0 | xargs -0 -P0 -I{} psql -d gis -c "{}"
```
## Scripted download
Some features are rendered using preprocessed shapefiles.
To download them and import them into the database you can run the following script:
```sh
scripts/get-external-data.py
```
The script downloads shapefiles, loads them into the database, and sets up the tables for rendering. Additional script options and corresponding documentation is available by invoking `scripts/get-external-data.py --help`.
## Fonts
The stylesheet uses Noto, an openly licensed font family from Google with support for multiple scripts. The stylesheet uses Noto's "Sans" style where available. If not available, this stylesheet uses another appropriate style from the Noto family. The "UI" version is used where available, as its vertical metrics fit better with Latin text.
Hanazono is used a fallback for seldom used CJK characters that are not covered by Noto.
For more details, see the documentation at [fonts.mss](style/fonts.mss).
To download the fonts, run the following script
```
scripts/get-fonts.sh
```
## Dependencies
For development, a style design studio is needed.
* [Kosmtik](https://github.com/kosmtik/kosmtik) - Kosmtik can be launched with `node index.js serve path/to/openstreetmap-carto/project.mml`
* The 0.0.17 release of Kosmtik is not enough because we need up-to-date CartoCSS and Mapnik versions. To install the current master branch of Kosmtik, you can clone the Kosmtik repository and execute `npm install` within it.
* [TileMill](https://tilemill-project.github.io/tilemill/) is not officially supported, but you may be able to use a recent TileMill version by copying or symlinking the project directly into your Mapbox/project directory.
To display *any* map, a database containing OpenStreetMap data and some utilities are required:
* [PostgreSQL](https://www.postgresql.org/)
* [PostGIS](https://postgis.net/)
* [osm2pgsql](https://github.com/openstreetmap/osm2pgsql#installing) to [import your data](https://switch2osm.org/serving-tiles/updating-as-people-edit/) into a PostGIS database
* Python 3 with the psycopg2, yaml, and requests libraries (`python3-psycopg2`, `python3-yaml`, `python3-requests` packages on Debian-derived systems)
* `ogr2ogr` for loading shapefiles into the database (`gdal-bin` on Debian-derived systems)
### Optional development dependencies
Some colours, SVGs and other files are generated with helper scripts. Not all users will need these dependencies
* Python and Ruby to run helper scripts
* [Color Math](https://github.com/gtaylor/python-colormath) and [numpy](https://numpy.org/) (if running) feature a `generate_road_colors.py` helper script, which may be obtained with `pip install colormath numpy`)
### Additional deployment dependencies
For deployment, CartoCSS and Mapnik are required.
* [CartoCSS](https://github.com/mapbox/carto) >= 1.2.0 *(we're using YAML)*
* [Mapnik](https://github.com/mapnik/mapnik/wiki/Mapnik-Installation) >= 3.0.22
With CartoCSS, these sources are compiled into a Mapnik compatible XML file. When running CartoCSS, specify the Mapnik API version you are using (at least 3.0.22: `carto -a "3.0.22"`).
openstreetmap-carto-5.8.0/LICENSE.txt 0000664 0000000 0000000 00000001411 14530664656 0017357 0 ustar 00root root 0000000 0000000 OpenStreetMap Carto: A global map style for OpenStreetMap maps.
Created by Andy Allan and contributors.
Based on original cartography by Steve Chilton and others.
This software and associated documentation files (the "Software") is
released under the CC0 Public Domain Dedication, version 1.0, as
published by Creative Commons. To the extent possible under law, the
author(s) have dedicated all copyright and related and neighboring
rights to the Software to the public domain worldwide. For avoidance
of doubt, this includes the cartographic design. The Software is
distributed WITHOUT ANY WARRANTY.
If you did not receive a copy of the CC0 Public Domain Dedication
along with the Software, see
openstreetmap-carto-5.8.0/README.md 0000664 0000000 0000000 00000011214 14530664656 0017015 0 ustar 00root root 0000000 0000000 # OpenStreetMap Carto

These are the CartoCSS map stylesheets for the Standard map layer on [OpenStreetMap.org](https://www.openstreetmap.org/).
The general purpose, the cartographic design goals and guidelines for this style are outlined in [CARTOGRAPHY.md](CARTOGRAPHY.md).
These stylesheets can be used in your own cartography projects, and are designed
to be easily customised. They work with [Kosmtik](https://github.com/kosmtik/kosmtik)
and also with the command-line [CartoCSS](https://github.com/mapbox/carto) processor.
Since August 2013 these stylesheets have been used on the [OSMF tileservers](https://operations.osmfoundation.org/policies/tiles/) (tile.openstreetmap.org), and
are updated from each point release. They supersede the previous [XML-based stylesheets](https://github.com/openstreetmap/mapnik-stylesheets).
# Installation
You need a PostGIS database populated with OpenStreetMap data along with auxillary shapefiles.
See [INSTALL.md](INSTALL.md).
# Contributing
Contributions to this project are welcome, see [CONTRIBUTING.md](CONTRIBUTING.md)
for full details.
# Versioning
This project follows a MAJOR.MINOR.PATCH versioning system. In the context of a
cartographic project you can expect the following:
* PATCH: When a patch version is released, there would be no reason not to
upgrade. PATCH versions contain only bugfixes e.g. stylesheets won't compile,
features are missing by mistake, etc.
* MINOR: These are routine releases and happen every 2-5 weeks. They will
contain changes to what's shown on the map, how they appear, new features
added and old features removed. They may rarely contain changes to assets i.e.
shapefiles and fonts but will not contain changes that require software or
database upgrades.
* MAJOR: Any change the requires reloading a database, or upgrading software
dependencies will trigger a major version change.
# Roadmap
## Initial Release (v1.0.0, December 2012)
This was a full re-implementation of the original OSM style, with only a few bugs discovered later. There's been
no interest in creating further point releases in the v1.x series.
## Mapnik 2 work (v2.x)
The v2.x series initially focused on refactoring the style, both to to fix
glitches and to leverage new features in CartoCSS / Mapnik to simplify the
stylesheets with only small changes to the output, as well as removing 'old-skool'
tagging methods that are now rarely used. It then started adding new features.
## Mapnik and CartoCSS update (v3.x)
The v3.x series was triggered by an update to the required Mapnik and CartoCSS
versions.
Care has been taken to not get too clever with variables and expressions. While
these often make it easier to customise, experience has shown that over-cleverness
(e.g. [interpolated entities](https://github.com/openstreetmap/mapnik-stylesheets/blob/master/inc/settings.xml.inc.template#L16)) can discourage contributions.
## Database schema change (v4.x)
The v4.x series includes [osm2pgsql lua transforms](https://osm2pgsql.org/doc/manual.html#lua-tag-transformations)
and a hstore column with all other tags, allowing use of more OpenStreetMap data. Users need
to reload their databases, v3.x compatibility is not maintained.
## Database schema change (v5.x)
The v5.x series updates Lua tag transforms, linestring and polygon decisions have changed.
There are over [500 open requests](https://github.com/gravitystorm/openstreetmap-carto/issues), some that have been open for years.
These need reviewing and dividing into obvious fixes, or additional new features
that need some cartographic judgement.
# Alternatives
There are many open-source stylesheets written for creating OpenStreetMap-based
maps using Mapnik, many based on this project. Some alternatives are:
* [OSM Bright](https://github.com/geofabrik/osm-bright)
* [XML-based stylesheets](https://github.com/openstreetmap/mapnik-stylesheets)
* [OpenStreetMap "FR" Carto](https://github.com/cquest/osmfr-cartocss)
* [OpenStreetMap Carto German](https://github.com/giggls/openstreetmap-carto-de)
# Maintainers
* Andy Allan [@gravitystorm](https://github.com/gravitystorm)
* Paul Norman [@pnorman](https://github.com/pnorman)
* Daniel Koć [@kocio-pl](https://github.com/kocio-pl)
* Christoph Hormann [@imagico](https://github.com/imagico)
* Lukas Sommer [@sommerluk](https://github.com/sommerluk)
* Joseph Eisenberg [@jeisenbe](https://github.com/jeisenbe)
## Previous maintainers
* Michael Glanznig [@nebulon42](https://github.com/nebulon42)
* Matthijs Melissen [@matthijsmelissen](https://github.com/matthijsmelissen)
* Mateusz Konieczny [@matkoniecz](https://github.com/matkoniecz)
openstreetmap-carto-5.8.0/RELEASES.md 0000664 0000000 0000000 00000006753 14530664656 0017277 0 ustar 00root root 0000000 0000000 # Release process
Throughout this document, replace $OLD_VERSION with the previous release and $NEW_VERSION with the next one. Versions should start with a v, e.g. `v2.40.0`.
# Deciding to release
1. Update your local master branch
2. Review the changes in git since the last release with a command like `git log --graph $OLD_VERSION...master` or online at https://github.com/gravitystorm/openstreetmap-carto/compare/$OLD_VERSION...master
3. Review [pull requests](https://github.com/gravitystorm/openstreetmap-carto/pulls) for anything that should be merged before release
4. Check [`preview.png`](preview.png) and update it if needed. Preferred way is to import current Chicago data, export new image (for example from Kosmtik via [this link](http://127.0.0.1:6789/openstreetmap-carto/export/?showExtent=true&format=png&width=849&height=310&scale=1&zoom=15&bounds=-87.65145778656006%2C41.86914537674214%2C-87.61502265930177%2C41.8790515319021)) and upload as new version of this file
Decide among the maintainers if a new release is due.
# Tagging a release
1. Check out master with git
2. Change the Unreleased section in [`CHANGELOG.md`](CHANGELOG.md) to the new version. Add any changes that are missing from the changelog and a new Unreleased section.
3. Commit the changelog changes and tag a release with `git tag -a $NEW_VERSION -m "Tag $NEW_VERSION"`. *Optional: Add `-s` and GPG sign the tag.*
4. Push the tag with `git push origin $NEW_VERSION`. If you use a different name for the gravitystorm/openstreetmap-carto remote, use it instead.
5. If there are any long-running development branches check them out and merge the new release with `git merge $NEW_RELEASE`.
# Notifications
1. Notify OSMF tile server admins [with an issue on OpenStreetMap Chef](https://github.com/openstreetmap/chef/issues/new?title=New%20OpenStreetMap%20Carto%20release,%20$NEW_RELEASE&body=A%20new%20version%20of%20OpenStreetMap%20Carto,%20[$NEW_RELEASE]%28https://github.com/gravitystorm/openstreetmap-carto/releases/tag/$NEW_RELEASE%29,%20has%20been%20released.). Add any deployment-related changes like new shapefiles or font changes to the ticket.
2. Write an email to dev@openstreetmap.org and talk@openstreetmap.org with the subject "OpenStreetMap Carto release $NEW_VERSION" and the body
```
Dear all,
Today, $NEW_VERSION of the OpenStreetMap Carto stylesheet (the default
stylesheet on the OSM website) has been released. Once changes are
deployed on the openstreetmap.org it will take couple of days before
all tiles show the new rendering.
If the tile server admins have rolled out the new version, change it to:
Today, $NEW_VERSION of the OpenStreetMap Carto stylesheet (the default
stylesheet on the OSM website) has been released and rolled out
to the openstreetmap.org servers. It might take a couple of days
before all tiles show the new rendering.
Changes include
*A list of changes*
Thanks to all the contributors for this release.
If there are new contributors, add
including , , [a] new contributor[s].
If there has been a major PR merged, additional thanks can be added
For a full list of commits, see
https://github.com/gravitystorm/openstreetmap-carto/compare/$OLD_VERSION...$NEW_VERSION
As always, we welcome any bug reports at
https://github.com/gravitystorm/openstreetmap-carto/issues
```
3. Post an [openstreetmap.org diary entry](https://www.openstreetmap.org/diary/new) with the text from the email. Add links and other markdown if needed.
4. *Optional: Post on twitter with a link to the diary entry.*
openstreetmap-carto-5.8.0/USECASES.md 0000664 0000000 0000000 00000004531 14530664656 0017277 0 ustar 00root root 0000000 0000000 This file describes some use cases of the style sheet. For each use case, it is indicated which features we need to render because they are the subject of the use case, and which features we should render as context for the subject feature(s). Also, for each use case is indicated at what zoom level the use case is relevant.
The end goal should be that for everything we render on a given zoomlevel, we have a use case that mentions that feature either as map subject or map context on that zoomlevel. We can accomplish this either by adding use cases, or removing features.
As we are still experimenting with this way of design, this document is restricted for now to zoom levels 5, 6 and 7.
| Use case | Map subject | Map context | Zoom level |
| --- | --- | --- | --- |
| Looking up country location | Country names, country borders | Coastlines | z5, z6 |
| Looking up U.S. state location | state names and borders in USA | Coastlines, country borders | z5, z6, z7 |
| Looking up province/state location|Province/state names and borders|Country borders | z6, z7 |
| Looking up city location | City names | Coastlines, country names, country borders | z5, z6, z7 |
| Long distance road trip planning | Motorways | City names | z6, z7 |
| Understanding what the area looks like | Natural areas (woods, grass, scrubs, heath, ice, lakes, rocks, sands etc.) natural lines (big rivers) semi-natural areas (farmlands, vineyards, orchards, parks etc.) semi-natural lines (big canals) | Coastlines, relief | z5, z6, z7 |
This gives us the following features:
* z5: Map subject: Country names, country borders, city names, (semi-)natural areas+lines. Map context: seas, oceans, relief.
* z5 in USA: Map subject: Province/state names and borders, (semi-)natural areas+lines. Map context: Country names, country borders, seas oceans, relief.
* z6: Map subject: Country names, country borders, province/state names and borders, motorways, city names, (semi-)natural areas+lines. Map context: Seas, oceans, country borders, city names, relief.
* z7: Map subject: Province/state names and borders, city names, motorways, (semi-)natural areas+lines. Map context: Seas, oceans, country names, country borders, relief.
Some features that we currently render for which we do not (yet) have a use case:
* Province/state names and borders (except USA) on z5
* Island names on z5/6/7
openstreetmap-carto-5.8.0/docker-compose.yml 0000664 0000000 0000000 00000001573 14530664656 0021202 0 ustar 00root root 0000000 0000000 version: '2'
services:
kosmtik:
image: kosmtik:v1
platform: linux/amd64
build:
context: .
dockerfile: Dockerfile
volumes:
- .:/openstreetmap-carto
depends_on:
- db
ports:
- "127.0.0.1:6789:6789"
environment:
- PGHOST=db
- PGUSER=postgres
db:
image: db:v1
build:
context: .
dockerfile: Dockerfile.db
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
- PG_WORK_MEM
- PG_MAINTENANCE_WORK_MEM
import:
image: import:v1
build:
context: .
dockerfile: Dockerfile.import
volumes:
- .:/openstreetmap-carto
depends_on:
- db
environment:
- PGHOST=db
- PGUSER=postgres
- PG_WORK_MEM
- PG_MAINTENANCE_WORK_MEM
- OSM2PGSQL_CACHE
- OSM2PGSQL_NUMPROC
- OSM2PGSQL_DATAFILE
- EXTERNAL_DATA_SCRIPT_FLAGS
openstreetmap-carto-5.8.0/external-data.yml 0000664 0000000 0000000 00000006173 14530664656 0021022 0 ustar 00root root 0000000 0000000 settings:
temp_schema: loading
schema: public
data_dir: data
database: gis
metadata_table: external_data
sources:
simplified_water_polygons:
# The type of file this source is
type: shp
# Where to get it
url: https://osmdata.openstreetmap.de/download/simplified-water-polygons-split-3857.zip
# The location within the archive
file: simplified-water-polygons-split-3857/simplified_water_polygons.shp
archive:
format: zip
# Files to extract from the archive
files:
- simplified-water-polygons-split-3857/simplified_water_polygons.cpg
- simplified-water-polygons-split-3857/simplified_water_polygons.dbf
- simplified-water-polygons-split-3857/simplified_water_polygons.prj
- simplified-water-polygons-split-3857/simplified_water_polygons.shp
- simplified-water-polygons-split-3857/simplified_water_polygons.shx
water_polygons:
type: shp
url: https://osmdata.openstreetmap.de/download/water-polygons-split-3857.zip
file: water-polygons-split-3857/water_polygons.shp
archive:
format: zip
files:
- water-polygons-split-3857/water_polygons.cpg
- water-polygons-split-3857/water_polygons.dbf
- water-polygons-split-3857/water_polygons.prj
- water-polygons-split-3857/water_polygons.shp
- water-polygons-split-3857/water_polygons.shx
icesheet_polygons:
type: shp
url: https://osmdata.openstreetmap.de/download/antarctica-icesheet-polygons-3857.zip
file: antarctica-icesheet-polygons-3857/icesheet_polygons.shp
archive:
format: zip
files:
- antarctica-icesheet-polygons-3857/icesheet_polygons.cpg
- antarctica-icesheet-polygons-3857/icesheet_polygons.dbf
- antarctica-icesheet-polygons-3857/icesheet_polygons.prj
- antarctica-icesheet-polygons-3857/icesheet_polygons.shp
- antarctica-icesheet-polygons-3857/icesheet_polygons.shx
icesheet_outlines:
type: shp
url: https://osmdata.openstreetmap.de/download/antarctica-icesheet-outlines-3857.zip
file: antarctica-icesheet-outlines-3857/icesheet_outlines.shp
ogropts:
- "-explodecollections"
archive:
format: zip
files:
- antarctica-icesheet-outlines-3857/icesheet_outlines.cpg
- antarctica-icesheet-outlines-3857/icesheet_outlines.dbf
- antarctica-icesheet-outlines-3857/icesheet_outlines.prj
- antarctica-icesheet-outlines-3857/icesheet_outlines.shp
- antarctica-icesheet-outlines-3857/icesheet_outlines.shx
ne_110m_admin_0_boundary_lines_land:
type: shp
url: https://naturalearth.s3.amazonaws.com/110m_cultural/ne_110m_admin_0_boundary_lines_land.zip
file: ne_110m_admin_0_boundary_lines_land.shp
ogropts: &ne_opts
- "--config"
- "SHAPE_ENCODING"
- "WINDOWS-1252"
- "-explodecollections"
# needs reprojecting
- '-t_srs'
- 'EPSG:3857'
archive:
format: zip
files:
- ne_110m_admin_0_boundary_lines_land.dbf
- ne_110m_admin_0_boundary_lines_land.prj
- ne_110m_admin_0_boundary_lines_land.shp
- ne_110m_admin_0_boundary_lines_land.shx
openstreetmap-carto-5.8.0/indexes.sql 0000664 0000000 0000000 00000004273 14530664656 0017725 0 ustar 00root root 0000000 0000000 -- These are indexes for rendering performance with OpenStreetMap Carto.
-- This file is generated with scripts/indexes.py
CREATE INDEX planet_osm_line_ferry ON planet_osm_line USING GIST (way) WHERE route = 'ferry' AND osm_id > 0;
CREATE INDEX planet_osm_line_label ON planet_osm_line USING GIST (way) WHERE name IS NOT NULL OR ref IS NOT NULL;
CREATE INDEX planet_osm_line_river ON planet_osm_line USING GIST (way) WHERE waterway = 'river';
CREATE INDEX planet_osm_line_waterway ON planet_osm_line USING GIST (way) WHERE waterway IN ('river', 'canal', 'stream', 'drain', 'ditch');
CREATE INDEX planet_osm_point_place ON planet_osm_point USING GIST (way) WHERE place IS NOT NULL AND name IS NOT NULL;
CREATE INDEX planet_osm_polygon_admin ON planet_osm_polygon USING GIST (ST_PointOnSurface(way)) WHERE name IS NOT NULL AND boundary = 'administrative' AND admin_level IN ('0', '1', '2', '3', '4');
CREATE INDEX planet_osm_polygon_military ON planet_osm_polygon USING GIST (way) WHERE (landuse = 'military' OR military = 'danger_area') AND building IS NULL;
CREATE INDEX planet_osm_polygon_name ON planet_osm_polygon USING GIST (ST_PointOnSurface(way)) WHERE name IS NOT NULL;
CREATE INDEX planet_osm_polygon_name_z6 ON planet_osm_polygon USING GIST (ST_PointOnSurface(way)) WHERE name IS NOT NULL AND way_area > 5980000;
CREATE INDEX planet_osm_polygon_nobuilding ON planet_osm_polygon USING GIST (way) WHERE building IS NULL;
CREATE INDEX planet_osm_polygon_water ON planet_osm_polygon USING GIST (way) WHERE waterway IN ('dock', 'riverbank', 'canal') OR landuse IN ('reservoir', 'basin') OR "natural" IN ('water', 'glacier');
CREATE INDEX planet_osm_polygon_way_area_z10 ON planet_osm_polygon USING GIST (way) WHERE way_area > 23300;
CREATE INDEX planet_osm_polygon_way_area_z6 ON planet_osm_polygon USING GIST (way) WHERE way_area > 5980000;
CREATE INDEX planet_osm_roads_admin ON planet_osm_roads USING GIST (way) WHERE boundary = 'administrative';
CREATE INDEX planet_osm_roads_admin_low ON planet_osm_roads USING GIST (way) WHERE boundary = 'administrative' AND admin_level IN ('0', '1', '2', '3', '4');
CREATE INDEX planet_osm_roads_roads_ref ON planet_osm_roads USING GIST (way) WHERE highway IS NOT NULL AND ref IS NOT NULL;
openstreetmap-carto-5.8.0/indexes.yml 0000664 0000000 0000000 00000003206 14530664656 0017722 0 ustar 00root root 0000000 0000000 # A goal with the indexes is to have them general-purpose enough to not need
# frequent changing with stylesheet changes, but to be usable with many
# versions, and potentially other styles.
point:
# The point table is small, but so are the partial indexes
place:
where: place IS NOT NULL AND name IS NOT NULL
line:
label:
where: name IS NOT NULL OR ref IS NOT NULL
ferry:
where: route = 'ferry' AND osm_id > 0
river:
where: waterway = 'river'
waterway:
where: waterway IN ('river', 'canal', 'stream', 'drain', 'ditch')
polygon:
# The polygon table is by far the largest, and generally the slowest
name:
function: ST_PointOnSurface(way)
where: name IS NOT NULL
name_z6:
function: ST_PointOnSurface(way)
where: name IS NOT NULL AND way_area > 5980000
admin:
function: ST_PointOnSurface(way)
where: name IS NOT NULL AND boundary = 'administrative' AND admin_level IN ('0', '1', '2', '3', '4')
nobuilding:
where: building IS NULL
military:
where: (landuse = 'military' OR military = 'danger_area') AND building IS NULL
water:
where: waterway IN ('dock', 'riverbank', 'canal') OR landuse IN ('reservoir', 'basin') OR "natural" IN ('water', 'glacier')
way_area_z6:
where: way_area > 5980000
way_area_z10:
where: way_area > 23300
roads:
# The roads table only has a subset of data, so it's just got some low-zoom
# indexes and some fairly selective ones for high zoom
admin_low:
where: boundary = 'administrative' AND admin_level IN ('0', '1', '2', '3', '4')
admin:
where: boundary = 'administrative'
roads_ref:
where: highway IS NOT NULL AND ref IS NOT NULL
openstreetmap-carto-5.8.0/openstreetmap-carto.lua 0000664 0000000 0000000 00000030416 14530664656 0022242 0 ustar 00root root 0000000 0000000 -- For documentation of Lua tag transformations, see:
-- https://github.com/openstreetmap/osm2pgsql/blob/master/docs/lua.md
-- Objects with any of the following keys will be treated as polygon
local polygon_keys = {
'abandoned:aeroway',
'abandoned:amenity',
'abandoned:building',
'abandoned:landuse',
'abandoned:power',
'aeroway',
'allotments',
'amenity',
'area:highway',
'craft',
'building',
'building:part',
'club',
'golf',
'emergency',
'harbour',
'healthcare',
'historic',
'landuse',
'leisure',
'man_made',
'military',
'natural',
'office',
'place',
'power',
'public_transport',
'shop',
'tourism',
'water',
'waterway',
'wetland'
}
-- Objects with any of the following key/value combinations will be treated as linestring
local linestring_values = {
golf = {cartpath = true, hole = true, path = true},
emergency = {designated = true, destination = true, no = true, official = true, yes = true},
historic = {citywalls = true},
leisure = {track = true, slipway = true},
man_made = {breakwater = true, cutline = true, embankment = true, groyne = true, pipeline = true},
natural = {cliff = true, earth_bank = true, tree_row = true, ridge = true, arete = true},
power = {cable = true, line = true, minor_line = true},
tourism = {yes = true},
waterway = {canal = true, derelict_canal = true, ditch = true, drain = true, river = true, stream = true, tidal_channel = true, wadi = true, weir = true}
}
-- Objects with any of the following key/value combinations will be treated as polygon
local polygon_values = {
aerialway = {station = true},
boundary = {aboriginal_lands = true, national_park = true, protected_area= true},
highway = {services = true, rest_area = true},
junction = {yes = true},
railway = {station = true}
}
-- The following keys will be deleted
local delete_tags = {
'note',
'source',
'source_ref',
'attribution',
'comment',
'fixme',
-- Tags generally dropped by editors, not otherwise covered
'created_by',
'odbl',
-- Lots of import tags
-- EUROSHA (Various countries)
'project:eurosha_2012',
-- UrbIS (Brussels, BE)
'ref:UrbIS',
-- NHN (CA)
'accuracy:meters',
'waterway:type',
-- StatsCan (CA)
'statscan:rbuid',
-- RUIAN (CZ)
'ref:ruian:addr',
'ref:ruian',
'building:ruian:type',
-- DIBAVOD (CZ)
'dibavod:id',
-- UIR-ADR (CZ)
'uir_adr:ADRESA_KOD',
-- GST (DK)
'gst:feat_id',
-- osak (DK)
'osak:identifier',
-- Maa-amet (EE)
'maaamet:ETAK',
-- FANTOIR (FR)
'ref:FR:FANTOIR',
-- OPPDATERIN (NO)
'OPPDATERIN',
-- Various imports (PL)
'addr:city:simc',
'addr:street:sym_ul',
'building:usage:pl',
'building:use:pl',
-- TERYT (PL)
'teryt:simc',
-- RABA (SK)
'raba:id',
-- LINZ (NZ)
'linz2osm:objectid',
-- DCGIS (Washington DC, US)
'dcgis:gis_id',
-- Building Identification Number (New York, US)
'nycdoitt:bin',
-- Chicago Building Import (US)
'chicago:building_id',
-- Louisville, Kentucky/Building Outlines Import (US)
'lojic:bgnum',
-- MassGIS (Massachusetts, US)
'massgis:way_id',
-- misc
'import',
'import_uuid',
'OBJTYPE',
'SK53_bulk:load'
}
delete_prefixes = {
'note:',
'source:',
-- Corine (CLC) (Europe)
'CLC:',
-- Geobase (CA)
'geobase:',
-- CanVec (CA)
'canvec:',
-- Geobase (CA)
'geobase:',
-- kms (DK)
'kms:',
-- ngbe (ES)
-- See also note:es and source:file above
'ngbe:',
-- Friuli Venezia Giulia (IT)
'it:fvg:',
-- KSJ2 (JA)
-- See also note:ja and source_ref above
'KSJ2:',
-- Yahoo/ALPS (JA)
'yh:',
-- LINZ (NZ)
'LINZ2OSM:',
'LINZ:',
-- WroclawGIS (PL)
'WroclawGIS:',
-- Naptan (UK)
'naptan:',
-- TIGER (US)
'tiger:',
-- GNIS (US)
'gnis:',
-- National Hydrography Dataset (US)
'NHD:',
'nhd:',
-- mvdgis (Montevideo, UY)
'mvdgis:'
}
-- Big table for z_order and roads status for certain tags. z=0 is turned into
-- nil by the z_order function
local roads_info = {
highway = {
motorway = {z = 380, roads = true},
trunk = {z = 370, roads = true},
primary = {z = 360, roads = true},
secondary = {z = 350, roads = true},
tertiary = {z = 340, roads = false},
residential = {z = 330, roads = false},
unclassified = {z = 330, roads = false},
road = {z = 330, roads = false},
living_street = {z = 320, roads = false},
pedestrian = {z = 310, roads = false},
raceway = {z = 300, roads = false},
motorway_link = {z = 240, roads = true},
trunk_link = {z = 230, roads = true},
primary_link = {z = 220, roads = true},
secondary_link = {z = 210, roads = true},
tertiary_link = {z = 200, roads = false},
service = {z = 150, roads = false},
track = {z = 110, roads = false},
path = {z = 100, roads = false},
footway = {z = 100, roads = false},
bridleway = {z = 100, roads = false},
cycleway = {z = 100, roads = false},
steps = {z = 90, roads = false},
platform = {z = 90, roads = false}
},
railway = {
rail = {z = 440, roads = true},
subway = {z = 420, roads = true},
narrow_gauge = {z = 420, roads = true},
light_rail = {z = 420, roads = true},
funicular = {z = 420, roads = true},
preserved = {z = 420, roads = false},
monorail = {z = 420, roads = false},
miniature = {z = 420, roads = false},
turntable = {z = 420, roads = false},
tram = {z = 410, roads = false},
disused = {z = 400, roads = false},
construction = {z = 400, roads = false},
platform = {z = 90, roads = false},
},
aeroway = {
runway = {z = 60, roads = false},
taxiway = {z = 50, roads = false},
},
boundary = {
administrative = {z = 0, roads = true}
},
}
local excluded_railway_service = {
spur = true,
siding = true,
yard = true
}
--- Gets the z_order for a set of tags
-- @param tags OSM tags
-- @return z_order if an object with z_order, otherwise nil
function z_order(tags)
local z = 0
for k, v in pairs(tags) do
if roads_info[k] and roads_info[k][v] then
z = math.max(z, roads_info[k][v].z)
end
end
if tags["highway"] == "construction" then
if tags["construction"] and roads_info["highway"][tags["construction"]] then
z = math.max(z, roads_info["highway"][tags["construction"]].z/10)
else
z = math.max(z, 33)
end
end
return z ~= 0 and z or nil
end
--- Gets the roads table status for a set of tags
-- @param tags OSM tags
-- @return 1 if it belongs in the roads table, 0 otherwise
function roads(tags)
for k, v in pairs(tags) do
if roads_info[k] and roads_info[k][v] and roads_info[k][v].roads then
if not (k ~= 'railway' or tags.service) then
return 1
elseif not excluded_railway_service[tags.service] then
return 1
end
end
end
return 0
end
--- Generic filtering of OSM tags
-- @param tags Raw OSM tags
-- @return Filtered OSM tags
function filter_tags_generic(tags)
-- Short-circuit for untagged objects
if next(tags) == nil then
return 1, {}
end
-- Delete tags listed in delete_tags
for _, d in ipairs(delete_tags) do
tags[d] = nil
end
-- By using a second loop for wildcards we avoid checking already deleted tags
for tag, _ in pairs (tags) do
for _, d in ipairs(delete_prefixes) do
if string.sub(tag, 1, string.len(d)) == d then
tags[tag] = nil
break
end
end
end
-- Filter out objects that have no tags after deleting
if next(tags) == nil then
return 1, {}
end
-- Convert layer to an integer
tags['layer'] = layer(tags['layer'])
return 0, tags
end
-- Filtering on nodes
function filter_tags_node (keyvalues, numberofkeys)
return filter_tags_generic(keyvalues)
end
-- Filtering on relations
function filter_basic_tags_rel (keyvalues, numberofkeys)
-- Filter out objects that are filtered out by filter_tags_generic
local filter, keyvalues = filter_tags_generic(keyvalues)
if filter == 1 then
return 1, keyvalues
end
-- Filter out all relations except route, multipolygon and boundary relations
if ((keyvalues["type"] ~= "route") and (keyvalues["type"] ~= "multipolygon") and (keyvalues["type"] ~= "boundary")) then
return 1, keyvalues
end
return 0, keyvalues
end
-- Filtering on ways
function filter_tags_way (keyvalues, numberofkeys)
local filter = 0 -- Will object be filtered out?
local polygon = 0 -- Will object be treated as polygon?
-- Filter out objects that are filtered out by filter_tags_generic
filter, keyvalues = filter_tags_generic(keyvalues)
if filter == 1 then
return filter, keyvalues, polygon, roads
end
polygon = isarea(keyvalues)
-- Add z_order column
keyvalues["z_order"] = z_order(keyvalues)
return filter, keyvalues, polygon, roads(keyvalues)
end
--- Handling for relation members and multipolygon generation
-- @param keyvalues OSM tags, after processing by relation transform
-- @param keyvaluemembers OSM tags of relation members, after processing by way transform
-- @param roles OSM roles of relation members
-- @param membercount number of members
-- @return filter, cols, member_superseded, boundary, polygon, roads
function filter_tags_relation_member (keyvalues, keyvaluemembers, roles, membercount)
local members_superseded = {}
-- Start by assuming that this not an old-style MP
for i = 1, membercount do
members_superseded[i] = 0
end
local type = keyvalues["type"]
-- Remove type key
keyvalues["type"] = nil
-- Filter out relations with just a type tag or no tags
if next(keyvalues) == nil then
return 1, keyvalues, members_superseded, 0, 0, 0
end
if type == "boundary" or (type == "multipolygon" and keyvalues["boundary"]) then
keyvalues.z_order = z_order(keyvalues)
return 0, keyvalues, members_superseded, 1, 0, roads(keyvalues)
-- For multipolygons...
elseif (type == "multipolygon") then
-- Multipolygons by definition are polygons, so we know roads = linestring = 0, polygon = 1
keyvalues.z_order = z_order(keyvalues)
return 0, keyvalues, members_superseded, 0, 1, 0
elseif type == "route" then
keyvalues.z_order = z_order(keyvalues)
return 0, keyvalues, members_superseded, 1, 0, roads(keyvalues)
end
-- Unknown type of relation or no type tag
return 1, keyvalues, members_superseded, 0, 0, 0
end
--- Check if an object with given tags should be treated as polygon
-- @param tags OSM tags
-- @return 1 if area, 0 if linear
function isarea (tags)
-- Treat objects tagged as area=yes polygon, other area as no
if tags["area"] then
return tags["area"] == "yes" and 1 or 0
end
-- Search through object's tags
for k, v in pairs(tags) do
-- Check if it has a polygon key and not a linestring override, or a polygon k=v
for _, ptag in ipairs(polygon_keys) do
if k == ptag and v ~= "no" and not (linestring_values[k] and linestring_values[k][v]) then
return 1
end
end
if (polygon_values[k] and polygon_values[k][v]) then
return 1
end
end
return 0
end
function is_in (needle, haystack)
for index, value in ipairs (haystack) do
if value == needle then
return true
end
end
return false
end
--- Normalizes layer tags
-- @param v The layer tag value
-- @return An integer for the layer tag
function layer (v)
return v and string.find(v, "^-?%d+$") and tonumber(v) < 100 and tonumber(v) > -100 and v or nil
end
openstreetmap-carto-5.8.0/openstreetmap-carto.style 0000664 0000000 0000000 00000004701 14530664656 0022617 0 ustar 00root root 0000000 0000000 # This is the osm2pgsql .style file for openstreetmap-carto.
# It is intended to be used with openstreetmap-carto.lua and osm2pgsql Lua
# transforms. Full usage details are in INSTALL.md
# Among things, this means that the linear vs polygon distinction in this file
# doesn't matter, because that is set in the Lua and this file is only used for
# column names and types.
# OsmType Tag DataType Flags
node,way access text linear
node,way addr:housename text linear
node,way addr:housenumber text linear
way addr:interpolation text linear
node,way admin_level text linear
node,way aerialway text linear
node,way aeroway text polygon
node,way amenity text polygon
node,way barrier text linear
way bicycle text linear
way bridge text linear
node,way boundary text linear
node,way building text polygon
way construction text linear
way covered text linear
way foot text linear
node,way highway text linear
node,way historic text polygon
way horse text linear
node,way junction text linear
node,way landuse text polygon
node,way layer int4 linear
node,way leisure text polygon
node,way lock text linear
node,way man_made text polygon
node,way military text polygon
node,way name text linear
node,way natural text polygon
node,way oneway text linear
node,way place text polygon
node,way power text polygon
node,way railway text linear
node,way ref text linear
node,way religion text linear
way route text linear
way service text linear
node,way shop text polygon
way surface text linear
node,way tourism text polygon
way tracktype text linear
way tunnel text linear
node,way water text polygon
node,way waterway text polygon
way way_area real linear # This is calculated during import
# Columns defined in openstreetmap-carto.lua file
way z_order int4 linear
openstreetmap-carto-5.8.0/patterns/ 0000775 0000000 0000000 00000000000 14530664656 0017377 5 ustar 00root root 0000000 0000000 openstreetmap-carto-5.8.0/patterns/allotments.svg 0000664 0000000 0000000 00000000316 14530664656 0022302 0 ustar 00root root 0000000 0000000
openstreetmap-carto-5.8.0/patterns/danger_red_hatch.svg 0000664 0000000 0000000 00000000337 14530664656 0023364 0 ustar 00root root 0000000 0000000
openstreetmap-carto-5.8.0/patterns/dog_park.svg 0000664 0000000 0000000 00000005637 14530664656 0021721 0 ustar 00root root 0000000 0000000
openstreetmap-carto-5.8.0/patterns/grave_yard_christian.svg 0000664 0000000 0000000 00000000341 14530664656 0024305 0 ustar 00root root 0000000 0000000
openstreetmap-carto-5.8.0/patterns/grave_yard_generic.svg 0000664 0000000 0000000 00000000371 14530664656 0023740 0 ustar 00root root 0000000 0000000
openstreetmap-carto-5.8.0/patterns/grave_yard_jewish.svg 0000664 0000000 0000000 00000000430 14530664656 0023611 0 ustar 00root root 0000000 0000000
openstreetmap-carto-5.8.0/patterns/grave_yard_muslim.svg 0000664 0000000 0000000 00000001144 14530664656 0023631 0 ustar 00root root 0000000 0000000
openstreetmap-carto-5.8.0/patterns/grey_vertical_hatch.svg 0000664 0000000 0000000 00000000364 14530664656 0024131 0 ustar 00root root 0000000 0000000
openstreetmap-carto-5.8.0/patterns/intermittent_water.svg 0000664 0000000 0000000 00000000444 14530664656 0024052 0 ustar 00root root 0000000 0000000
openstreetmap-carto-5.8.0/patterns/military_red_hatch.svg 0000664 0000000 0000000 00000000530 14530664656 0023751 0 ustar 00root root 0000000 0000000
openstreetmap-carto-5.8.0/patterns/orchard.svg 0000664 0000000 0000000 00000000307 14530664656 0021542 0 ustar 00root root 0000000 0000000
openstreetmap-carto-5.8.0/patterns/plant_nursery.svg 0000664 0000000 0000000 00000000737 14530664656 0023034 0 ustar 00root root 0000000 0000000
openstreetmap-carto-5.8.0/patterns/vineyard.svg 0000664 0000000 0000000 00000000713 14530664656 0021742 0 ustar 00root root 0000000 0000000
openstreetmap-carto-5.8.0/preview.png 0000664 0000000 0000000 00001320445 14530664656 0017737 0 ustar 00root root 0000000 0000000 PNG
IHDR Q 6 a IDATxԽwtu9o8{fÌs㱽z<>k YɶGdI:J]9Gs s9 3, Xaw= ~w^4"9|>L^ܿaPAORoۂDSX__o.}}}X,QH;*i/S/olVnllH$'&0??oAij
eMPZjg"w3w;{ڈHuO\AE^9Koi>Aߡ_Ҟb$;pRJ
RZFvdN(\1r
(
ռWl;$}ω6rYlh&A?OY
U㭺mp
8Lc}GΝT1u ۮE]m:!ų!hR|߫o<LtA {!i6^Wge#-p 1!q]C^Y9+zz~'*)=#e{.U6ЋyKݭE<'(jTjqP]nw>$¤_!Xv>+ i~4374W86("n~[B^ 0tl|3GeèQ @~}`qh:zQ;e~~ k6U#(O1=U鼗6iJH+{3JAss3~G?~id2X,ҝJ1푙Dy-2xLwE'daj^̫GQ\Xk.c0\XniÆ!WŲhG@oP(GBakg!ҿv~wڎBw;fdH2װ8,xWkUǹE\6XHbz+{ $s;[Vot
FTqVe8ZR;6%bk)D(o|'?))m%j~QkCvwwoF,CKS6C^