Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix style issues from editorconfig configuration #4966

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -909,17 +909,17 @@ and there are now three classes: paved, unpaved and unknown surface

- 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.
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
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

Expand All @@ -932,9 +932,9 @@ Shapefiles are now used for Antartic ice sheets

- 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.
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

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ but to provide an overview.

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.
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

Expand Down
6 changes: 3 additions & 3 deletions DOCKER.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ to be able to run Docker containers. You also need Docker Compose, which should
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.
* 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

Expand Down
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ scripts/get-fonts.sh

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.
* 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:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The general purpose, the cartographic design goals and guidelines for this style

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.
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).
Expand Down
6 changes: 3 additions & 3 deletions openstreetmap-carto.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ local polygon_keys = {

-- Objects with any of the following key/value combinations will be treated as linestring
local linestring_values = {
golf = {cartpath = true, hole = true, path = true},
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},
Expand Down Expand Up @@ -303,7 +303,7 @@ function filter_tags_generic(tags)
end
end

-- Filter out objects that have no tags after deleting
-- Filter out objects that have no tags after deleting
if next(tags) == nil then
return 1, {}
end
Expand Down Expand Up @@ -403,7 +403,7 @@ function isarea (tags)
return tags["area"] == "yes" and 1 or 0
end

-- Search through object's tags
-- 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
Expand Down
8 changes: 4 additions & 4 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ Layer:
CASE WHEN tags->'intermittent' IN ('yes')
OR tags->'seasonal' IN ('yes', 'spring', 'summer', 'autumn', 'winter', 'wet_season', 'dry_season')
THEN 'yes' ELSE 'no' END AS int_intermittent,
CASE WHEN tunnel IN ('yes', 'culvert')
CASE WHEN tunnel IN ('yes', 'culvert')
OR waterway = 'canal' AND tunnel = 'flooded'
THEN 'yes' ELSE 'no' END AS int_tunnel,
'no' AS bridge
Expand Down Expand Up @@ -893,7 +893,7 @@ Layer:
CASE WHEN tags->'intermittent' IN ('yes')
OR tags->'seasonal' IN ('yes', 'spring', 'summer', 'autumn', 'winter', 'wet_season', 'dry_season')
THEN 'yes' ELSE 'no' END AS int_intermittent,
CASE WHEN tunnel IN ('yes', 'culvert')
CASE WHEN tunnel IN ('yes', 'culvert')
OR waterway = 'canal' AND tunnel = 'flooded'
THEN 'yes' ELSE 'no' END AS int_tunnel,
'yes' AS bridge
Expand Down Expand Up @@ -1623,7 +1623,7 @@ Layer:
) AS feature,
CASE WHEN access IN ('private', 'no', 'customers', 'permit', 'delivery') THEN 'restricted' ELSE 'yes' END AS int_access,
CASE
WHEN "natural" IN ('peak', 'volcano', 'saddle')
WHEN "natural" IN ('peak', 'volcano', 'saddle')
OR tags->'mountain_pass' = 'yes' THEN
CASE
WHEN tags->'ele' ~ '^-?\d{1,4}(\.\d+)?$' THEN (tags->'ele')::NUMERIC
Expand Down Expand Up @@ -2204,7 +2204,7 @@ Layer:
CASE WHEN tags->'intermittent' IN ('yes')
OR tags->'seasonal' IN ('yes', 'spring', 'summer', 'autumn', 'winter', 'wet_season', 'dry_season')
THEN 'yes' ELSE 'no' END AS int_intermittent,
CASE WHEN tunnel IN ('yes', 'culvert')
CASE WHEN tunnel IN ('yes', 'culvert')
OR waterway = 'canal' AND tunnel = 'flooded'
THEN 'yes' ELSE 'no' END AS int_tunnel
FROM planet_osm_line
Expand Down
2 changes: 1 addition & 1 deletion scripts/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
These scripts are necessary and useful solely during making changes to the map style.

