Skip to content

Commit

Permalink
Adding ref for railway=subway_entrance
Browse files Browse the repository at this point in the history
  • Loading branch information
kocio-pl committed Dec 4, 2016
1 parent be4fea5 commit 6cda888
Show file tree
Hide file tree
Showing 228 changed files with 5,585 additions and 6,861 deletions.
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ data/
*.xml
node_modules/
localconfig.json
localconfig.js

# Generated at runtime by Python.
*.pyc
Expand Down
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ addons:
node_js:
- "0.10"
install:
- npm install carto@0.12.1
- npm install carto@0.16.0
- mkdir -p data/world_boundaries data/simplified-land-polygons-complete-3857 data/ne_110m_admin_0_boundary_lines_land data/ne_10m_populated_places data/land-polygons-split-3857
- touch data/world_boundaries/builtup_area.shp data/simplified-land-polygons-complete-3857/simplified_land_polygons.shp data/ne_110m_admin_0_boundary_lines_land/ne_110m_admin_0_boundary_lines_land.shp data/ne_10m_populated_places/ne_10m_populated_places_fixed.shp data/land-polygons-split-3857/land_polygons.shp
script:
- jsonlint project.mml
- ./node_modules/carto/bin/carto project.mml | xmllint - | wc -l
- ./scripts/travis_check_project_files
- set -o pipefail && ./node_modules/carto/bin/carto project.mml | xmllint - | wc -l
- find symbols/ -name '*.svg' | xargs xmllint --noout
58 changes: 29 additions & 29 deletions CARTOGRAPHY.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
# Cartography

This is a style that serves multiple purposes, so here are some guidelines when considering cartographic changes.
# Design goals and guidelines for this style

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

There are multiple primary purposes of the map style, which pull in different directions
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.

* It's the primary feedback mechanism for mappers to validate their edits - so detail is useful
* It's a major part of the impression visitors to osm.org receive - so clear design is useful
* It's an examplar stylesheet for rendering OSM data - so easy customisation is useful
## General purpose

It must always be borne in mind that a map style cannot show every detail of the OSM data, and in many cases it is more appropriate to show the detail in other, more specialist styles.
This style has multiple purposes:

## Colours
* 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 examplar stylesheet for rendering OSM data.

Firstly, this is a map, not merely a colourful 2-dimensional visualisation of the database. Colours should be chosen based on their effectiveness and to make things look nice, not chosen for distinctiveness.
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.

The colour palette should be moving towards pastel/light/desaturated for background layers, midtones for streets and save highlights/bolds/saturated for points of interest. If colourspace can be left unused, that enables overlays for third parties.
## Main goals

Colour definitions should, where useful, be put into variables at the top of the file, to enable easier customisation.
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.

## Data manipulation

OpenStreetMap data has to be manipulated for rendering, but since this style is intended for use by mappers to check their work, it should minimise any distortions. For example, line-smoothing improves the look of railways and rivers, but introduces confusion for mappers. Post processing of geometries can improve the cartographic results, but breaks the cause-and-effect between editing the data and seeing the results.

For similar reasons, use of external non-OSM data should be avoided.

## Legibility

Legibility is not only about of font size, but also about the ability of users to be able to “read” the map style. For example, a user might not be familiar with our exact road colours, but should be able to understand their relative importance via intensity of colour, width or other attributes. Important features should be more easily spotted and understood than less important information. It should be possible to gain an understanding of the majority of the map without using a legend.

Avoid font sizes smaller than 10.

## The Mapper Feedback Loop

If you thought that mappers were happy just to press "Save" on their editor, you'd be wrong. A key part of their feedback loop - to reassure them their work has been saved, and also to check that they have mapped 'correctly' - is waiting to see the results of their mapping on the main map layer on www.osm.org

While this desire is in obvious conflict with the above comments on level of detail, it has a second impact on the map style. We need to, wherever possible, avoid accidentally encouraging mistakes - that is, avoiding the situation where a clearly misspelled or misused tag leads to the originally expected result. So `highway=mtorway` shouldn't show up as if it was `highway=motorway`, and so on. This has been a problem with "catch-all" rules in queries and filters, such as `where leisure is not null` or `[amenity != ""]`. Avoid these situations.
* **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.
31 changes: 30 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
## [Unreleased](https://github.com/gravitystorm/openstreetmap-carto/compare/v2.43.0...master)
## [Unreleased](https://github.com/gravitystorm/openstreetmap-carto/compare/v2.45.1...master)
### Major Changes
- Mapnik 3 is now required
- CartoCSS 0.16.x is now required
- Official Tilemill support is dropped

## [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
Expand All @@ -9,6 +35,9 @@
### 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
Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ When using the OpenStreetMap Carto spaces you should act in the spirit of the va

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,penorman@mac.com,info@matthijsmelissen.nl,matkoniecz@gmail.com).
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,penorman@mac.com,info@matthijsmelissen.nl,matkoniecz@gmail.com,chris_hormann@gmx.de,daniel@xn--ko-wla.pl,nebulon42@mailbox.org).

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

Expand Down
55 changes: 25 additions & 30 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,36 +24,14 @@ that are particularly suitable for new contributors to get familiar with the pro

## Editing Layers

