Skip to content

Commit

Permalink
Merge branch 'master' into codefactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
quasart committed May 18, 2021
2 parents 5dfe79d + 6a047d0 commit b60ef4f
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 35 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

* Fix names not rendered in some alphabts. Fix #489.
* Render `mtb:name` when no name is known and `mtb:name` is available. Fix #533.
* Render `landuse=retail` and `shop=mall` names. Fix #526.
* Fix missing POIs: swimming pools, `shop=doityourself` and schools. Fix #64.
* Render train stations when tagged on buildings (polygons). Fix #527.
* Rendering bridge surface. Fix #551.
* Remove rendering ramp:xxx=separate. Fix #545.
* Remove rendering of minor railway (spur, siding, yard) at low zooms, fade them for higher zooms. Fix #559.


## v0.5
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ legend](https://www.cyclosm.org/legend.html).
A list of the tags considered by this render is available in [Taginfo JSON
format](https://wiki.openstreetmap.org/wiki/Taginfo/Projects) in [`taginfo.json`](taginfo.json).

Some extra information about the way OSM tags are rendered is available in
[the wiki](https://github.com/cyclosm/cyclosm-cartocss-style/wiki/Tag-to-Render).


## Getting started

Expand Down
4 changes: 4 additions & 0 deletions docs/DOCKER.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ Read on below to get the details.
* Ctrl+C to stop the style preview application
* `docker-compose stop db` to stop the database container

_Note:_ You might encounter permissions issues if the `cyclosm-cartocss-style`
folder is not owned by the user with UID 1000. A quick workaround for this is
to `chown 1000:1000 cyclosm-cartocss-style` after cloning it.

## Repositories

Instructions above will clone main CyclOSM repository. To test your own changes you should [fork](https://help.github.com/articles/fork-a-repo/) cyclosm/cyclosm-cartocss-style repository and [clone your fork](https://help.github.com/articles/cloning-a-repository/).
Expand Down
8 changes: 4 additions & 4 deletions docs/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,18 @@ On Ubuntu 16.04 or Debian Testing you can download and install most of the
required fonts

```
sudo apt-get install fonts-noto-cjk fonts-noto-hinted fonts-noto-unhinted fonts-hanazono ttf-unifont
sudo apt-get install fonts-dejavu-core fonts-noto fonts-noto-color-emoji fonts-noto-cjk fonts-noto-hinted fonts-noto-unhinted fonts-hanazono ttf-unifont
```

Noto Emoji Regular can be downloaded [from the Noto Emoji
repository](https://github.com/googlei18n/noto-emoji).

It might be useful to have a more recent version of the fonts for [rare
non-latin scripts](#non-latin-scripts). The current upstream font release has
also some more scripts and style variants than in the Ubuntu package. It can be
installed [from
source](https://github.com/googlei18n/noto-fonts/blob/master/FAQ.md#where-are-the-fonts).

You might want to install these fonts from `sid` to ensure having latest
version.

DejaVu is packaged as `fonts-dejavu-core`.

### Installation on other operation systems
Expand Down
6 changes: 4 additions & 2 deletions fonts.mss
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,12 @@ A regular style.
"Noto Sans Yi Regular",

"Noto Sans Arabic UI Regular",
"Noto Naskh Arabic UI Regular",

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

"Noto Naskh Arabic UI Regular",
"Noto Emoji Regular",

"DejaVu Sans Book",

Expand Down
9 changes: 5 additions & 4 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -578,8 +578,8 @@ Layer:
ELSE NULL
END AS can_bicycle
FROM planet_osm_roads
WHERE (railway IN ('rail')
OR highway IN ('motorway', 'trunk', 'primary', 'secondary'))
WHERE (((railway IN ('rail') AND (service IS NULL OR service NOT IN ('spur', 'siding', 'yard')))
OR highway IN ('motorway', 'trunk', 'primary', 'secondary')))
AND way && !bbox!
ORDER BY CASE
WHEN railway IS NOT NULL THEN 0
Expand Down Expand Up @@ -609,7 +609,8 @@ Layer:
tunnel,
bicycle
FROM planet_osm_roads
WHERE (railway IN ('rail') OR highway IN ('motorway', 'trunk'))
WHERE ((railway IN ('rail') AND (service IS NULL OR service NOT IN ('spur', 'siding', 'yard')))
OR highway IN ('motorway', 'trunk'))
AND way && !bbox!
ORDER BY CASE
WHEN railway IS NOT NULL THEN 0
Expand Down Expand Up @@ -1806,7 +1807,7 @@ Layer:
SELECT
way,
highway,
name,
COALESCE(name, tags->'mtb:name') AS name,
CASE
WHEN oneway IN ('yes', '-1') THEN oneway
ELSE 'no'
Expand Down
2 changes: 1 addition & 1 deletion project.sql
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ CREATE VIEW cyclosm_ways AS
ELSE 'unknown'
END AS surface_type,
CASE
WHEN service in ('parking_aisle', 'drive-through', 'driveway') THEN 'minor'
WHEN service in ('parking_aisle', 'drive-through', 'driveway', 'spur', 'siding', 'yard') THEN 'minor'
ELSE service
END AS service,
CASE
Expand Down
62 changes: 38 additions & 24 deletions roads.mss
Original file line number Diff line number Diff line change
Expand Up @@ -378,15 +378,22 @@
#roads_high[zoom>=11],
#bridge[zoom>=11] {
[type='railway']::rail_perpendicular {
line-color: @rail-line;
[service!='minor'],
[service='minor'][zoom>=13]
{
line-cap: butt;
line-color: @rail-line;
[service='minor'] {
line-color: lighten(@rail-line, 25%);
}

/* hatches: start with space to avoid dense pattern on very short ways */
line-dasharray: 0,2,1,2;
[zoom>=14] { line-dasharray: 0,4,1,4; }

line-width: 3;
[zoom>=19] { line-width: 6; }
}
}
}

Expand Down Expand Up @@ -2299,7 +2306,7 @@
#tunnel::steps_ramp_left[zoom>=15],
#bridge::steps_ramp_left[zoom>=15] {
[type='steps'] {
[has_ramp!='no'][has_ramp!=null] {
[has_ramp!='no'][has_ramp!=null][has_ramp!='separate'] {
line-color: @cycle-fill;
line-width: @rdz15_steps_outline*2;
line-offset: @rdz15_steps/2 + @rdz15_steps_outline;
Expand Down Expand Up @@ -3677,29 +3684,36 @@
#roads_high::rail_line[zoom>=11],
#bridge::rail_line[zoom>=11] {
[type='railway'] {
line-color: @rail-line;
[service!='minor'],
[service='minor'][zoom>=13]
{
line-color: @rail-line;
[service='minor'] {
line-color: lighten(@rail-line, 25%);
}

line-width: @rdz11_railway;
[zoom>=12] {
line-width: @rdz12_railway;
}
[zoom>=13] {
line-width: @rdz13_railway;
}
[zoom>=14] {
line-width: @rdz14_railway;
}
[zoom>=15] {
line-width: @rdz15_railway;
}
[zoom>=16] {
line-width: @rdz16_railway;
}
[zoom>=17] {
line-width: @rdz17_railway;
}
[zoom>=18] {
line-width: @rdz18_railway;
line-width: @rdz11_railway;
[zoom>=12] {
line-width: @rdz12_railway;
}
[zoom>=13] {
line-width: @rdz13_railway;
}
[zoom>=14] {
line-width: @rdz14_railway;
}
[zoom>=15] {
line-width: @rdz15_railway;
}
[zoom>=16] {
line-width: @rdz16_railway;
}
[zoom>=17] {
line-width: @rdz17_railway;
}
[zoom>=18] {
line-width: @rdz18_railway;
}
}
}
}
Expand Down

0 comments on commit b60ef4f

Please sign in to comment.