There are unnecessary for map rendering.
There are unnecessary for map rendering.
4 changes: 2 additions & 2 deletions style/amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -1476,8 +1476,8 @@
[zoom >= 18] {
[feature = 'amenity_parking'] { marker-file: url('symbols/amenity/parking.svg'); }
[feature = 'amenity_parking']["parking" = 'street_side'],
[feature = 'amenity_parking']["parking" = 'lane'] {
marker-file: url('symbols/amenity/parking_subtle.svg');
[feature = 'amenity_parking']["parking" = 'lane'] {
marker-file: url('symbols/amenity/parking_subtle.svg');
}
[feature = 'amenity_bicycle_parking'] { marker-file: url('symbols/amenity/bicycle_parking.svg'); }
[feature = 'amenity_motorcycle_parking'] { marker-file: url('symbols/amenity/motorcycle_parking.svg'); }
Expand Down
2 changes: 1 addition & 1 deletion style/fonts.mss
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ A regular style.
"Noto Sans Vai Regular",
"Noto Sans Yi Regular",
"Noto Sans CJK JP Regular",

"Noto Serif Tibetan Regular",
"Noto Emoji Regular",

Expand Down
29 changes: 15 additions & 14 deletions style/roads.mss
Original file line number Diff line number Diff line change
Expand Up @@ -1682,7 +1682,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
line-pattern-join: round;
}
}
}
}

[feature = 'highway_secondary'] {
[zoom >= 9][link != 'yes'],
Expand Down Expand Up @@ -1742,7 +1742,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
line-pattern-type: repeat;
line-pattern-alignment: global;
line-pattern-width: @secondary-width-z12 - 2 * @secondary-casing-width-z12;
line-pattern-file: url("symbols/unpaved/unpaved_secondary-fill.svg");
line-pattern-file: url("symbols/unpaved/unpaved_secondary-fill.svg");
line-pattern-cap: round;
line-pattern-join: round;
[zoom >= 13] {
Expand Down Expand Up @@ -1841,7 +1841,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
line-pattern-type: repeat;
line-pattern-alignment: global;
line-pattern-width: @tertiary-width-z12 - 2 * @casing-width-z12;
line-pattern-file: url("symbols/unpaved/unpaved_residential-fill.svg");
line-pattern-file: url("symbols/unpaved/unpaved_residential-fill.svg");
[zoom >= 13] { line-pattern-width: @tertiary-width-z13 - 2 * @casing-width-z13; }
[zoom >= 14] { line-pattern-width: @tertiary-width-z14 - 2 * @casing-width-z14; }
[zoom >= 15] { line-pattern-width: @tertiary-width-z15 - 2 * @casing-width-z15; }
Expand Down Expand Up @@ -1932,7 +1932,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
[zoom >= 19] { line-pattern-width: @residential-width-z19 - 2 * @casing-width-z19; }
line-pattern-type: repeat;
line-pattern-alignment: global;
line-pattern-file: url("symbols/unpaved/unpaved_residential-fill.svg");
line-pattern-file: url("symbols/unpaved/unpaved_residential-fill.svg");
#bridges {
line-pattern-width: @residential-width-z13 - 2 * @bridge-casing-width-z13;
[zoom >= 14] { line-pattern-width: @residential-width-z14 - 2 * @bridge-casing-width-z14; }
Expand Down Expand Up @@ -1990,7 +1990,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
[zoom >= 19] { line-pattern-width: @living-street-width-z19 - 2 * @casing-width-z19; }
line-pattern-type: repeat;
line-pattern-alignment: global;
line-pattern-file: url("symbols/unpaved/unpaved_living-street-fill.svg");
line-pattern-file: url("symbols/unpaved/unpaved_living-street-fill.svg");
#bridges {
line-pattern-width: @living-street-width-z13 - 2 * @casing-width-z13;
[zoom >= 14] { line-pattern-width: @living-street-width-z14 - 2 * @bridge-casing-width-z14; }
Expand All @@ -2003,7 +2003,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
line-pattern-join: round;
line-pattern-cap: round;
}
}
}