OpenStreetMap Carto uses a YAML file for defining layers. Some of the rationale
is outlined in [a GitHub issue](https://github.com/gravitystorm/openstreetmap-carto/issues/711).
Editing multi-line SQL statements in a YAML file is much friendlier than editing
escaped SQL in a JSON file.

The `./scripts/yaml2mml.py` script is provided to convert YAML to JSON, and
depends on PyYAML, available through `pip install pyyaml` or packaged on Ubuntu
as `python-yaml`.

[Kosmtik](https://github.com/kosmtik/kosmtik) can directly load the project from
the YAML file with `node index.js serve path/to/openstreetmap-carto/project.yaml`,
and the JSON file just needs updating before committing.

[TileMill](https://github.com/mapbox/tilemill) and Mapbox `carto` [do not directly support YAML](https://github.com/mapbox/carto/issues/401),
so make edits to the YAML file then run the preprocessing step of
`./scripts/yaml2mml.py && touch project.mml` to
update the file and force TileMill to reload it. You shouldn't use the text editor
built-in to TileMill, it doesn't work with the number of .mss files in the style.
Instead, hide the right pane and use an external text editor.

Before committing changes, run `./scripts/yaml2mml.py`
to update the JSON MML file and `git add project.mml`

When committing changes, add both the `project.yaml` and `project.mml` files to
the commit with `./scripts/yaml2mml.py && git add project.mml`.
One of the big advantages of this system is that to resolve any layer merge
conflicts, they only need to be resolved in the YAML file where they are easier
to handle, then the JSON file can be regenerated, while at the same time the
styles work with TileMill and carto out-of-the-box without needing to run the
`yaml2mml` script.
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.16.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

Expand Down Expand Up @@ -138,6 +116,23 @@ Because SQL within JSON or YAML will not generally be syntax highlighted, indent
* One space before and after = etc
* Name SQL subqueries after the layer name (but use underscores)

## 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://www.mapbox.com/maki-icons/guidelines/)
* [GNOME Icon Design Guildelines](https://developer.gnome.org/hig/stable/icons-and-artwork.html.en)

## Pull requests

Pull requests that change the cartography should contain a few images selected
Expand Down
35 changes: 23 additions & 12 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ psql -d gis -f indexes.sql
Additionally you need some shapefiles.

## Scripted download

To download the shapefiles you can run the following script from this directory. No further steps should be needed as the data has been processed and placed in the requisite directories.
To download the shapefiles you can run the following script. No further steps should be needed as the data has been processed and placed in the requisite directories.

```
./get-shapefiles.sh
scripts/get-shapefiles.py
```

This script generates and populates the *data* directory with all needed shapefiles, including indexing them through *shapeindex*.

## Manual download

You can also download them manually at the following paths:
Expand All @@ -48,26 +49,37 @@ DejaVu Sans is used as an optional fallback font for systems without Noto Sans.

Unifont is used as a last resort fallback, with it's excellent coverage, common presence on machines, and ugly look.

Mapnik 3 is required for acceptable rendering of most non-Latin scripts, particularly those with complicated diacritics and tone marks.

On Ubuntu 16.04 or Debian Testing you can install all required fonts with
On Ubuntu 16.04 or Debian Testing you can install the required fonts except Noto Emoji Regular with

```
sudo apt-get install fonts-noto ttf-unifont
sudo apt-get install fonts-noto-cjk fonts-noto-hinted fonts-noto-unhinted 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). This can be installed [from source](https://github.com/googlei18n/noto-fonts/blob/master/FAQ.md#where-are-the-fonts).

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

### Non-latin scripts

For proper rendering of non-latin scripts, particularly those with complicated diacritics and tone marks the requirements are

* FreeType 2.6.2 or later for CJK characters

* A recent enough version of Noto with coverage for the scripts needed.

## 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.yaml`
* [TileMill](http://mapbox.com/tilemill) - This is a TileMill project you can copy (or symlink) directly into your Mapbox/project directory
* [Kosmtik](https://github.com/kosmtik/kosmtik) - Kosmtik can be launched with `node index.js serve path/to/openstreetmap-carto/project.mml`

[TileMill](http://mapbox.com/tilemill) is not officially supported, but you may be able to use a recent TileMill version by copying or simlinking the project directly into your Mapbox/project directory.

For deployment, `carto` and Mapnik are required.

* [carto](https://github.com/mapbox/carto) >= 0.9.5 (we're using instances with cascading rules and min/max zoom properties)
* [mapnik](https://github.com/mapnik/mapnik/wiki/Mapnik-Installation) >= 2.1.0. Mapnik 3.0 is supported, but not required.
* [Carto](https://github.com/mapbox/carto) >= 0.16.0 (we're using YAML)
* [Mapnik](https://github.com/mapnik/mapnik/wiki/Mapnik-Installation) 3.0

---

Expand All @@ -84,5 +96,4 @@ For both development and deployment, a database and some utilities are required
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
* [PyYAML](http://pyyaml.org/wiki/PyYAML) if editing the MML (layer definition) file (packaged as `python-yaml` on Ubuntu, or installed with `pip install pyyaml`)
* [Color Math](https://github.com/gtaylor/python-colormath) and [numpy](http://www.numpy.org/) if running generate_road_colors.py helper script (may be obtained with `pip install colormath numpy`)
Loading

0 comments on commit 6cda888

Please sign in to comment.