Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit d4d79f6b2463fa10db12104b32ced01d47b04319
Merge: ce36bab3 4a9b5a6
Author: dch0ph <[email protected]>
Date:   Sun Jan 19 13:06:39 2025 +0000

    Merge remote-tracking branch 'upstream/master'

commit 4a9b5a6
Author: Nick Doiron <[email protected]>
Date:   Thu Jan 16 14:45:57 2025 -0600

    Replace current font download with Python script (gravitystorm#5052)

    * recommend python script

    * Python script to replace current downloads

    * clarify messages / comments

    * remove constants not useful for current repo

    * include Docker startup update

commit 248b72d
Author: dch0ph <[email protected]>
Date:   Thu Jan 16 20:41:58 2025 +0000

    Additional access marking (gravitystorm#5049)

    * Restricted marking for motorway/trunk/primary

    * Add access marking for highway=pedestrian

    * Update functions.sql

    highway=pedestrian should support restricted access

    * Change pedestrian access marking colour

    Change pedestrian access marking colour to common light shade of grey.
    Also consolidate names.

commit adff4bd
Author: dch0ph <[email protected]>
Date:   Thu Jan 16 20:41:22 2025 +0000

    Move leisure=track and attraction=water_slide (gravitystorm#5046)

    leisure=track and attraction=water_slide moved to layers at more appropriate positions in stack
    Minor optimisation of post-road layers
    Tweak of SQL ford query

commit ce36bab3ad31b946072319dc65e1585819c7c306
Merge: 2a206fa5 5791e79
Author: dch0ph <[email protected]>
Date:   Wed Nov 27 17:28:16 2024 +0000

    Merge remote-tracking branch 'upstream/master'

commit 5791e79
Author: Marcos Dione <[email protected]>
Date:   Wed Nov 27 17:28:19 2024 +0100

    5033 roads bridges tunnels queries (gravitystorm#5035)

    * Do not calculate surface for railways.

    * Name the value for access in railway branch.

    * Do not calculate service for railways.

    * link is always null for railways.

    * preserved is always null for roads.

    * All other CASE statements are not parenthesized.

    * Alignment.

    * Documentation.

    * Documentation.

    * Copy roads_sql subqueries to tunnels.

    * Copy roads_sql subqueries to bridges.

    * Spurious spaces.

    * Duped SELECT.

    * changing column name from access to int_access

    ---------

    Co-authored-by: imagico <[email protected]>

commit 6164c07
Merge: 81d39e0 c9ee914
Author: Christoph Hormann <[email protected]>
Date:   Mon Nov 11 21:07:02 2024 +0200

    Merge pull request gravitystorm#5042 from gy-mate/fix-reference

    Fix `generate_road_colours.py` reference in `INSTALL.md`

commit c9ee914
Author: Máté Gyöngyösi <[email protected]>
Date:   Fri Nov 8 18:17:05 2024 +0100

    Fix `generate_road_colours.py` reference in `INSTALL.md`

commit 81d39e0
Author: Máté Gyöngyösi <[email protected]>
Date:   Thu Nov 7 14:32:25 2024 +0100

    Improve install instructions: package name, commands, links & formatting (gravitystorm#5040)

    * Add command for installing Python libs per PEP 668; correct `yaml` package name

    * Update INSTALL.md

    * Update INSTALL.md

commit 2a206fa5138105eda919eb3b2cfa571f76b0e1cf
Merge: 9c254260 d2a8ebf
Author: dch0ph <[email protected]>
Date:   Fri Nov 1 18:26:33 2024 +0000

    Merge remote-tracking branch 'upstream/master'

commit d2a8ebf
Merge: d9ea31c 52126f9
Author: Paul Norman <[email protected]>
Date:   Sat Oct 26 11:30:43 2024 -0700

    Merge pull request gravitystorm#5030 from pnorman/maintainer

    Step down as maintainer

commit 52126f9
Author: Paul Norman <[email protected]>
Date:   Sat Oct 26 11:24:06 2024 -0700

    Step down as maintainer

commit d9ea31c
Merge: 491bd4a e47a438
Author: Christoph Hormann <[email protected]>
Date:   Sat Oct 26 15:50:48 2024 +0300

    Merge pull request gravitystorm#4978 from joto/switch-to-flex

    Flex version of the osm2pgsql configuration

commit e47a438
Author: Jochen Topf <[email protected]>
Date:   Sun Jul 7 18:24:43 2024 +0200

    Remove outdated Lua test scripts

    They don't work any more with the new flex Lua output. And they are
    have not been maintained anyway.

commit adc5f50
Author: Jochen Topf <[email protected]>
Date:   Sun Jun 16 10:28:54 2024 +0200

    Switch to flex output

    This commit does the actual switch to the new flex config. It removes
    the old config files and updates the documentation and various scripts.

commit d22111f
Author: Jochen Topf <[email protected]>
Date:   Thu Feb 15 20:47:48 2024 +0100

    Flex version of the osm2pgsql configuration

    This commit contains one file with an osm2pgsql configuration for the
    flex output that can be used instead of the old configuration for the
    pgsql output. It replaces the openstreetmap-carto.style and
    openstreetmap-carto.lua files.

    The configuration is nearly 100% compatible to the old one.

    The database layout will be exactly the same with just very little
    changes. The id columns (`osm_id`) and geometry columns (`way`) on all
    tables will get the NOT NULL flag when using the flex output. These have
    always been NOT NULL in practice anyway.

    The content of the database will be the same with only minor irrelevant
    differences.

    Run like this:
    osm2pgsql -O flex --style openstreetmap-carto-flex.lua -d gis ~/path/to/data.osm.pbf

commit 491bd4a
Author: imagico <[email protected]>
Date:   Thu Oct 17 12:30:15 2024 +0300

    Updating changelog for v5.9.0

commit 49e5c27
Author: Jacob Wysko <[email protected]>
Date:   Wed Oct 16 09:08:03 2024 -0400

    Render `leisure=dance` (gravitystorm#4996)

    * Render leisure=dance

    * Improve dance icon

commit fbb0fb0
Author: dch0ph <[email protected]>
Date:   Wed Oct 16 14:04:56 2024 +0100

    Rendering specific access tags (gravitystorm#4952)

    * Interpret additional access tags

    mode specific access tags relevant to primary mode of highway interpreted to determine access marking for:
    Road types (motorcar > motor_vehicle > vehicle)
    Footway (foot)
    Cycleway (bicycle)
    Bridleway (horse)

    * Function load in CI

    * Add carto_path_primary_path

    * Moving customers, permit

    Following discussion moving:
    access=customers -> "restricted" marking
    access=permit -> "no" marking

    * Major changes in response to comments

    Functions renamed for clarity

    Changed logic for mode-specific tags, only ignoring 'unknown' values

    unknown access type return for unknown/uninterpretable

    path promoted to cycleway/bridleway in SQL rather than MSS

    * Use foot primary mode for highway=pedestrian

    * Typo fix

    * Remove incorrect END statements

    * Fix regression on introducing explicit unknown

    * Fix regression for highway=path

    * Alter 'destination' outcome for 2-state access

    'destination' on path / footway etc. interpreted as 'yes' (matching current behaviour)

    * Simplify functions.sql

    Reduce number of functions
    Tidy comments

    * Tidy access functions

    Consistent formatting of CASE/WHEN
    Use more idiomatic COALESCE(NULLIF(...),)

    * Update functions.sql

    Change argument name accesstag -> accessvalue
    Improve documentation
    Simplify logic for promoted paths

    * Remove obsolete comment from MML

    * Avoid unknown overload

    Return "unrecognised" rather than "unknown" if access restriction is not one of recognised values

    * Extend code comments

    Note on short-circuiting logic in carto_highway_int_access

    * Fix broken bridge on path

    Bridge not being rendered on highway=path

commit 23b1cfa
Merge: 84c844d 369c81a
Author: Paul Norman <[email protected]>
Date:   Sun Jul 7 02:37:01 2024 -0700

    Merge pull request gravitystorm#4988 from BubbaJuice/jewellery

    Removing shop=jewellery

commit 369c81a
Author: e <[email protected]>
Date:   Tue Jul 2 14:44:29 2024 -0700

    Revert reformatting of lines

commit 2c44a11
Author: e <[email protected]>
Date:   Tue Jul 2 11:22:15 2024 -0700

    Removing shop=jewellery

commit 84c844d
Merge: 91f11ec 0b9784f
Author: Paul Norman <[email protected]>
Date:   Thu Jun 13 08:24:38 2024 -0700

    Merge pull request gravitystorm#4965 from hiddewie/preserved-railway

    Render `railway:preserved=yes` as preserved railway

commit 0b9784f
Author: Hidde Wieringa <[email protected]>
Date:   Tue May 21 21:01:27 2024 +0200

    Fix specific preserved check in railway name layer

commit 5908225
Author: Hidde Wieringa <[email protected]>
Date:   Sat May 11 11:21:32 2024 +0200

    revert whitespace

commit 8b0385c
Author: Hidde Wieringa <[email protected]>
Date:   Sat May 11 11:19:40 2024 +0200

    low zooms: do not render preserved railways

commit 9d615b7
Author: Hidde Wieringa <[email protected]>
Date:   Sat May 11 11:09:27 2024 +0200

    low zooms: do not query preserved railways

commit f2fbd89
Author: Hidde Wieringa <[email protected]>
Date:   Fri May 10 21:21:05 2024 +0200

    simplify changeset

commit 41e0508
Author: Hidde Wieringa <[email protected]>
Date:   Fri May 10 21:12:46 2024 +0200

    ensure color syntax is aligned

commit 5bc5e38
Author: Hidde Wieringa <[email protected]>
Date:   Fri May 10 20:53:55 2024 +0200

    Simplify railway preserved check

commit d75fa6f
Author: Hidde Wieringa <[email protected]>
Date:   Fri May 10 20:50:57 2024 +0200

    revert some trailing whitespace

commit 0581639
Author: Hidde Wieringa <[email protected]>
Date:   Fri May 10 09:41:00 2024 +0200

    No longer railway preserved as railway=rail

commit aaf5fe2
Author: Hidde Wieringa <[email protected]>
Date:   Thu May 9 22:11:09 2024 +0200

    ignore rail=preserved in ordering function

commit 758c240
Author: Hidde Wieringa <[email protected]>
Date:   Thu May 9 22:07:01 2024 +0200

    Tweak color prominence and ensure tunnels do not render preservedness

commit 2935f72
Author: Hidde Wieringa <[email protected]>
Date:   Thu May 9 17:25:10 2024 +0200

    Render preserved railways and tram style only from z15

commit 3170c0d
Author: Hidde Wieringa <[email protected]>
Date:   Wed May 8 22:26:30 2024 +0200

    align colors a bit better with existing line colors

commit 7d86ded
Author: Hidde Wieringa <[email protected]>
Date:   Wed May 8 22:18:48 2024 +0200

    Fixup railway line widths

commit 992a6fc
Author: Hidde Wieringa <[email protected]>
Date:   Wed May 8 22:03:31 2024 +0200

    improve rendering for edge cases

commit 0b723b2
Author: Hidde Wieringa <[email protected]>
Date:   Wed May 8 21:41:13 2024 +0200

    Ensure all types of railways have styles aligned

commit 6062c94
Author: Hidde Wieringa <[email protected]>
Date:   Wed May 8 21:18:32 2024 +0200

    include more railway tags to allow `railway:preserved=yes`

commit 5b2c452
Author: Hidde Wieringa <[email protected]>
Date:   Mon May 6 22:02:36 2024 +0200

    Render preserved with new rules

commit 5ae7128
Author: Hidde Wieringa <[email protected]>
Date:   Mon May 6 20:58:54 2024 +0200

    Render railway=preserved as railway=rail

commit 1cf246b
Author: Hidde Wieringa <[email protected]>
Date:   Sun May 5 12:55:53 2024 +0200

    Take only railway=rail

commit 38bd0dc
Author: Hidde Wieringa <[email protected]>
Date:   Sun May 5 12:33:26 2024 +0200

    Ensure railways with railway:preserved=yes render as preserved railways

commit 91f11ec
Author: Maik Busch <[email protected]>
Date:   Tue Apr 16 23:08:27 2024 +0200

    Use common Quotes for Columns (gravitystorm#4940)

commit 9c254260f037f448c089d07a1557956f8688f8f1
Merge: 4a777724 3672c45
Author: dch0ph <[email protected]>
Date:   Fri Apr 12 20:36:13 2024 +0100

    Merge remote-tracking branch 'upstream/master'

commit 3672c45
Author: Maik Busch <[email protected]>
Date:   Tue Apr 2 20:16:23 2024 +0200

    Use common Single Quotes for Strings (gravitystorm#4939)

    * Use common Single Quote for Strings

    * Update CONTRIBUTING.md

commit 9fc6ed4
Author: dch0ph <[email protected]>
Date:   Sun Jan 21 10:46:54 2024 +0000

    Render barrier=jersey_barrier (gravitystorm#4923)

    Render barrier=jersey_barrier on ways as default barrier, i.e. same as wall, fence.

commit 4a777724b2b386a4af23bbed4ef393e9ef9c0edc
Merge: e06ea3c1 50e7457
Author: dch0ph <[email protected]>
Date:   Wed Jan 10 21:14:29 2024 +0000

    Merge remote-tracking branch 'upstream/master'

commit 50e7457
Author: dch0ph <[email protected]>
Date:   Mon Jan 8 16:39:51 2024 +0000

    Restore reef name rendering (gravitystorm#4918)

commit 258d354
Author: sommerbe <[email protected]>
Date:   Sun Dec 24 16:49:09 2023 +0100

    Adding shop symbol: hearing_aids (gravitystorm#4909)

    * Adding shop symbol: hearing_aids

    Icon source: own work.
    Rasterisation: tested with density=96,150,300,600 using ImageMagick convert

    * improves rendering of hearing_aids icon

    Using: kosmtik, mapnik
    Visual change: a) thicker and longer icon to better resemble the human ear; b) improves pixel grid alignment and simplicity

    * Improving hearing_aid symbol due to preliminary discussion

    This version is based on number 28, with minor improvements and
    svg optimisations (number 43). This symbol depicts the human ear
    with an over-the-ear hearing aid being visually slightly separated
    from the ear, as well as with sound waves propagating from behind
    towards the hearing aid receiver.

    Attention was given to a) uniqueness, b) visual simplicity, c)
    rendering quality using kosmtik as well as png export with multiple
    scaling factors (1x and 2x).

commit e06ea3c1a7be169d6a99673c57ad1dbaa7169a14
Merge: 2646c3d c39de66
Author: dch0ph <[email protected]>
Date:   Sun Dec 24 13:00:08 2023 +0000

    Merge branch 'master' of https://github.com/dch0ph/openstreetmap-carto

commit c39de66
Merge: a3ecd3f 47a96cb
Author: dch0ph <[email protected]>
Date:   Sun Dec 24 11:54:33 2023 +0000

    Merge branch 'gravitystorm:master' into master

commit 2646c3d
Merge: bfc49d0 9d3db81
Author: dch0ph <[email protected]>
Date:   Sun Nov 26 16:10:27 2023 +0000

    Merge remote-tracking branch 'upstream/master'

commit 47a96cb
Author: imagico <[email protected]>
Date:   Sun Nov 26 17:52:14 2023 +0200

    Updating changelog and preview for v5.8.0

commit 9d3db81
Author: Christoph Hormann <[email protected]>
Date:   Fri Nov 24 19:17:42 2023 +0200

    fix merge errors in gravitystorm#3750 and restore functionality as intended by the PR (gravitystorm#4841)

commit 2f23896
Author: Thomas Pétillon <[email protected]>
Date:   Fri Nov 17 13:50:59 2023 +0100

    Mini-roundabouts: fixes and trunk road support (gravitystorm#4904)

    * Fix mini_roundabout/turning_circle fill for tertiary and unclassified

    * Fix mini_roundabout/turning_circle casing for primary and secondary

    * Add support for mini_roundabout/turning_circle on trunk roads

commit 73ea404
Author: Mattijs Leon <[email protected]>
Date:   Thu Nov 9 22:33:35 2023 +0100

    Fix rendering of highway=track that was broken in PR gravitystorm#4666 (gravitystorm#4895)

    Co-authored-by: Mattijs Leon <[email protected]>

commit bfc49d0
Merge: fc884db fe6fd98
Author: dch0ph <[email protected]>
Date:   Sat Nov 4 13:05:52 2023 +0000

    Merge remote-tracking branch 'upstream/master'

commit fe6fd98
Author: Mattijs Leon <[email protected]>
Date:   Thu Nov 2 13:59:32 2023 +0100

    Add rule to render landuse flowerbed (gravitystorm#4889)

    * Add rule to render landuse flowerbed

    * Add non-pictorial rendering for lower zooms and keep pictorial rendering for high zoom levels.

    * Implement PR comments

    ---------

    Co-authored-by: Mattijs Leon <[email protected]>

commit fc884db
Merge: c4b7dfd 4abe70d
Author: dch0ph <[email protected]>
Date:   Sun Oct 29 17:32:30 2023 +0000

    Merge remote-tracking branch 'upstream/master'

commit 4abe70d
Author: Justin Gruca <[email protected]>
Date:   Sun Oct 29 07:19:53 2023 -0500

    Update pitch color to be less blue (gravitystorm#4480)

    * Update pitch color to be less blue

    * Update pitch to #88e0be per suggestion

commit ffaedb6
Merge: 3c60a7b c7c8f4f
Author: Paul Norman <[email protected]>
Date:   Thu Oct 26 19:49:42 2023 -0700

    Merge pull request gravitystorm#4887 from mnalis/fix-osdn-mirror

    Use more reliable OSDN mirror

commit c4b7dfd
Merge: a3ecd3f 88f07af
Author: dch0ph <[email protected]>
Date:   Tue Oct 24 18:59:32 2023 +0100

    Merge branch 'tweak-to-run'

commit 88f07af
Author: dch0ph <[email protected]>
Date:   Mon Oct 23 21:32:34 2023 +0100

    Tweaks to run on UKz14 setup

    Fonts -> Gillius
    No ice sheets

commit c7c8f4f
Author: Matija Nalis <[email protected]>
Date:   Wed Oct 18 18:36:22 2023 +0200

    Use more reliable OSDN mirror
    Fixes gravitystorm#4864

commit 3c60a7b
Author: Nicolas Peugnet <[email protected]>
Date:   Mon Oct 16 23:46:07 2023 +0200

    Update OSM Bright link to Geofabric's maintained fork in README.md (gravitystorm#4880)

    The Geofabric fork is still maintained and it as updated installation instructions that works.

commit 8f2b015
Author: dch0ph <[email protected]>
Date:   Mon Oct 16 19:41:22 2023 +0100

    Remove unused code in amenity-points.mss (gravitystorm#4884)

    landuse_farm is incorrect tagging and is not rendered anyway (not selected by SQL query for text-point layer)

commit eec4e9b
Author: map-per <[email protected]>
Date:   Sat Oct 14 18:32:57 2023 +0200

    Restored rendering for railway=platform + covered=yes (gravitystorm#4797)

    * Restored rendering for railway=platform + covered=yes

    * made linear platforms consistent with areas

    ---------

    Co-authored-by: map per <->

commit a3ecd3f
Author: dch0ph <[email protected]>
Date:   Thu Oct 12 21:57:37 2023 +0100

    Remove unused code in amenity-points.mss

    landuse_farm is incorrect tagging and is not rendered anyway (not selected by SQL query for text-point layer)

commit 445e553
Author: Benjamin Schultz Larsen <[email protected]>
Date:   Thu Aug 17 00:02:06 2023 +0200

    Removes amenity-points rendering for golf_hole (gravitystorm#4857)

commit aef9179
Author: kaneap <[email protected]>
Date:   Tue Jul 4 10:45:43 2023 +0200

    fix color of ref labef for subway entrance (gravitystorm#4835)

commit 1b68d57
Merge: dae7527 1da7305
Author: Paul Norman <[email protected]>
Date:   Mon May 29 17:27:22 2023 -0700

    Merge pull request gravitystorm#4666 from tjur0/feature/roller_coaster

    feat: Render roller_coaster=track ✨🎢

commit dae7527
Merge: 6591d7b 64ea80c
Author: Paul Norman <[email protected]>
Date:   Thu Mar 9 10:33:36 2023 -0800

    Merge pull request gravitystorm#4786 from thoughtful-explorer/doc-edits

    Formatting, spelling, and minor editorial corrections

commit 64ea80c
Author: Will Meredith <[email protected]>
Date:   Tue Mar 7 22:12:04 2023 -0500

    Formatting, spelling, and minor editorial corrections

commit 1da7305
Author: Mart-0 <[email protected]>
Date:   Fri Oct 21 21:24:16 2022 +0200

    fix: :art: adjust bridge casing width

commit d1809f5
Author: Mart-0 <[email protected]>
Date:   Thu Oct 20 21:40:11 2022 +0200

    fix: set variable

commit ff83a18
Author: Mart-0 <[email protected]>
Date:   Thu Oct 20 19:41:59 2022 +0200

    refactor: :art: move the dashing outside of the gaps fill layer

commit 5b65f08
Author: Mart-0 <[email protected]>
Date:   Thu Oct 20 19:22:20 2022 +0200

    fix: :art: PR feedback

    change to black for bridges, eleminate duplicate code, add comment, change name of layer

commit 7af20d5
Author: Mart-0 <[email protected]>
Date:   Mon Oct 17 10:37:47 2022 +0200

    fix: add indoor bridge support and fix one variable

commit ae4053b
Author: Mart-0 <[email protected]>
Date:   Wed Oct 12 15:32:07 2022 +0200

    fix: sql and forgot to remove one zoom line

commit eef8ac1
Author: tjur0 <[email protected]>
Date:   Wed Oct 12 13:39:29 2022 +0200

    fix: update WHERE statement

    Co-authored-by: Paul Norman <[email protected]>

commit e29df01
Author: Mart-0 <[email protected]>
Date:   Mon Oct 10 10:52:44 2022 +0200

    fix: fix pr feedback

commit d65357f
Author: Mart-0 <[email protected]>
Date:   Sat Sep 24 19:38:43 2022 +0200

    refactor: :art: Add seperate casing layer, add same group by as the road layer

commit db89734
Author: Mart-0 <[email protected]>
Date:   Sun Sep 18 16:33:57 2022 +0200

    fix: :art: move code to sperate file, fixed feedback

    move code to seperate file, ajust widths, render dashes from 16 instead of 14.

commit b0aea63
Author: Mart-0 <[email protected]>
Date:   Wed Aug 31 17:15:18 2022 +0200

    refactor: :art: improve structure

commit e88d8cc
Author: Mart-0 <[email protected]>
Date:   Wed Aug 31 17:01:23 2022 +0200

    feat: :sparkles: use attachments, add bridges

    split the rendering in layers to avoid gaps

commit 542f8bc
Author: Mart-0 <[email protected]>
Date:   Wed Aug 31 11:28:46 2022 +0200

    refactor: :art: remove roller_coaster colum

commit 0089d28
Author: Mart-0 <[email protected]>
Date:   Mon Aug 29 21:54:24 2022 +0200

    style: white-space

commit 590991d
Author: Mart-0 <[email protected]>
Date:   Mon Aug 29 21:43:54 2022 +0200

    fix: :art: remove name rendering, and fix other feedback

commit dd83871
Author: Mart-0 <[email protected]>
Date:   Mon Aug 29 07:28:01 2022 +0200

    fix: fix technical issues

commit 7177887
Author: Mart-0 <[email protected]>
Date:   Sun Aug 28 18:41:01 2022 +0200

    feat: Add roller coaster rendering
  • Loading branch information
dch0ph committed Feb 6, 2025
1 parent 27bccca commit 6cd8f9e
Show file tree
Hide file tree
Showing 34 changed files with 1,865 additions and 1,198 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@ jobs:
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 '<osm version="0.6"/>')
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
Expand Down
23 changes: 22 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
## [Unreleased](https://github.com/gravitystorm/openstreetmap-carto/compare/v5.7.0...master)
## [Unreleased](https://github.com/gravitystorm/openstreetmap-carto/compare/v5.9.0...master)

## [v5.9.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v5.8.0...v5.9.0) - 2024-10-17
### Changes
- Adding rendering of shop=hearing_aids with a dedicated symbol (#4909)
- Restoring rendering of name labels for natural=reef (#4918)
- Adding rendering of lines with barrier=jersey_barrier (#4923)
- Removing rendering of railway=preserved in favor of interpreting railway:preserved=yes on other railway=* (#4965)
- Removing rendering of shop=jewellery as synonym for shop=jewelry (#4988)
- Adding rendering of leisure=dance with a point symbol and label (#4996)
- Interpretation of transport mode specific access tags on roads/paths (#4952)

## [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
Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,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:[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]). In the event that you wish to make a complaint against a maintainer, you may instead contact the other maintainers.
If you encounter a conduct-related issue, you should report it to the maintainers by sending them [all an email](mailto:[email protected],[email protected],[email protected],[email protected],[email protected]). 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.

Expand Down
21 changes: 21 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,27 @@ instead of
}
}
```
* Use the PostgreSQL quoting syntax for attributes (columns) and string-values of selectors.
Use no quotes or double quotes for attributes (columns) and single quotes for string-values.
For Example:

```mss
#layer[entrance = 'yes'] {
marker-width: 6.0;
}
#layer["generator:source" = 'wind'] {
marker-width: 8.0;
}
```
instead of
```mss
#layer[entrance = "yes"] {
marker-width: 6.0;
}
#layer['generator:source' = 'wind'] {
marker-width: 8.0;
}
```

## SQL style guidelines
Because SQL within JSON or YAML will not generally be syntax highlighted, indentation and caps are particularly important.
Expand Down
46 changes: 26 additions & 20 deletions DOCKER.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,55 @@
# Running OpenStreetMap Carto with Docker

[Docker](https://www.docker.com/) is a virtualized environment running a [_Docker demon_](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).
[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 allows to set up a development environment for OpenStreetMap Carto easily. Specifically, this environment consists of a
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 installed
Docker itself. Otherwise you need to [install Docker Compose manually](https://docs.docker.com/compose/install/).
* 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 small OSM region. Further 1-2 GB are needed for shape files in the openstreetmap-carto/data repository.
* 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.
Read on below to get the details.
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 currently running a 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)
* 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
* 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

Instructions above will clone 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).
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.
It's probably easiest to grab an PBF of OSM data from [Geofabrik](https://download.geofabrik.de/).
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 the 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 harddisk is fast enough e.g. is a SSD), or `OSM2PGSQL_DATAFILE` if your file has a different name.
**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.

Expand Down Expand Up @@ -76,13 +82,13 @@ Depending on your machine and the size of the extract the import can take a whil

## Test rendering

After you have the necessary data available you can start Kosmtik to produce a test rendering. For that you 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 that command if it not exists.
At startup of the container the script `scripts/docker-startup.sh` is invoked which downloads necessary shapefiles with `scripts/get-external-data.py` (if they are not already present). It afterwards runs Kosmtik. 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 our `project.mml` you can place a `localconfig.js` or `localconfig.json` file into the openstreetmap-carto directory.
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 view the output of Kosmtik. By pressing Ctrl+C on the command line you can stop the container. The PostgreSQL database container is still running then (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.
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

Expand All @@ -92,7 +98,7 @@ Docker copies log files from the virtual machine into the host system, their [lo

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 directories of the user. If you don't have enough space here, you can move it elsewhere. (E.g. macOS: Docker > Preferences > Disk).
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

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.import
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ 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 /
ADD openstreetmap-carto-flex.lua /

RUN mkdir -p /openstreetmap-carto
WORKDIR /openstreetmap-carto
Expand Down
Loading

0 comments on commit 6cd8f9e

Please sign in to comment.