[feature = 'highway_road'] {
[zoom >= 10] {
Expand Down Expand Up @@ -2047,7 +2047,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
[zoom >= 19] { line-pattern-width: @road-width-z19 - 2 * @casing-width-z19; }
line-pattern-type: repeat;
line-pattern-alignment: global;
line-pattern-file: url("symbols/unpaved/unpaved_road-fill.svg");
line-pattern-file: url("symbols/unpaved/unpaved_road-fill.svg");
#bridges {
line-pattern-width: @road-width-z14 - 2 * @bridge-casing-width-z14;
[zoom >= 16] { line-pattern-width: @road-width-z16 - 2 * @bridge-casing-width-z16; }
Expand Down Expand Up @@ -2110,7 +2110,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
[zoom >= 17][service = 'INT-minor'] {
line-pattern-type: repeat;
line-pattern-alignment: global;
line-pattern-file: url("symbols/unpaved/unpaved_residential-fill.svg");
line-pattern-file: url("symbols/unpaved/unpaved_residential-fill.svg");
[service = 'INT-normal'] {
line-pattern-width: @service-width-z14 - 2 * @casing-width-z14;
[zoom >= 16] { line-pattern-width: @service-width-z16 - 2 * @casing-width-z16; }
Expand Down Expand Up @@ -2183,7 +2183,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
[zoom >= 19] { line-pattern-width: @pedestrian-width-z19 - 2 * @casing-width-z19; }
line-pattern-type: repeat;
line-pattern-alignment: global;
line-pattern-file: url("symbols/unpaved/unpaved_pedestrian-fill.svg");
line-pattern-file: url("symbols/unpaved/unpaved_pedestrian-fill.svg");
#bridges {
line-pattern-width: @pedestrian-width-z14 - 2 * @bridge-casing-width-z14;
[zoom >= 15] { line-pattern-width: @pedestrian-width-z15 - 2 * @bridge-casing-width-z15; }
Expand Down Expand Up @@ -2216,7 +2216,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
[zoom >= 12] {
line-pattern-type: repeat;
line-pattern-alignment: global;
line-pattern-file: url("symbols/unpaved/unpaved_raceway-fill.svg");
line-pattern-file: url("symbols/unpaved/unpaved_raceway-fill.svg");
line-pattern-width: 1.2;
line-pattern-join: round;
line-pattern-cap: round;
Expand Down Expand Up @@ -2251,7 +2251,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
b/line-pattern-width: 4;
b/line-pattern-type: repeat;
b/line-pattern-alignment: global;
b/line-pattern-file: url("symbols/unpaved/unpaved_platform-fill.svg");
b/line-pattern-file: url("symbols/unpaved/unpaved_platform-fill.svg");
b/line-pattern-cap: round;
b/line-pattern-join: round;
}
Expand Down Expand Up @@ -2539,6 +2539,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
line-dasharray: 5,2;
}
}

[zoom >= 12] {
#roads-fill, #bridges {
dark/line-join: round;
Expand Down Expand Up @@ -2764,7 +2765,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
b/line-pattern-width: 4;
b/line-pattern-type: repeat;
b/line-pattern-alignment: global;
b/line-pattern-file: url("symbols/unpaved/unpaved_platform-fill.svg");
b/line-pattern-file: url("symbols/unpaved/unpaved_platform-fill.svg");
b/line-pattern-cap: round;
b/line-pattern-join: round;
}
Expand Down Expand Up @@ -3559,7 +3560,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
[int_surface = 'unpaved'] {
line-pattern-type: repeat;
line-pattern-alignment: global;
line-pattern-file: url("symbols/unpaved/unpaved_aeroway-fill.svg");
line-pattern-file: url("symbols/unpaved/unpaved_aeroway-fill.svg");
line-pattern-width: 2;
[zoom >= 12] { line-pattern-width: 4; }
[zoom >= 13] { line-pattern-width: 6; }
Expand Down Expand Up @@ -3593,7 +3594,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
[int_surface = 'unpaved'] {
line-pattern-type: repeat;
line-pattern-alignment: global;
line-pattern-file: url("symbols/unpaved/unpaved_aeroway-fill.svg");
line-pattern-file: url("symbols/unpaved/unpaved_aeroway-fill.svg");
line-pattern-width: 1;
[zoom >= 13] { line-pattern-width: 2; }
[zoom >= 14] { line-pattern-width: 4; }
Expand Down
4 changes: 2 additions & 2 deletions style/tourism.mss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
line-width: 2.5 + @bridge-casing-width-z16;
line-color: #000;
line-join: round;

[tunnel = 'yes'] { line-color: lighten(#000, 20%); }

[zoom >= 17] { line-width: 4 + @bridge-casing-width-z17; }
Expand All @@ -33,7 +33,7 @@
[tunnel = 'yes'][zoom >= 16] {
line-color: lighten(@roller-coaster-casing, 20%);
}
[zoom >= 16] {
[zoom >= 16] {
line-color: @roller-coaster-casing;
line-width: 2.5;
}
Expand Down
2 changes: 1 addition & 1 deletion symbols/generating_patterns/scrub.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Generated SVG image is sanitized for use with Mapnik by the script svg_pattern.s

The final file is scrub.svg

Because of a [problem in the rendering stack](https://github.com/gravitystorm/openstreetmap-carto/issues/2750) we don’t use the SVG directly, but convert it to PNG: see symbols/scrub.png
Because of a [problem in the rendering stack](https://github.com/gravitystorm/openstreetmap-carto/issues/2750) we don’t use the SVG directly, but convert it to PNG: see symbols/scrub.png
Loading