Showing 1,196 changed files with 10,905 additions and 12,366 deletions.
24 changes: 24 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 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
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@

# 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
2 changes: 1 addition & 1 deletion .github/issue_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

### Actual behavior

### Links and screenshots illustrating the problem
### Screenshots with links illustrating the problem
73 changes: 73 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
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 -O flex -S openstreetmap-carto-flex.lua -d gis -r xml <(echo '<osm version="0.6"/>')
- name: Create indexes
run: psql -1Xq -v ON_ERROR_STOP=1 -d gis -f indexes.sql
- name: Load functions
run: psql -1Xq -v ON_ERROR_STOP=1 -d gis -f functions.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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.thumb.png
layers/
data/
fonts/
tmp/
*.xml
*.osm.pbf
Expand All @@ -9,6 +10,7 @@ localconfig.json
localconfig.js
.kosmtik-config.yml
.env
.DS_Store

# Generated at runtime by Python.
*.pyc
Expand Down
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

22 changes: 11 additions & 11 deletions CARTOGRAPHY.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@

# 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
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
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
Expand All @@ -20,15 +20,15 @@ This style has multiple purposes:
* 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
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
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.
Expand Down
Loading