├── .gitignore ├── LICENCE ├── Makefile ├── README.rst ├── base.mss ├── fonts ├── OpenSans-Bold.ttf ├── OpenSans-BoldItalic.ttf ├── OpenSans-ExtraBold.ttf ├── OpenSans-ExtraBoldItalic.ttf ├── OpenSans-Italic.ttf ├── OpenSans-LICENSE.txt ├── OpenSans-Light.ttf ├── OpenSans-LightItalic.ttf ├── OpenSans-Regular.ttf ├── OpenSans-Semibold.ttf └── OpenSans-SemiboldItalic.ttf ├── icons ├── elsan.svg ├── fuel.svg ├── harbour.svg ├── lock.svg ├── marina_white_bg.svg ├── oneway-reverse.svg ├── oneway.svg ├── organic.svg ├── pier.svg ├── rubbish.svg ├── seasonal.svg ├── shower.svg ├── station.svg ├── toilets.svg ├── water_point.svg └── waterway │ └── sign │ ├── attention.png │ ├── maxdraft_17.svg │ ├── maxdraft_18.svg │ ├── min_distance_left.png │ ├── min_distance_right.png │ ├── no.svg │ ├── no_17.svg │ ├── no_18.svg │ ├── no_anchor.png │ ├── no_entry.png │ ├── no_parking.png │ ├── no_u_turn.png │ ├── parking.png │ ├── stop.png │ └── u_turn.png ├── labels.mss ├── lib └── openriverboatmap │ ├── __init__.py │ ├── fabfile.py │ └── requirements.pip ├── localconfig.json.sample ├── palette.mss ├── project.yml ├── roads.mss └── waterways.mss /.gitignore: -------------------------------------------------------------------------------- 1 | *.cache 2 | *.pyc 3 | openriverboatmap/.thumb.png 4 | cache 5 | node_modules/* 6 | data/ 7 | localconfig.js* 8 | tmp/ 9 | -------------------------------------------------------------------------------- /LICENCE: -------------------------------------------------------------------------------- 1 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2 | Version 2, December 2004 3 | 4 | Copyright (C) 2004 Sam Hocevar 5 | 6 | Everyone is permitted to copy and distribute verbatim or modified 7 | copies of this license document, and changing it is allowed as long 8 | as the name is changed. 9 | 10 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 11 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 12 | 13 | 0. You just DO WHAT THE FUCK YOU WANT TO. -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | PBF ?= "europe/france/ile-de-france-latest.osm.pbf" 2 | all: download import 3 | download: 4 | wget --show-progress --directory-prefix=tmp/pbf/ --force-directories --no-host-directories http://download.geofabrik.de/$(PBF) 5 | import: 6 | osm2pgsql -G -d osm tmp/pbf/$(PBF) --hstore --create 7 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | Open Riverboat Map 2 | ================== 3 | 4 | Open Riverboat Map plans to make an open source CartoCSS map style of navigable waterways, on top of OpenStreetMap project. 5 | 6 | Open Riverboat Map is derived from `OSM-bright `_ MapBox project. 7 | 8 | 9 | Design philosophy 10 | ----------------- 11 | 12 | * at **low zoom level**, all the navigable waterways network should appear clearly ; all other informations are diminished, unless some main geographical informations that helps understand the situation (mainly big cities) 13 | 14 | * at **intermediate zoom level**, the navigable waterways remain the central informations, but also some other usefull informations must be visible: main harbours, locks (quietly)... Non "riverboat" informations begin to become visible, but allways in second place 15 | 16 | * at **high zoom level**, we try to display as useful informations as possible for the "inland navigator": mooring places, height of bridges, number of arches for a bridge, oneways... 17 | 18 | 19 | Getting involved 20 | ---------------- 21 | 22 | * symlink the `openriverboatmap` directory into your TileMill projects directory (by default in `~/Documents/MapBox/project/`). 23 | 24 | * import some OSM data with `osm2pgsql `_ , using default style but **with option --hstore-all** (or ping me to get a psql dump) 25 | 26 | * indexes to create:: 27 | 28 | CREATE INDEX idx_planet_osm_line_motorboat_waterway ON planet_osm_line USING btree(waterway,(tags->'motorboat'),(tags->'CEMT')) WHERE waterway IS NOT NULL AND (tags ? 'motorboat' or tags ? 'CEMT'); 29 | CREATE INDEX idx_planet_osm_polygon_leisure ON planet_osm_polygon USING btree(leisure) WHERE leisure IS NOT NULL; 30 | CREATE INDEX idx_planet_osm_polygon_waterway ON planet_osm_polygon USING btree(waterway,way_area) WHERE waterway IS NOT NULL; 31 | CREATE INDEX idx_planet_osm_polygon_natural ON planet_osm_polygon USING btree("natural",way_area) WHERE "natural" IS NOT NULL; 32 | CREATE INDEX idx_planet_osm_polygon_area_100000 ON planet_osm_polygon USING btree(way_area) WHERE way_area > 100000; 33 | CREATE INDEX idx_planet_osm_polygon_area_10000 ON planet_osm_polygon USING btree(way_area) WHERE way_area > 10000; 34 | CREATE INDEX idx_planet_osm_line_man_made ON planet_osm_line USING btree(man_made) WHERE man_made IS NOT NULL; 35 | CREATE INDEX idx_planet_osm_polygon_man_made ON planet_osm_polygon USING btree(man_made) WHERE man_made IS NOT NULL; 36 | 37 | * for customizing local database connection, you can use `CartoCC `_ 38 | 39 | * start hacking the style, commit in a branch, and make a pull request! :) 40 | 41 | 42 | Who use it? 43 | ----------- 44 | * http://fluv.io 45 | * http://maps.grade.de/mobile.htm 46 | * http://maps.grade.de/routino/index.html 47 | * http://www.skipperguide.de -- e.g. http://www.skipperguide.de/wiki/Sa%C3%B4ne 48 | * https://maposmatic.osm-baustelle.de/ -- for printable output 49 | * As TMS: `http://{switch:a,b,c}.tile.openstreetmap.fr/openriverboatmap/{zoom}/{x}/{y}.png` 50 | 51 | Screenshots 52 | ----------- 53 | 54 | .. image:: http://i.imgur.com/jAXYLh.png 55 | .. image:: http://i.imgur.com/HfEtJh.jpg 56 | .. image:: http://i.imgur.com/NoJmAh.png 57 | .. image:: http://i.imgur.com/5agyi.png 58 | .. image:: http://www.s258792424.onlinehome.fr/aquanomade/phpBB3/download/file.php?id=1035 59 | -------------------------------------------------------------------------------- /base.mss: -------------------------------------------------------------------------------- 1 | /* BASE.MSS CONTENTS 2 | * - Landuse & landcover 3 | * - Water areas 4 | * - Water ways 5 | * - Administrative Boundaries 6 | * 7 | */ 8 | 9 | Map {buffer-size: 256;} 10 | 11 | /* ================================================================== */ 12 | /* LANDUSE & LANDCOVER 13 | /* ================================================================== */ 14 | 15 | #land-low[zoom>=0][zoom<6], 16 | #land[zoom>=6] { 17 | polygon-fill: @land; 18 | polygon-gamma: 0.75; 19 | } 20 | 21 | #landuse_gen0[zoom>3][zoom<=9], 22 | #landuse_gen1[zoom>9][zoom<=12], 23 | #landuse[zoom>12] { 24 | [type='cemetery'] { polygon-fill: @cemetery; } 25 | [type='grave_yard'] { polygon-fill: @cemetery; } 26 | [type='college'] { polygon-fill: @school; } 27 | [type='commercial'] { polygon-fill: @industrial; } 28 | [type='common'] { polygon-fill: @park; } 29 | [type='golf_course'] { polygon-fill: @park; } 30 | [type='hospital'] { polygon-fill: @hospital; } 31 | [type='industrial'] { polygon-fill: @industrial; } 32 | [type='landfill'] { polygon-fill: darken(@industrial,10%); } 33 | [type='quarry'] { polygon-fill: @industrial; } 34 | [type='parking'] { polygon-fill: @parking; } 35 | [type='pedestrian'] { polygon-fill: @pedestrian_case; } 36 | [type='residential'] { polygon-fill: @residential; } 37 | [type='school'] { polygon-fill: @school; } 38 | [type='sports_centre'] { polygon-fill: @sports; } 39 | [type='stadium'] { polygon-fill: @sports; } 40 | [type='university'] { polygon-fill: @school; } 41 | [type='pitch'] { polygon-fill: @sports; polygon-opacity: 0.8; } 42 | [type='grass'] { polygon-fill: @grass; } 43 | [type='park'] { polygon-fill: @park; } 44 | [type='garden'] { polygon-fill: @park; } 45 | [type='village_green'] { polygon-fill: @park; } 46 | [type='recreation_ground'] { polygon-fill: @park; } 47 | [type='picnic_site'] { polygon-fill: @park; } 48 | [type='camp_site'] { polygon-fill: @park; } 49 | [type='playground'] { polygon-fill: @park; } 50 | [type='forest'] { polygon-fill: @wooded; } 51 | [type='wood'] { polygon-fill: @wooded; } 52 | [type='heath'] { polygon-fill: @heath; } 53 | [type='meadow'] { polygon-fill: @heath; } 54 | [type='scrub'] { polygon-fill: @heath; } 55 | [type='farmland'] { polygon-fill: @agriculture; } 56 | [type='farm'] { polygon-fill: @agriculture; } 57 | [type='orchard'] { polygon-fill: @agriculture; } 58 | [type='allotments'] { polygon-fill: @agriculture; } 59 | [type='military'] { polygon-fill: @military; } 60 | [type='beach'] { polygon-fill: @beach; } 61 | [type='wetland'] { polygon-fill: @wetland; } 62 | } 63 | 64 | #landuse_overlays[type='nature_reserve'][zoom>6] { 65 | line-color: darken(@wooded,25%); 66 | line-opacity: 0.3; 67 | line-dasharray: 1,1; 68 | polygon-fill: darken(@wooded,25%); 69 | polygon-opacity: 0.1; 70 | [zoom=7] { line-width: 0.4; } 71 | [zoom=8] { line-width: 0.6; } 72 | [zoom=9] { line-width: 0.8; } 73 | [zoom=10] { line-width: 1.0; } 74 | [zoom=11] { line-width: 1.5; } 75 | [zoom>=12] { line-width: 2.0; } 76 | } 77 | 78 | /* ---- BUILDINGS ---- */ 79 | #buildings[zoom>=13] { 80 | polygon-fill:@building; 81 | [zoom>=14] { 82 | line-color:darken(@building,5%); 83 | line-width:0.2; 84 | } 85 | [zoom>=16] { 86 | line-color:darken(@building,10%); 87 | line-width:0.4; 88 | } 89 | } 90 | 91 | 92 | /* ================================================================== */ 93 | /* ADMINISTRATIVE BOUNDARIES 94 | /* ================================================================== */ 95 | 96 | 97 | #admin[zoom>1] { 98 | ::outline { 99 | line-color: lighten(@admin_2, 25%); 100 | line-width: 2.5; 101 | line-opacity: 0.3; 102 | } 103 | line-color: @admin_2; 104 | line-width: 0.5; 105 | line-dasharray: 20,10,5,10; 106 | line-opacity: 0.6; 107 | } 108 | 109 | /* ================================================================== */ 110 | /* BARRIER POINTS 111 | /* ================================================================== */ 112 | 113 | 114 | #barrier_points[zoom>=17][stylegroup = 'divider'] { 115 | marker-height: 2; 116 | marker-fill: #c7c7c7; 117 | marker-line-opacity:0; 118 | marker-allow-overlap:true; 119 | } 120 | 121 | /* ================================================================== */ 122 | /* BARRIER LINES 123 | /* ================================================================== */ 124 | 125 | #barrier_lines[zoom>=17][stylegroup = 'gate'] { 126 | line-width:2.5; 127 | line-color:#aab; 128 | line-dasharray:3,2; 129 | } 130 | 131 | #barrier_lines[zoom>=17][stylegroup = 'fence'] { 132 | line-width:1.75; 133 | line-color:#aab; 134 | line-dasharray:1,1; 135 | } 136 | 137 | #barrier_lines[zoom>=17][stylegroup = 'hedge'] { 138 | line-width:3; 139 | line-color:darken(@park,5%); 140 | 141 | } 142 | -------------------------------------------------------------------------------- /fonts/OpenSans-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilery/OpenRiverboatMap/3d828104cd5caf4d2ed15d47c2ffbf8c5b6024e8/fonts/OpenSans-Bold.ttf -------------------------------------------------------------------------------- /fonts/OpenSans-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilery/OpenRiverboatMap/3d828104cd5caf4d2ed15d47c2ffbf8c5b6024e8/fonts/OpenSans-BoldItalic.ttf -------------------------------------------------------------------------------- /fonts/OpenSans-ExtraBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilery/OpenRiverboatMap/3d828104cd5caf4d2ed15d47c2ffbf8c5b6024e8/fonts/OpenSans-ExtraBold.ttf -------------------------------------------------------------------------------- /fonts/OpenSans-ExtraBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilery/OpenRiverboatMap/3d828104cd5caf4d2ed15d47c2ffbf8c5b6024e8/fonts/OpenSans-ExtraBoldItalic.ttf -------------------------------------------------------------------------------- /fonts/OpenSans-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilery/OpenRiverboatMap/3d828104cd5caf4d2ed15d47c2ffbf8c5b6024e8/fonts/OpenSans-Italic.ttf -------------------------------------------------------------------------------- /fonts/OpenSans-LICENSE.txt: -------------------------------------------------------------------------------- 1 | Apache License 2 | 3 | Version 2.0, January 2004 4 | 5 | http://www.apache.org/licenses/ 6 | 7 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 8 | 9 | 1. Definitions. 10 | 11 | "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. 16 | 17 | "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. 18 | 19 | "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. 20 | 21 | "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. 22 | 23 | "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). 24 | 25 | "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. 26 | 27 | "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." 28 | 29 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 30 | 31 | 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 32 | 33 | 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 34 | 35 | 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: 36 | 37 | You must give any other recipients of the Work or Derivative Works a copy of this License; and 38 | 39 | You must cause any modified files to carry prominent notices stating that You changed the files; and 40 | 41 | You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and 42 | 43 | If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 44 | 45 | 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 46 | 47 | 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 48 | 49 | 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 50 | 51 | 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 52 | 53 | 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. -------------------------------------------------------------------------------- /fonts/OpenSans-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilery/OpenRiverboatMap/3d828104cd5caf4d2ed15d47c2ffbf8c5b6024e8/fonts/OpenSans-Light.ttf -------------------------------------------------------------------------------- /fonts/OpenSans-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilery/OpenRiverboatMap/3d828104cd5caf4d2ed15d47c2ffbf8c5b6024e8/fonts/OpenSans-LightItalic.ttf -------------------------------------------------------------------------------- /fonts/OpenSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilery/OpenRiverboatMap/3d828104cd5caf4d2ed15d47c2ffbf8c5b6024e8/fonts/OpenSans-Regular.ttf -------------------------------------------------------------------------------- /fonts/OpenSans-Semibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilery/OpenRiverboatMap/3d828104cd5caf4d2ed15d47c2ffbf8c5b6024e8/fonts/OpenSans-Semibold.ttf -------------------------------------------------------------------------------- /fonts/OpenSans-SemiboldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilery/OpenRiverboatMap/3d828104cd5caf4d2ed15d47c2ffbf8c5b6024e8/fonts/OpenSans-SemiboldItalic.ttf -------------------------------------------------------------------------------- /icons/elsan.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /icons/fuel.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 20 | 43 | 52 | 53 | 55 | 56 | 58 | image/svg+xml 59 | 61 | 62 | 63 | 64 | 65 | 70 | 77 | 84 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /icons/harbour.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 20 | 42 | 51 | 52 | 54 | 55 | 57 | image/svg+xml 58 | 60 | 61 | 62 | 63 | 64 | 69 | 73 | 86 | 99 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /icons/lock.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 20 | 43 | 52 | 53 | 55 | 56 | 58 | image/svg+xml 59 | 61 | 62 | 63 | 64 | 65 | 70 | 76 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /icons/marina_white_bg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | image/svg+xml 49 | 50 | -------------------------------------------------------------------------------- /icons/oneway-reverse.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | 16 | 18 | 19 | 21 | image/svg+xml 22 | 24 | 25 | 26 | 27 | 28 | 31 | 39 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /icons/oneway.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | 16 | 18 | 19 | 21 | image/svg+xml 22 | 24 | 25 | 26 | 27 | 28 | 31 | 38 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /icons/organic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 20 | 43 | 52 | 53 | 55 | 56 | 58 | image/svg+xml 59 | 61 | 62 | 63 | 64 | 65 | 70 | 77 | 84 | 90 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /icons/pier.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 20 | 43 | 52 | 53 | 55 | 56 | 58 | image/svg+xml 59 | 61 | 62 | 63 | 64 | 65 | 70 | 72 | 76 | 82 | 83 | 87 | 93 | 94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /icons/rubbish.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 19 | 20 | 21 | 22 | 24 | 26 | 27 | -------------------------------------------------------------------------------- /icons/seasonal.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 20 | 43 | 52 | 53 | 55 | 56 | 58 | image/svg+xml 59 | 61 | 62 | 63 | 64 | 65 | 70 | 74 | 84 | 94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /icons/shower.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /icons/station.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 20 | 43 | 52 | 53 | 55 | 56 | 58 | image/svg+xml 59 | 61 | 62 | 63 | 64 | 65 | 70 | 76 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /icons/toilets.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 24 | 27 | 28 | 29 | 32 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /icons/water_point.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 22 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /icons/waterway/sign/attention.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilery/OpenRiverboatMap/3d828104cd5caf4d2ed15d47c2ffbf8c5b6024e8/icons/waterway/sign/attention.png -------------------------------------------------------------------------------- /icons/waterway/sign/maxdraft_17.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 20 | 38 | 40 | 41 | 43 | image/svg+xml 44 | 46 | 47 | 48 | 49 | 50 | 55 | 62 | 69 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /icons/waterway/sign/maxdraft_18.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 20 | 38 | 40 | 41 | 43 | image/svg+xml 44 | 46 | 47 | 48 | 49 | 50 | 55 | 62 | 69 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /icons/waterway/sign/min_distance_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilery/OpenRiverboatMap/3d828104cd5caf4d2ed15d47c2ffbf8c5b6024e8/icons/waterway/sign/min_distance_left.png -------------------------------------------------------------------------------- /icons/waterway/sign/min_distance_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilery/OpenRiverboatMap/3d828104cd5caf4d2ed15d47c2ffbf8c5b6024e8/icons/waterway/sign/min_distance_right.png -------------------------------------------------------------------------------- /icons/waterway/sign/no.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 20 | 38 | 40 | 41 | 43 | image/svg+xml 44 | 46 | 47 | 48 | 49 | 50 | 55 | 68 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /icons/waterway/sign/no_17.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 20 | 42 | 44 | 45 | 47 | image/svg+xml 48 | 50 | 51 | 52 | 53 | 54 | 59 | 72 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /icons/waterway/sign/no_18.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 20 | 38 | 40 | 41 | 43 | image/svg+xml 44 | 46 | 47 | 48 | 49 | 50 | 55 | 68 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /icons/waterway/sign/no_anchor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilery/OpenRiverboatMap/3d828104cd5caf4d2ed15d47c2ffbf8c5b6024e8/icons/waterway/sign/no_anchor.png -------------------------------------------------------------------------------- /icons/waterway/sign/no_entry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilery/OpenRiverboatMap/3d828104cd5caf4d2ed15d47c2ffbf8c5b6024e8/icons/waterway/sign/no_entry.png -------------------------------------------------------------------------------- /icons/waterway/sign/no_parking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilery/OpenRiverboatMap/3d828104cd5caf4d2ed15d47c2ffbf8c5b6024e8/icons/waterway/sign/no_parking.png -------------------------------------------------------------------------------- /icons/waterway/sign/no_u_turn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilery/OpenRiverboatMap/3d828104cd5caf4d2ed15d47c2ffbf8c5b6024e8/icons/waterway/sign/no_u_turn.png -------------------------------------------------------------------------------- /icons/waterway/sign/parking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilery/OpenRiverboatMap/3d828104cd5caf4d2ed15d47c2ffbf8c5b6024e8/icons/waterway/sign/parking.png -------------------------------------------------------------------------------- /icons/waterway/sign/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilery/OpenRiverboatMap/3d828104cd5caf4d2ed15d47c2ffbf8c5b6024e8/icons/waterway/sign/stop.png -------------------------------------------------------------------------------- /icons/waterway/sign/u_turn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilery/OpenRiverboatMap/3d828104cd5caf4d2ed15d47c2ffbf8c5b6024e8/icons/waterway/sign/u_turn.png -------------------------------------------------------------------------------- /labels.mss: -------------------------------------------------------------------------------- 1 | /* LABELS.MSS CONTENTS: 2 | * - place names 3 | * - area labels 4 | * - waterway labels 5 | */ 6 | 7 | /* Font sets are defined in palette.mss */ 8 | 9 | /* Mapnik does not yet support character-spacing adjustments for 10 | labels placed along a line. We can fake this using the replace() 11 | function in the text-name parameter by replacing each character 12 | with itself followed by one or more spaces. */ 13 | 14 | /* ================================================================== */ 15 | /* PLACE NAMES 16 | /* ================================================================== */ 17 | 18 | #place::country[type='country'][zoom>3][zoom<6] { 19 | text-name:'[name]'; 20 | text-face-name:@sans_bold; 21 | text-placement:point; 22 | text-fill:@country_text; 23 | text-halo-fill: @country_halo; 24 | text-halo-radius: 1; 25 | [zoom=3] { 26 | text-size:10 + @text_adjust; 27 | text-wrap-width: 40; 28 | } 29 | [zoom=4] { 30 | text-size:11 + @text_adjust; 31 | text-wrap-width: 50; 32 | } 33 | [zoom>4] { 34 | text-halo-radius: 2; 35 | } 36 | [zoom=5] { 37 | text-size:11 + @text_adjust; 38 | text-wrap-width: 50; 39 | text-line-spacing: 1; 40 | } 41 | [zoom=6] { 42 | text-size:12 + @text_adjust; 43 | text-character-spacing: 1; 44 | text-wrap-width: 80; 45 | text-line-spacing: 2; 46 | } 47 | [zoom=7] { 48 | text-size:14 + @text_adjust; 49 | text-character-spacing: 2; 50 | } 51 | } 52 | 53 | #place::state[type='state'][zoom>=8][zoom<=10] { 54 | text-name:'[name]'; 55 | text-face-name:@sans_bold_italic; 56 | text-placement:point; 57 | text-fill:@state_text; 58 | text-halo-fill: @state_halo; 59 | text-halo-radius: 1; 60 | [zoom=6] { 61 | text-size:10 + @text_adjust; 62 | text-wrap-width: 40; 63 | } 64 | [zoom=7] { 65 | text-size:11 + @text_adjust; 66 | text-wrap-width: 50; 67 | } 68 | [zoom>8] { 69 | text-halo-radius: 2; 70 | } 71 | [zoom=8] { 72 | text-size:11 + @text_adjust; 73 | text-wrap-width: 50; 74 | text-line-spacing: 1; 75 | } 76 | [zoom=9] { 77 | text-size:12 + @text_adjust; 78 | text-character-spacing: 1; 79 | text-wrap-width: 80; 80 | text-line-spacing: 2; 81 | } 82 | [zoom=10] { 83 | text-size:14 + @text_adjust; 84 | text-character-spacing: 2; 85 | } 86 | } 87 | 88 | /* ---- Cities ------------------------------------------------------ */ 89 | 90 | #place::city[type='city'][zoom>=8][zoom<=16] { 91 | text-name:'[name]'; 92 | text-face-name:@sans_italic; 93 | text-placement:point; 94 | text-fill:@city_text; 95 | text-halo-fill:@city_halo; 96 | text-halo-radius:2; 97 | text-transform: uppercase; 98 | text-label-position-tolerance: 50; 99 | [zoom<=8] { 100 | text-size: 9; 101 | text-halo-radius:1; 102 | } 103 | [zoom=9] { 104 | text-size:10; 105 | text-wrap-width: 60; 106 | } 107 | [zoom=10] { 108 | text-size:11; 109 | text-wrap-width: 70; 110 | } 111 | [zoom=11] { 112 | text-size:12; 113 | text-character-spacing: 1; 114 | text-wrap-width: 80; 115 | } 116 | [zoom=12] { 117 | text-size:13; 118 | text-character-spacing: 1; 119 | text-wrap-width: 100; 120 | } 121 | [zoom=13] { 122 | text-size:14; 123 | text-character-spacing: 2; 124 | text-wrap-width: 200; 125 | } 126 | [zoom=14] { 127 | text-size:15; 128 | text-character-spacing: 4; 129 | text-wrap-width: 300; 130 | } 131 | [zoom=15] { 132 | text-size:16; 133 | text-character-spacing: 6; 134 | text-wrap-width: 400; 135 | } 136 | } 137 | 138 | /* ---- Towns ------------------------------------------------------- */ 139 | 140 | #place::town[type='town'][zoom>=10][zoom<=17] { 141 | text-name:'[name]'; 142 | text-face-name: @sans_lt_italic; 143 | text-placement:point; 144 | text-fill:@town_text; 145 | text-size:9; 146 | text-halo-fill:@town_halo; 147 | text-halo-radius:1; 148 | text-wrap-width: 50; 149 | text-min-distance: 10; 150 | text-label-position-tolerance: 50; 151 | [zoom>=10] { 152 | text-halo-radius:2; 153 | text-fill: lighten(@town_text,5%); 154 | text-size: 10; 155 | } 156 | [zoom>=11]{ text-size:11; } 157 | [zoom>=12]{ 158 | text-size:12; 159 | text-line-spacing: 1; 160 | } 161 | [zoom>=13]{ 162 | text-transform: uppercase; 163 | text-character-spacing: 1; 164 | text-line-spacing: 2; 165 | } 166 | [zoom>=14]{ 167 | text-size:13; 168 | text-character-spacing: 2; 169 | text-line-spacing: 3; 170 | } 171 | [zoom>=15]{ 172 | text-size:14; 173 | text-character-spacing: 3; 174 | text-line-spacing: 4; 175 | } 176 | [zoom>=15]{ 177 | text-size:15; 178 | text-character-spacing: 4; 179 | text-line-spacing: 5; 180 | } 181 | [zoom>=17]{ 182 | text-size:16; 183 | text-character-spacing: 5; 184 | text-line-spacing: 6; 185 | } 186 | } 187 | 188 | /* ---- Other small places ------------------------------------------ */ 189 | 190 | #place::small[type='village'][zoom>=11], 191 | #place::small[type='suburb'][zoom>=13], 192 | #place::small[type='hamlet'][zoom>=13] { 193 | text-name:'[name]'; 194 | text-face-name: @sans_lt_italic; 195 | text-placement:point; 196 | text-fill:@other_text; 197 | text-size:10; 198 | text-halo-fill:@other_halo; 199 | text-halo-radius:1; 200 | text-min-distance: 10; 201 | [zoom>=14] { 202 | text-size:11; 203 | text-character-spacing: 1; 204 | text-line-spacing: 1; 205 | } 206 | [zoom>=15] { 207 | text-halo-radius: 2; 208 | text-transform: uppercase; 209 | text-character-spacing: 1; 210 | text-wrap-width: 60; 211 | text-line-spacing: 1; 212 | } 213 | [zoom>=16] { 214 | text-size:12; 215 | text-character-spacing: 2; 216 | text-wrap-width: 120; 217 | text-line-spacing: 2; 218 | } 219 | [zoom>=17] { 220 | text-size:13; 221 | text-character-spacing: 3; 222 | text-wrap-width: 160; 223 | text-line-spacing: 4; 224 | } 225 | [zoom>=18] { 226 | text-size:14; 227 | text-character-spacing: 4; 228 | text-line-spacing: 6; 229 | } 230 | } 231 | 232 | #place::small[type='locality'][zoom>=15] { 233 | text-name:'[name]'; 234 | text-face-name: @sans_lt_italic; 235 | text-placement:point; 236 | text-fill:@locality_text; 237 | text-size:9; 238 | text-halo-fill:@locality_halo; 239 | text-halo-radius:1; 240 | text-wrap-width: 30; 241 | [zoom>=16] { 242 | text-size:10; 243 | text-wrap-width: 60; 244 | text-line-spacing: 1; 245 | } 246 | [zoom>=17] { 247 | text-size:11; 248 | text-wrap-width: 120; 249 | text-line-spacing: 2; 250 | } 251 | [zoom>=18] { 252 | text-size:12; 253 | text-character-spacing: 1; 254 | text-line-spacing: 4; 255 | } 256 | } 257 | 258 | 259 | // ===================================================================== 260 | // AREA LABELS 261 | // ===================================================================== 262 | 263 | #area_label[type!=null] { 264 | // Bring in labels gradually as one zooms in, bases on polygon area 265 | [zoom>=10][area>102400000], 266 | [zoom>=11][area>25600000], 267 | [zoom>=13][area>1600000], 268 | [zoom>=14][area>320000], 269 | [zoom>=15][area>80000], 270 | [zoom>=16][area>20000], 271 | [zoom>=17][area>5000], 272 | [zoom>=18][area>=0] { 273 | text-name: "[name]"; 274 | text-halo-radius: 1.5; 275 | text-face-name:@sans; 276 | text-size: 11; 277 | text-wrap-width:30; 278 | text-fill: #888; 279 | text-halo-fill: #fff; 280 | // Specific style overrides for different types of areas: 281 | [type='park'][zoom>=10] { 282 | text-face-name: @sans_lt_italic; 283 | text-fill: @park * 0.6; 284 | text-halo-fill: lighten(@park, 10%); 285 | } 286 | [type='golf_course'][zoom>=10] { 287 | text-fill: @sports * 0.6; 288 | text-halo-fill: lighten(@sports, 10%); 289 | } 290 | [type='cemetery'][zoom>=10] { 291 | text-fill: @cemetery * 0.6; 292 | text-halo-fill: lighten(@cemetery, 10%); 293 | } 294 | [type='hospital'][zoom>=10] { 295 | text-fill: @hospital * 0.6; 296 | text-halo-fill: lighten(@hospital, 10%); 297 | } 298 | [type='college'][zoom>=10], 299 | [type='school'][zoom>=10], 300 | [type='university'][zoom>=10] { 301 | text-fill: @school * 0.6; 302 | text-halo-fill: lighten(@school, 10%); 303 | } 304 | [type='water'][zoom>=10] { 305 | text-fill: @water * 0.6; 306 | text-halo-fill: lighten(@water, 10%); 307 | } 308 | } 309 | [zoom=15][area>1600000], 310 | [zoom=16][area>80000], 311 | [zoom=17][area>20000], 312 | [zoom=18][area>5000] { 313 | text-name: "[name]"; 314 | text-size: 13; 315 | text-wrap-width: 60; 316 | text-character-spacing: 1; 317 | text-halo-radius: 2; 318 | } 319 | [zoom=16][area>1600000], 320 | [zoom=17][area>80000], 321 | [zoom=18][area>20000] { 322 | text-size: 15; 323 | text-character-spacing: 2; 324 | text-wrap-width: 120; 325 | } 326 | [zoom>=17][area>1600000], 327 | [zoom>=18][area>80000] { 328 | text-size: 20; 329 | text-character-spacing: 3; 330 | text-wrap-width: 180; 331 | } 332 | } 333 | 334 | #poi[type='university'][zoom>=15], 335 | #poi[type='hospital'][zoom>=16], 336 | #poi[type='school'][zoom>=17], 337 | #poi[type='library'][zoom>=17] { 338 | text-name:"[name]"; 339 | text-face-name:@sans; 340 | text-size:10; 341 | text-wrap-width:30; 342 | text-fill: @poi_text; 343 | } 344 | 345 | /* ================================================================== */ 346 | /* ROAD LABELS 347 | /* ================================================================== */ 348 | 349 | #motorway_label[type='motorway'][zoom>9], 350 | #motorway_label[type='trunk'][zoom>9] { 351 | text-name:"[name]"; 352 | text-face-name:@sans_bold; 353 | text-placement:line; 354 | text-fill:@road_text; 355 | text-halo-fill:@road_halo; 356 | text-halo-radius:1; 357 | text-min-distance: 200; 358 | text-size:10; 359 | } 360 | 361 | #mainroad_label[type='primary'][zoom>12], 362 | #mainroad_label[type='secondary'][zoom>13], 363 | #mainroad_label[type='tertiary'][zoom>13] { 364 | text-name:'[name]'; 365 | text-face-name:@sans; 366 | text-placement:line; 367 | text-fill:@road_text; 368 | text-halo-fill:@road_halo; 369 | text-halo-radius:1; 370 | text-min-distance:100; 371 | text-size:11; 372 | } 373 | 374 | #minorroad_label[zoom>14] { 375 | text-name:'[name]'; 376 | text-face-name:@sans; 377 | text-placement:line; 378 | text-size:9; 379 | text-fill:@road_text; 380 | text-halo-fill:@road_halo; 381 | text-halo-radius:1; 382 | text-min-distance:60; 383 | text-size:11; 384 | } 385 | 386 | /* ================================================================== */ 387 | /* ONE-WAY ARROWS 388 | /* ================================================================== */ 389 | 390 | #motorway_label[oneway!=0][zoom>=16], 391 | #mainroad_label[oneway!=0][zoom>=16], 392 | #minorroad_label[oneway!=0][zoom>=16] { 393 | marker-placement:line; 394 | marker-max-error: 0.5; 395 | marker-spacing: 200; 396 | marker-file: url("icons/oneway.svg"); 397 | [oneway=-1] { marker-file: url("icons/oneway-reverse.svg"); } 398 | [zoom=16] { marker-transform: "scale(0.5)"; } 399 | [zoom=17] { marker-transform: "scale(0.75)"; } 400 | } 401 | 402 | 403 | /* ================================================================== */ 404 | /* WATERWAY LABELS 405 | /* ================================================================== */ 406 | 407 | #waterway_label[navigable='yes'][zoom>=7][zoom<18], 408 | #waterway_label[type='river'][navigable='no'][zoom>=13][zoom<18], 409 | #waterway_label[type='canal'][navigable='no'][zoom>=13][zoom<18], 410 | #waterway_label[type='stream'][navigable='no'][zoom>=17] { 411 | text-fill: @water * 0.75; 412 | text-halo-fill: fadeout(lighten(@water,5%),25%); 413 | text-name: "[name]"; 414 | text-face-name: @sans_italic; 415 | text-placement: line; 416 | text-size: 11; 417 | [navigable='yes'] { 418 | text-fill: @navigable_text; 419 | text-halo-fill: fadeout(#fff,25%); 420 | } 421 | [navigable='yes'][zoom<13] { 422 | text-halo-radius: 2; 423 | text-label-position-tolerance: 100; 424 | text-min-distance: 70; 425 | [zoom<=10] { 426 | text-min-distance: 50; 427 | text-placement: point; 428 | } 429 | } 430 | [zoom>=13] { 431 | text-halo-radius: 1; 432 | text-min-distance: 400; 433 | } 434 | [type='river'][zoom=15], 435 | [type='canal'][zoom=17] { 436 | text-size: 11; 437 | } 438 | [type='river'][zoom>=16] { 439 | text-size: 14; 440 | text-spacing: 300; 441 | } 442 | } 443 | 444 | #waterway_label::oneway[oneway=-1][zoom>=17], 445 | #waterway_label::oneway[oneway='alternate'][zoom>=17], 446 | #waterway_label::oneway[oneway='yes'][zoom>=17] { 447 | text-name:"''"; 448 | text-face-name: @sans; 449 | text-min-distance: 0; 450 | text-spacing: 100; 451 | [zoom=18] { 452 | text-spacing: 200; 453 | } 454 | text-placement: line; 455 | text-fill: #fff * 0.75; 456 | text-size: 16; 457 | [oneway='yes'] { 458 | text-name:"'→'"; 459 | } 460 | [oneway=-1] { 461 | text-name:"'←'"; 462 | } 463 | [oneway='alternate'] { 464 | text-name:"'←→'"; 465 | } 466 | } 467 | 468 | /* ================================================================== */ 469 | /* WATERWAY POIS 470 | /* ================================================================== */ 471 | 472 | #marinas[seasonal='no'][zoom>=7][zoom<18], 473 | #marinas[seasonal='yes'][zoom>=10][zoom<18] { 474 | shield-file: url('./icons/harbour.svg'); 475 | // [seasonal='yes'] { 476 | // shield-file: url('./icons/seasonal.svg'); 477 | // } 478 | shield-text-dy: 3; 479 | shield-text-dx: 3; 480 | shield-face-name: @sans_bold; 481 | shield-fill: @harbour_text; 482 | shield-halo-fill: @harbour_halo; 483 | shield-halo-radius: 2; 484 | shield-size: 10; 485 | shield-placement-type: simple; 486 | shield-placements: "NE,NW,SE,SW,E,W,N,S"; 487 | shield-min-distance: 5; 488 | shield-unlock-image: true; 489 | shield-name:"[name].replace('[Hh]alte ([Nn]autique |[Ff]luviale )?(de |du |d\'|des )','').replace('[Pp]ort (de |du |d\'|des )([Pp]laisance )?','')"; 490 | [seasonal='yes'] { 491 | shield-face-name: @sans; 492 | shield-fill:@marina_text; 493 | shield-halo-fill:@marina_halo; 494 | } 495 | } 496 | #locks::label[zoom>=14] { 497 | shield-file: url('./icons/lock.svg'); 498 | shield-text-dy: 4; 499 | shield-text-dx: 8; 500 | shield-name: "[name]"; 501 | shield-face-name: @sans; 502 | shield-placement: point; 503 | shield-fill: @marina_text; 504 | shield-size: 10; 505 | shield-halo-fill: @marina_halo; 506 | shield-halo-radius: 2; 507 | shield-wrap-width: 50; 508 | shield-placement-type: simple; 509 | shield-placements: "E,W,N,S,NE,NW,SE,SW"; 510 | shield-unlock-image: true; 511 | [height!=null] { 512 | shield-name: "[name] + ' (' + [height] + ')'"; 513 | } 514 | } 515 | #piers_symbol[mooring='yes'][zoom>=10][zoom<=14] { 516 | marker-file: url('./icons/pier.svg'); 517 | [zoom<=11] { 518 | marker-transform: scale(.6,.6); 519 | } 520 | [zoom=12] { 521 | marker-transform: scale(.8,.8); 522 | } 523 | } 524 | #pois[type='drinking_water'][zoom>=15] { 525 | marker-file: url('./icons/water_point.svg'); 526 | } 527 | #pois[type='waste_disposal'][zoom>=15] { 528 | marker-file: url('./icons/rubbish.svg'); 529 | [waste='chemical_toilet'] { marker-file: url('./icons/elsan.svg'); } 530 | } 531 | #pois[type='fuel'][zoom>=15] { 532 | marker-file: url('./icons/fuel.svg'); 533 | } 534 | #pois[type='shower'][zoom>=15] { 535 | marker-file: url('./icons/shower.svg'); 536 | } 537 | #pois[type='toilets'][zoom>=15] { 538 | marker-file: url('./icons/toilets.svg'); 539 | } 540 | 541 | /* ================================================================== */ 542 | /* WATERWAY SIGNS 543 | /* ================================================================== */ 544 | 545 | #waterway_signs[sign='kilometer'][zoom>=16] { 546 | text-name: "[name]"; 547 | text-face-name:@sans; 548 | text-placement:point; 549 | text-fill:@marina_text; 550 | text-size:10; 551 | text-halo-fill:@marina_halo; 552 | text-halo-radius:2; 553 | text-wrap-width: 50; 554 | text-label-position-tolerance: 10; 555 | } 556 | 557 | #waterway_signs[zoom>=16] { 558 | marker-file: url("./icons/waterway/sign/[sign].png"); 559 | marker-width: 15; 560 | [zoom=18] { 561 | marker-width: 20; 562 | } 563 | } 564 | 565 | #waterway_network::draft[zoom>=16] { 566 | [cemt="I"][draft<1.8], 567 | [cemt="II"][draft<2.5], 568 | [cemt="III"][draft<2.5], 569 | [cemt="IV"][draft<2.5], 570 | [cemt="V"][draft<2.5], 571 | [cemt="VI"][draft<3.9] { 572 | shield-name: "[draft]"; 573 | shield-fill:#000; 574 | shield-face-name:@sans; 575 | shield-size:8; 576 | shield-placement: line; 577 | shield-spacing: 300; 578 | shield-file: url('./icons/waterway/sign/maxdraft_17.svg'); 579 | shield-text-dy: -2; 580 | shield-avoid-edges: true; 581 | [zoom=18] { 582 | shield-file: url('./icons/waterway/sign/maxdraft_18.svg'); 583 | shield-spacing: 400; 584 | shield-size:9; 585 | } 586 | }} 587 | 588 | #waterway_network::maxspeed[maxspeed!=null][zoom>=16] { 589 | shield-name: "[maxspeed]"; 590 | shield-fill:#000; 591 | shield-face-name:@sans; 592 | shield-size:8; 593 | shield-placement: line; 594 | shield-spacing: 200; 595 | shield-file: url('./icons/waterway/sign/no_17.svg'); 596 | shield-avoid-edges: true; 597 | [zoom=18] { 598 | shield-file: url('./icons/waterway/sign/no_18.svg'); 599 | shield-spacing: 300; 600 | shield-size:9; 601 | } 602 | } 603 | 604 | 605 | /* ================================================================== */ 606 | /* PIERS 607 | /* ================================================================== */ 608 | 609 | #piers::label[zoom>=17], 610 | #piers_polygons::label[zoom>=17] 611 | { 612 | text-name: "[name]"; 613 | text-face-name:@sans; 614 | text-placement:line; 615 | text-fill:@marina_text; 616 | text-size:10; 617 | text-halo-fill:@marina_halo; 618 | text-halo-radius:2; 619 | text-wrap-width: 50; 620 | text-label-position-tolerance: 10; 621 | } 622 | 623 | /* ================================================================== */ 624 | /* BRIDGES 625 | /* ================================================================== */ 626 | 627 | #bridge_label[zoom>=15][zoom<=20] { 628 | text-name: '[name]'; 629 | text-face-name: @sans_italic; 630 | text-halo-radius: 1; 631 | text-fill: @bridge_text; 632 | text-halo-fill: @bridge_halo; 633 | text-placement: point; 634 | text-placement-type: simple; 635 | text-placements: "N, NE, NW, S, SE, SW, E, W"; 636 | text-avoid-edges: true; 637 | text-dx: 5; 638 | text-dy: 5; 639 | } 640 | 641 | /* ================================================================== */ 642 | /* Stations 643 | /* ================================================================== */ 644 | 645 | .stations[zoom>=13] { 646 | ::symbol { 647 | marker-file: url('./icons/station.svg'); 648 | } 649 | text-name: "[name]"; 650 | text-face-name:@sans_bold_italic; 651 | text-fill: @other_text; 652 | text-size:11; 653 | text-halo-fill:@other_halo; 654 | text-halo-radius:1; 655 | text-label-position-tolerance: 24; 656 | text-placement-type: simple; 657 | text-placements: "E,W"; 658 | text-dx: 12; 659 | } 660 | 661 | 662 | /* ================================================================== */ 663 | /* Organic Shops 664 | /* ================================================================== */ 665 | 666 | #organic_shop[zoom>=14] { 667 | ::symbol { 668 | marker-file: url('./icons/organic.svg'); 669 | } 670 | text-name: "[name]"; 671 | text-face-name:@sans_bold_italic; 672 | text-fill: @other_text; 673 | text-size:11; 674 | text-halo-fill:@other_halo; 675 | text-halo-radius:1; 676 | text-label-position-tolerance: 24; 677 | text-placement-type: simple; 678 | text-placements: "E,W"; 679 | text-dx: 12; 680 | } 681 | -------------------------------------------------------------------------------- /lib/openriverboatmap/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tilery/OpenRiverboatMap/3d828104cd5caf4d2ed15d47c2ffbf8c5b6024e8/lib/openriverboatmap/__init__.py -------------------------------------------------------------------------------- /lib/openriverboatmap/fabfile.py: -------------------------------------------------------------------------------- 1 | from fabric.api import (task, env, run, local, roles, cd, execute, hide, 2 | puts, sudo, prefix) 3 | import os 4 | from urlparse import urlparse 5 | 6 | env.project_name = 'openriverboatmap' 7 | env.repository = 'git://github.com/yohanboniface/OpenRiverboatMap.git' 8 | env.local_branch = 'master' 9 | env.remote_ref = 'origin/master' 10 | env.requirements_file = 'requirements.pip' 11 | env.restart_sudo = False 12 | env.download_command = 'wget {url} -O {file}' 13 | env.import_command = 'osm2pgsql -G -U osm -d osm {file} -C 4000 --number-processes=6 --hstore-all --append' 14 | 15 | #============================================================================== 16 | # Tasks which set up deployment environments 17 | #============================================================================== 18 | 19 | 20 | @task 21 | def live(): 22 | """ 23 | Use the live deployment environment. 24 | """ 25 | server = 'openriverboatmap.com' 26 | env.roledefs = { 27 | 'web': [server], 28 | 'db': [server], 29 | } 30 | env.system_users = {server: 'www-data'} 31 | env.virtualenv_dir = '/home/ybon/.virtualenvs/{project_name}'.format(**env) 32 | env.project_dir = '{virtualenv_dir}/src/{project_name}'.format(**env) 33 | env.project_conf = '{project_name}.conf.local'.format(**env) 34 | env.restart_command = 'circusctl restart {project_name}'.format(**env) 35 | 36 | 37 | @task 38 | def dev(): 39 | """ 40 | Use the development deployment environment. 41 | """ 42 | server = 'ks3267459.kimsufi.com' 43 | env.roledefs = { 44 | 'web': [server], 45 | 'db': [server], 46 | } 47 | env.system_users = {server: 'www-data'} 48 | env.virtualenv_dir = '/home/ybon/.virtualenvs/{project_name}'.format(**env) 49 | env.project_dir = '/home/ybon/dev/{project_name}'.format(**env) 50 | env.restart_command = '{virtualenv_dir}/bin/circusctl restart {project_name}'.format(**env) 51 | env.pbf_dir = '~/pbf' 52 | 53 | # Set the default environment. 54 | dev() 55 | 56 | 57 | #============================================================================== 58 | # Actual tasks 59 | #============================================================================== 60 | 61 | @task 62 | @roles('web', 'db') 63 | def push(): 64 | """ 65 | Push branch to the repository. 66 | """ 67 | remote, dest_branch = env.remote_ref.split('/', 1) 68 | local('git push {remote} {local_branch}:{dest_branch}'.format( 69 | remote=remote, dest_branch=dest_branch, **env)) 70 | 71 | 72 | @task 73 | def deploy(verbosity='normal'): 74 | """ 75 | Full server deploy. 76 | 77 | Updates the repository (server-side), synchronizes the database, collects 78 | static files and then restarts the web service. 79 | """ 80 | if verbosity == 'noisy': 81 | hide_args = [] 82 | else: 83 | hide_args = ['running', 'stdout'] 84 | with hide(*hide_args): 85 | puts('Updating repository...') 86 | execute(update) 87 | puts('Generate mapnik style...') 88 | execute(generate_style) 89 | puts('Restarting web server...') 90 | execute(restart) 91 | 92 | 93 | @task 94 | @roles('web', 'db') 95 | def update(mode='graceful'): 96 | """ 97 | Update the repository (server-side). 98 | 99 | By default, if the requirements file changed in the repository then the 100 | requirements will be updated. Use ``action='force'`` to force 101 | updating requirements. Anything else other than ``'check'`` will avoid 102 | updating requirements at all. 103 | """ 104 | with cd(env.project_dir): 105 | remote, dest_branch = env.remote_ref.split('/', 1) 106 | run('git fetch {remote}'.format(remote=remote, 107 | dest_branch=dest_branch, **env)) 108 | with hide('running', 'stdout'): 109 | changed_files = run('git diff-index --cached --name-only ' 110 | '{remote_ref}'.format(**env)).splitlines() 111 | if not changed_files and mode != 'force': 112 | # No changes, we can exit now. 113 | return 114 | run('git merge {remote_ref}'.format(**env)) 115 | if mode == "clean": 116 | run('git clean -df') 117 | 118 | 119 | @task 120 | @roles('web') 121 | def restart(): 122 | """ 123 | Restart the web service. 124 | """ 125 | if env.restart_sudo: 126 | cmd = sudo 127 | else: 128 | cmd = run 129 | cmd(env.restart_command) 130 | 131 | 132 | @task 133 | @roles('web', 'db') 134 | def update_data(url): 135 | """ 136 | Import a pbf OSM data file. 137 | """ 138 | file_path = "%s/%s" % (env.pbf_dir, os.path.basename(url)) 139 | with hide('running', 'stdout'): 140 | file_exists = run('if [ -d "{file}" ]; then echo 1; fi'\ 141 | .format(file=file_path)) 142 | if file_exists: 143 | run("rm {file}".format(file=file_path)) 144 | run(env.download_command.format(url=url, file=file_path)) 145 | run(env.import_command.format(file=file_path)) 146 | 147 | 148 | @task 149 | @roles('web', 'db') 150 | def generate_style(): 151 | """ 152 | Generate mapnik style. 153 | """ 154 | # Needed to make millstone quiet 155 | # otherwise it output logs and we get an invalid XML 156 | with prefix('export NODE_ENV="quiet"'): 157 | run('carto {project_dir}/openriverboatmap/project.mml > {project_dir}/openriverboatmap/mapnik.xml'.format(**env)) 158 | 159 | 160 | @task 161 | @roles('web', 'db') 162 | def purge(url): 163 | """ 164 | Purge an URL in Varnish. 165 | """ 166 | # We need to send URL in localhost, because only local IP 167 | # is allowed to use PURGE 168 | parsed = urlparse(url) 169 | local_url = "%s://127.0.0.1%s" % (parsed.scheme, parsed.path) 170 | run("{virtualenv_dir}/bin/tilestache-flushurl.py -c ~/tilestache.config {path}".format(virtualenv_dir=env.virtualenv_dir, path=parsed.path)) 171 | run("curl -X PURGE {local_url}".format(local_url=local_url)) 172 | -------------------------------------------------------------------------------- /lib/openriverboatmap/requirements.pip: -------------------------------------------------------------------------------- 1 | circus 2 | gunicorn 3 | git+git://github.com/yohanboniface/TileStache.git -------------------------------------------------------------------------------- /localconfig.json.sample: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "if": { 4 | "Datasource.type": "postgis" 5 | }, 6 | "then": { 7 | "Datasource.dbname": "osm", 8 | "Datasource.password": "", 9 | "Datasource.user": "ybon" 10 | } 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /palette.mss: -------------------------------------------------------------------------------- 1 | /* ****************************************************************** */ 2 | /* OSM BRIGHT for Osm2pgsql */ 3 | /* ****************************************************************** */ 4 | 5 | /* For basic style customization you can simply edit the colors and 6 | * fonts defined in this file. For more detailed / advanced 7 | * adjustments explore the other files. 8 | * 9 | * GENERAL NOTES 10 | * 11 | * There is a slight performance cost in rendering line-caps. An 12 | * effort has been made to restrict line-cap definitions to styles 13 | * where the results will be visible (lines at least 2 pixels thick). 14 | */ 15 | 16 | /* ================================================================== */ 17 | /* FONTS 18 | /* ================================================================== */ 19 | 20 | /* directory to load fonts from in addition to the system directories */ 21 | Map { font-directory: url(./fonts); } 22 | 23 | /* set up font sets for various weights and styles */ 24 | @sans_lt: "Open Sans Regular","DejaVu Sans Book","unifont Medium"; 25 | @sans_lt_italic: "Open Sans Italic","DejaVu Sans Italic","unifont Medium"; 26 | @sans: "Open Sans Semibold","DejaVu Sans Book","unifont Medium"; 27 | @sans_italic: "Open Sans Semibold Italic","DejaVu Sans Italic","unifont Medium"; 28 | @sans_bold: "Open Sans Bold","DejaVu Sans Bold","unifont Medium"; 29 | @sans_bold_italic: "Open Sans Bold Italic","DejaVu Sans Bold Italic","unifont Medium"; 30 | 31 | /* Some fonts are larger or smaller than others. Use this variable to 32 | globally increase or decrease the font sizes. */ 33 | /* Note this is only implemented for certain things so far */ 34 | @text_adjust: 0; 35 | 36 | /* ================================================================== */ 37 | /* LANDUSE & LANDCOVER COLORS 38 | /* ================================================================== */ 39 | 40 | @land: #fefef3; 41 | @water: #b3dcdb; 42 | @grass: #E6F2C1; 43 | @beach: #EEE5B2; 44 | @park: #DAF2C1; 45 | @cemetery: #D6DED2; 46 | @wetland: #e3e9e2; //#CFDCD3; 47 | @agriculture: #fafaeb; 48 | @wooded: #dfecce; 49 | @heath: #e7f1da; 50 | 51 | @building: #E4E0E0; 52 | @hospital: rgb(229,198,195); 53 | @school: #FFF5CC; 54 | @sports: #B8E6B8; 55 | @military: #e9e0d6; 56 | 57 | @residential: #F1F0ED; 58 | @commercial: @land * 0.97; 59 | @industrial: @land * 0.96; 60 | @parking: #EEE; 61 | 62 | 63 | @mooring: #13272e; //#13272e #252305 64 | @stone: #ceba82; 65 | @navigable: #3A8F8C; //#387084; 66 | @navigable_high: @navigable; 67 | @navigable_medium: @navigable; 68 | @navigable_text: darken(@navigable, 10%); 69 | 70 | 71 | 72 | /* ================================================================== */ 73 | /* ROAD COLORS 74 | /* ================================================================== */ 75 | 76 | /* For each class of road there are three color variables: 77 | * - line: for lower zoomlevels when the road is represented by a 78 | * single solid line. 79 | * - case: for higher zoomlevels, this color is for the road's 80 | * casing (outline). 81 | * - fill: for higher zoomlevels, this color is for the road's 82 | * inner fill (inline). 83 | */ 84 | 85 | @motorway_line: #aaa; 86 | @motorway_fill: lighten(@motorway_line,10%); 87 | @motorway_case: @motorway_line * 0.9; 88 | 89 | @trunk_line: #b2b2b2; 90 | @trunk_fill: lighten(@trunk_line,10%); 91 | @trunk_case: @trunk_line * 0.9; 92 | 93 | @primary_line: #bbb; 94 | @primary_fill: lighten(@primary_line,10%); 95 | @primary_case: @primary_line * 0.9; 96 | 97 | @secondary_line: #d4d4d4; 98 | @secondary_fill: lighten(@secondary_line,10%); 99 | @secondary_case: @secondary_line * 0.9; 100 | 101 | @light_road: #ddd; 102 | @light_road_fill: lighten(@light_road,10%); 103 | @light_road_case: @light_road * 0.9; 104 | 105 | @standard_line: @land * 0.85; 106 | @standard_fill: #fff; 107 | @standard_case: @land * 0.9; 108 | 109 | @pedestrian_line: @standard_line; 110 | @pedestrian_fill: #FAFAF5; 111 | @pedestrian_case: @land; 112 | 113 | @cycle_line: @standard_line; 114 | @cycle_fill: #FAFAF5; 115 | @cycle_case: @land; 116 | 117 | @rail_line: #666; 118 | @rail_fill: #fff; 119 | @rail_case: @land; 120 | 121 | @aeroway: #ddd; 122 | 123 | /* ================================================================== */ 124 | /* BOUNDARY COLORS 125 | /* ================================================================== */ 126 | 127 | @admin_2: #d8c3b1; 128 | 129 | /* ================================================================== */ 130 | /* LABEL COLORS 131 | /* ================================================================== */ 132 | 133 | /* We set up a default halo color for places so you can edit them all 134 | at once or override each individually. */ 135 | @place_halo: fadeout(#fff,34%); 136 | 137 | @country_text: #435; 138 | @country_halo: @place_halo; 139 | 140 | @state_text: #546; 141 | @state_halo: @place_halo; 142 | 143 | @city_text: #444; 144 | @city_halo: @place_halo; 145 | 146 | @town_text: #666; 147 | @town_halo: @place_halo; 148 | 149 | @poi_text: #888; 150 | 151 | @road_text: #777; 152 | @road_halo: #fff; 153 | 154 | @other_text: #888; 155 | @other_halo: @place_halo; 156 | 157 | @locality_text: #aaa; 158 | @locality_halo: @land; 159 | 160 | /* Also used for other small places: hamlets, suburbs, localities */ 161 | @village_text: #888; 162 | @village_halo: @place_halo; 163 | 164 | @harbour_text: #444; 165 | @harbour_halo: @place_halo; 166 | 167 | @marina_text: #666; 168 | @marina_halo: @place_halo; 169 | 170 | @bridge_text: #333; 171 | @bridge_halo: @place_halo; 172 | 173 | /* ****************************************************************** */ 174 | 175 | 176 | 177 | -------------------------------------------------------------------------------- /project.yml: -------------------------------------------------------------------------------- 1 | scale: 1 2 | metatile: 4 3 | name: "Riverboat" 4 | bounds: &world 5 | - -180 6 | - -85.05112877980659 7 | - 180 8 | - 85.05112877980659 9 | center: 10 | - 3.5156 11 | - 47.0402 12 | - 6 13 | format: png 14 | interactivity: false 15 | minzoom: 0 16 | maxzoom: 18 17 | srs: &merc "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" 18 | extents: &extents 19 | extent: *world 20 | srs-name: "900913" 21 | srs: *merc 22 | db: &db 23 | dbname: osm 24 | geometry_field: way 25 | type: postgis 26 | extent: -20037508,-19929239,20037508,19929239 27 | password: null 28 | user: ybon 29 | host: '' 30 | 31 | Stylesheet: 32 | - palette.mss 33 | - base.mss 34 | - roads.mss 35 | - labels.mss 36 | - waterways.mss 37 | 38 | Layer: 39 | 40 | - id: land-low 41 | class: "" 42 | geometry: "polygon" 43 | <<: *extents 44 | Datasource: 45 | file: "https://osmdata.openstreetmap.de/download/simplified-land-polygons-complete-3857.zip" 46 | type: shape 47 | 48 | - id: land 49 | class: "" 50 | geometry: "polygon" 51 | <<: *extents 52 | Datasource: 53 | file: https://osmdata.openstreetmap.de/download/land-polygons-split-3857.zip 54 | type: shape 55 | 56 | - id: landuse_gen0 57 | geometry: multipolygon 58 | class: '' 59 | <<: *extents 60 | Datasource: 61 | <<: *db 62 | table: |- 63 | ( SELECT way, way_area AS area, COALESCE(landuse, leisure, "natural", highway, amenity, tourism) AS type 64 | FROM planet_osm_polygon 65 | WHERE way_area > 100000 66 | AND (landuse IS NOT NULL 67 | OR leisure IS NOT NULL 68 | OR "natural" IS NOT NULL 69 | OR highway IS NOT NULL 70 | OR amenity IS NOT NULL 71 | OR tourism IS NOT NULL) 72 | ) AS data 73 | 74 | - id: landuse_gen1 75 | class: '' 76 | geometry: multipolygon 77 | <<: *extents 78 | Datasource: 79 | <<: *db 80 | table: |- 81 | ( SELECT way, way_area AS area, COALESCE(landuse, leisure, "natural", highway, amenity, tourism) AS type 82 | FROM planet_osm_polygon 83 | WHERE way_area > 10000 84 | ORDER BY way_area DESC 85 | ) AS data 86 | 87 | - id: landuse 88 | class: '' 89 | geometry: polygon 90 | <<: *extents 91 | Datasource: 92 | <<: *db 93 | table: |- 94 | ( SELECT way, way_area AS area, COALESCE(landuse, leisure, "natural", highway, amenity, tourism) AS type, tags->'motorboat' as motorboat, tags->'CEMT' as cemt, CASE WHEN tags->'motorboat'='yes' THEN 'yes' WHEN tags ? 'CEMT' THEN 'yes' ELSE 'no' END as navigable 95 | FROM planet_osm_polygon 96 | ORDER BY way_area DESC 97 | ) AS data 98 | 99 | - id: water 100 | class: '' 101 | geometry: polygon 102 | <<: *extents 103 | Datasource: 104 | <<: *db 105 | table: |- 106 | ( SELECT way, way_area AS area, tags->'motorboat' as motorboat, waterway AS type, tags->'CEMT' as cemt, CASE WHEN tags->'motorboat'='yes' THEN 'yes' WHEN tags ? 'CEMT' THEN 'yes' ELSE 'no' END as navigable 107 | FROM planet_osm_polygon 108 | WHERE "natural" IN ('water', 'pond') 109 | OR waterway IN ('basin', 'canal', 'mill_pond', 'pond', 'riverbank', 'stream', 'lock', 'dock') 110 | ) AS data 111 | 112 | 113 | - id: waterway_network_high 114 | class: '' 115 | geometry: linestring 116 | <<: *extents 117 | Datasource: 118 | <<: *db 119 | table: "( SELECT way, waterway as type, tags->'motorboat' AS motorboat, tags->'CEMT' 120 | AS cemt, CASE WHEN tags->'motorboat'='yes' THEN 'yes' WHEN tags ? 'CEMT' THEN 121 | 'yes' ELSE 'no' END as navigable, CAST(tags->'draft' AS FLOAT) AS draft, CASE 122 | WHEN tags->'maxspeed' ~ E'^-?\\\\d+$' THEN (tags->'maxspeed')::integer ELSE 123 | null END AS maxspeed, CASE WHEN layer ~ E'^-?\\\\d+$' THEN layer::integer ELSE 124 | 0 END AS layer FROM planet_osm_line WHERE waterway IN ('river', 'canal', 'stream') 125 | ORDER BY layer) AS data" 126 | 127 | - id: navigable_water 128 | class: '' 129 | geometry: polygon 130 | <<: *extents 131 | Datasource: 132 | <<: *db 133 | table: |- 134 | ( SELECT p.way, p.way_area AS area, p.bridge, CASE WHEN p.layer ~ E'^-?\\d+$' 135 | THEN p.layer::integer ELSE 0 END AS polylayer from planet_osm_polygon p, planet_osm_line 136 | l WHERE p.way && !bbox! AND l.way && !bbox! AND ST_Intersects(p.way, l.way) 137 | AND (p.waterway IN ('riverbank', 'lock') OR p."natural"='water') AND (l.tags 138 | ? 'CEMT' OR l.tags->'motorboat'='yes') AND ST_IsValid(l.way) = true AND ST_IsValid(p.way) 139 | = true AND ((p.layer IS NULL and l.layer IS NULL) OR p.layer = l.layer) ORDER 140 | BY polylayer) AS data 141 | 142 | - id: landuse_overlays 143 | class: '' 144 | geometry: polygon 145 | <<: *extents 146 | Datasource: 147 | <<: *db 148 | table: |- 149 | ( SELECT way, way_area AS area, COALESCE(leisure) AS type 150 | FROM planet_osm_polygon 151 | WHERE leisure = 'nature_reserve' 152 | ORDER BY way_area DESC 153 | ) AS data 154 | 155 | - id: admin 156 | class: '' 157 | geometry: linestring 158 | <<: *extents 159 | Datasource: 160 | <<: *db 161 | table: "( SELECT way, admin_level FROM planet_osm_roads WHERE boundary = 'administrative' 162 | AND admin_level='2') AS data" 163 | 164 | 165 | - id: buildings 166 | class: '' 167 | geometry: polygon 168 | <<: *extents 169 | Datasource: 170 | <<: *db 171 | table: |- 172 | ( SELECT way, "building" AS type 173 | FROM planet_osm_polygon 174 | WHERE building NOT IN ('0','false', 'no') 175 | ORDER BY ST_YMin(ST_Envelope(way)) DESC 176 | ) AS data 177 | 178 | - id: tunnel 179 | class: '' 180 | geometry: linestring 181 | <<: *extents 182 | Datasource: 183 | <<: *db 184 | table: |- 185 | ( SELECT way, CASE WHEN layer ~ E'^\\d+$' THEN layer::integer ELSE 0 END as layer, COALESCE(highway, railway) AS type, 0 AS bridge, access, render, 1 as tunnel, 186 | CASE 187 | WHEN highway IN ('motorway', 'trunk') THEN 'motorway' 188 | WHEN highway IN ('primary', 'secondary') THEN 'mainroad' 189 | WHEN highway IN ('motorway_link', 'trunk_link', 'primary_link', 'secondary_link', 'tertiary', 'tertiary_link', 'residential', 'unclassified', 'road', 'living_street') THEN 'minorroad' 190 | WHEN highway IN ('service', 'track') THEN 'service' 191 | WHEN highway IN ('path', 'cycleway', 'footway', 'pedestrian', 'steps', 'bridleway') THEN 'noauto' 192 | WHEN railway IN ('light_rail', 'subway', 'narrow_gauge', 'rail', 'tram') THEN 'railway' 193 | ELSE 'other' END AS stylegroup 194 | FROM ( 195 | SELECT *, '1_outline' AS render FROM planet_osm_line 196 | WHERE tunnel NOT IN ('', '0', 'no') 197 | UNION ALL 198 | SELECT *, '2_line' AS render FROM planet_osm_line 199 | WHERE tunnel NOT IN ('', '0', 'no') 200 | UNION ALL 201 | SELECT *, '3_inline' AS render FROM planet_osm_line 202 | WHERE tunnel NOT IN ('', '0', 'no') 203 | ) AS tunnels 204 | ORDER BY layer ASC, render ASC 205 | ) AS data 206 | 207 | - id: turning_circle_case 208 | class: '' 209 | geometry: point 210 | <<: *extents 211 | Datasource: 212 | <<: *db 213 | table: "( SELECT way \n FROM planet_osm_point \n WHERE highway = 'turning_circle'\n) 214 | AS data" 215 | 216 | - id: roads_high 217 | class: '' 218 | geometry: linestring 219 | <<: *extents 220 | Datasource: 221 | <<: *db 222 | table: |- 223 | ( SELECT way, CASE WHEN layer ~ E'^\\d+$' THEN layer::integer ELSE 0 END as layer, COALESCE(highway, railway) AS type, 0 AS tunnel, 'no' AS bridge, access, 'fill' AS render, 224 | CASE 225 | WHEN highway IN ('motorway', 'trunk') THEN 'motorway' 226 | WHEN highway IN ('primary', 'secondary') THEN 'mainroad' 227 | WHEN highway IN ('motorway_link', 'trunk_link', 'primary_link', 'secondary_link', 'tertiary', 'tertiary_link', 'residential', 'unclassified', 'road', 'living_street') THEN 'minorroad' 228 | WHEN highway IN ('service', 'track') THEN 'service' 229 | WHEN highway IN ('path', 'cycleway', 'footway', 'pedestrian', 'steps', 'bridleway') THEN 'noauto' 230 | WHEN railway IN ('light_rail', 'subway', 'narrow_gauge', 'rail', 'tram') AND service IS NULL THEN 'railway' 231 | ELSE 'other' END AS stylegroup 232 | FROM planet_osm_line 233 | WHERE (highway IS NOT NULL OR railway IS NOT NULL) 234 | AND (tunnel IS NULL OR tunnel = 'no') 235 | AND (bridge IS NULL OR bridge = 'no') 236 | ORDER BY railway desc, z_order) AS data 237 | 238 | - id: roads_med 239 | class: '' 240 | geometry: linestring 241 | <<: *extents 242 | Datasource: 243 | <<: *db 244 | table: |- 245 | ( SELECT way, highway AS type 246 | FROM planet_osm_roads 247 | WHERE highway IN ('motorway', 'trunk', 'primary', 'secondary', 'motorway_link', 'trunk_link') 248 | ) AS data 249 | 250 | - id: roads_low 251 | class: '' 252 | geometry: linestring 253 | <<: *extents 254 | Datasource: 255 | <<: *db 256 | table: |- 257 | ( SELECT way, highway AS type, bridge, tunnel 258 | FROM planet_osm_roads 259 | WHERE highway IN ('motorway', 'trunk') 260 | ) AS data 261 | 262 | - id: turning_circle_fill 263 | class: '' 264 | geometry: point 265 | <<: *extents 266 | Datasource: 267 | <<: *db 268 | table: "( SELECT way \n FROM planet_osm_point\n WHERE highway = 'turning_circle'\n) 269 | AS data" 270 | 271 | - id: bridge 272 | class: '' 273 | geometry: linestring 274 | <<: *extents 275 | Datasource: 276 | <<: *db 277 | table: |- 278 | ( SELECT way, CASE WHEN layer ~ E'^\\d+$' THEN layer::integer ELSE 0 END as layer, COALESCE(highway, railway) AS type, 1 AS bridge, access, render, 0 as tunnel, 279 | CASE 280 | WHEN highway IN ('motorway', 'trunk') THEN 'motorway' 281 | WHEN highway IN ('primary', 'secondary') THEN 'mainroad' 282 | WHEN highway IN ('motorway_link', 'trunk_link', 'primary_link', 'secondary_link', 'tertiary', 'tertiary_link', 'residential', 'unclassified', 'road', 'living_street') THEN 'minorroad' 283 | WHEN highway IN ('service', 'track') THEN 'service' 284 | WHEN highway IN ('path', 'cycleway', 'footway', 'pedestrian', 'steps', 'bridleway') THEN 'noauto' 285 | WHEN railway IN ('light_rail', 'subway', 'narrow_gauge', 'rail', 'tram') THEN 'railway' 286 | ELSE 'other' END AS stylegroup 287 | FROM ( 288 | SELECT *, '1_outline' AS render FROM planet_osm_line 289 | WHERE bridge NOT IN ('', '0', 'no') 290 | UNION ALL 291 | SELECT *, '2_line' AS render FROM planet_osm_line 292 | WHERE bridge NOT IN ('', '0', 'no') 293 | UNION ALL 294 | SELECT *, '3_inline' AS render FROM planet_osm_line 295 | WHERE bridge NOT IN ('', '0', 'no') 296 | ) AS bridges 297 | ORDER BY layer ASC, render ASC 298 | ) AS data 299 | 300 | - id: waterway_network 301 | class: '' 302 | geometry: linestring 303 | <<: *extents 304 | Datasource: 305 | <<: *db 306 | table: |- 307 | ( SELECT way, waterway as type, tags->'motorboat' AS motorboat, tags->'CEMT' AS cemt, CASE WHEN tags->'motorboat'='yes' THEN 'yes' WHEN tags ? 'CEMT' THEN 'yes' ELSE 'no' END as navigable, CAST(tags->'draft' AS FLOAT) AS draft, CASE WHEN tags->'maxspeed' ~ E'^-?\\d+$' THEN (tags->'maxspeed')::integer ELSE null END AS maxspeed FROM planet_osm_line WHERE waterway IN ('river', 'canal') and (tags ? 'motorboat' OR tags ? 'CEMT') AND waterway IS NOT NULL AND (NOT (tags ? 'disused') OR tags->'disused'='no') 308 | ) AS data 309 | 310 | - id: piers_polygons 311 | class: '' 312 | geometry: polygon 313 | <<: *extents 314 | Datasource: 315 | <<: *db 316 | table: |- 317 | ( SELECT way, man_made, tags->'mooring' as mooring, name 318 | FROM planet_osm_polygon 319 | WHERE man_made='pier') AS data 320 | 321 | - id: piers 322 | class: '' 323 | geometry: linestring 324 | <<: *extents 325 | Datasource: 326 | <<: *db 327 | table: |- 328 | ( SELECT way, man_made, tags->'mooring' as mooring, name 329 | FROM planet_osm_line 330 | WHERE man_made='pier') AS data 331 | 332 | 333 | - id: dams_polygons 334 | class: '' 335 | geometry: polygon 336 | <<: *extents 337 | Datasource: 338 | <<: *db 339 | table: "( SELECT way, waterway, name FROM planet_osm_polygon WHERE waterway='dam') 340 | AS data" 341 | 342 | - id: dams 343 | class: '' 344 | geometry: linestring 345 | <<: *extents 346 | Datasource: 347 | <<: *db 348 | table: "( SELECT way, waterway, name FROM planet_osm_line WHERE waterway='dam') 349 | AS data" 350 | 351 | - id: marinas 352 | class: '' 353 | geometry: point 354 | <<: *extents 355 | Datasource: 356 | <<: *db 357 | table: "( SELECT way, COALESCE(tags->'harbour:namenational', name, tags->'int_name') 358 | as name, CASE WHEN tags->'seasonal'='yes' THEN 'yes' WHEN (leisure='marina' 359 | AND harbour IS NULL) THEN 'yes' ELSE 'no' END as seasonal FROM planet_osm_point 360 | WHERE leisure='marina' OR (harbour='yes' AND tags->'harbour:category'='marina') 361 | UNION SELECT way, COALESCE(tags->'harbour:namenational', name, tags->'int_name') 362 | as name, CASE WHEN tags->'seasonal'='yes' THEN 'yes' WHEN (leisure='marina' 363 | AND harbour IS NULL) THEN 'yes' ELSE 'no' END as seasonal FROM planet_osm_polygon 364 | WHERE harbour='yes' AND tags->'harbour:category'='marina' ORDER BY seasonal) 365 | AS data" 366 | 367 | - id: stations 368 | geometry: point 369 | class: stations 370 | <<: *extents 371 | Datasource: 372 | <<: *db 373 | table: "(SELECT p.way, p.name, p.railway FROM planet_osm_point p, planet_osm_line 374 | l WHERE p.railway='station' AND l.railway='rail' AND ST_DWithin(l.way, p.way, 375 | 10)) as data" 376 | 377 | - id: stations-poly 378 | class: stations 379 | geometry: polygon 380 | <<: *extents 381 | Datasource: 382 | <<: *db 383 | table: (SELECT way,name,railway,aerialway,disused FROM planet_osm_polygon WHERE railway='station' AND disused IS NULL) AS data 384 | 385 | - id: piers_symbol 386 | class: '' 387 | geometry: linestring 388 | <<: *extents 389 | Datasource: 390 | <<: *db 391 | table: |- 392 | ( SELECT way, man_made, tags->'mooring' as mooring, name 393 | FROM planet_osm_line 394 | WHERE man_made='pier') AS data 395 | 396 | - id: waterway_label 397 | class: '' 398 | geometry: linestring 399 | <<: *extents 400 | Datasource: 401 | <<: *db 402 | table: "( SELECT way, waterway AS type, name, CASE WHEN tags->'motorboat'='yes' 403 | THEN 'yes' WHEN tags ? 'CEMT' THEN 'yes' ELSE 'no' END as navigable, oneway 404 | FROM planet_osm_line WHERE waterway IN ('canal', 'river', 'stream') AND name 405 | IS NOT NULL) AS data" 406 | 407 | - id: place 408 | class: '' 409 | geometry: point 410 | <<: *extents 411 | Datasource: 412 | <<: *db 413 | table: "( SELECT way, place AS type, name, z_order, CASE WHEN population ~ E'^\\\\d+$' 414 | THEN population::integer ELSE 0 END AS population, CASE WHEN place='country' 415 | THEN 1 WHEN place='state' THEN 10 WHEN place='city' THEN 20 WHEN place='town' 416 | THEN 30 WHEN place='village' THEN 40 ELSE 100 END as prio FROM planet_osm_point 417 | WHERE place in ('country', 'state', 'city', 'town', 'village', 'hamlet', 'suburb', 418 | 'neighbourhood', 'locality') ORDER BY prio, population DESC NULLS LAST) AS data" 419 | 420 | - id: groyne 421 | class: '' 422 | geometry: linestring 423 | <<: *extents 424 | Datasource: 425 | <<: *db 426 | table: |- 427 | ( SELECT way, man_made 428 | FROM planet_osm_line 429 | WHERE man_made='groyne') AS data 430 | 431 | - id: locks 432 | class: '' 433 | geometry: linestring 434 | <<: *extents 435 | Datasource: 436 | <<: *db 437 | table: "(SELECT way, CONCAT_WS(' ',tags->'lock_ref', tags->'lock_name') AS name, 438 | lock, tags->'lock:height' as height FROM planet_osm_line WHERE lock='yes') AS 439 | data" 440 | 441 | - id: bridge_name 442 | class: '' 443 | geometry: linestring 444 | <<: *extents 445 | Datasource: 446 | <<: *db 447 | srs: 448 | table: "( SELECT way, CONCAT_WS(' ',tags->'bridge_ref', tags->'bridge_name') AS 449 | bridge_name FROM planet_osm_line WHERE bridge NOT IN ('', '0', 'no')) AS data" 450 | 451 | - id: waterway_signs 452 | class: '' 453 | geometry: point 454 | <<: *extents 455 | Datasource: 456 | <<: *db 457 | table: |- 458 | ( SELECT way, tags->'waterway:sign' as sign,name FROM planet_osm_point 459 | WHERE tags ? 'waterway:sign') AS data 460 | 461 | - id: pois 462 | class: '' 463 | geometry: point 464 | <<: *extents 465 | Datasource: 466 | <<: *db 467 | table: "( SELECT way, amenity AS type, tags->'waste' AS waste FROM planet_osm_point 468 | WHERE amenity IN ('drinking_water', 'waste_disposal', 'shower', 'toilets') OR 469 | (amenity='fuel' AND access='boat')) AS data" 470 | 471 | - id: organic_shop 472 | class: '' 473 | geometry: point 474 | <<: *extents 475 | Datasource: 476 | <<: *db 477 | table: "( SELECT way, shop, name FROM planet_osm_point WHERE shop IS NOT NULL 478 | AND (tags->'organic' IN ('yes', 'only') OR shop='organic')) AS data" 479 | 480 | - id: area_label 481 | class: '' 482 | geometry: point 483 | <<: *extents 484 | Datasource: 485 | <<: *db 486 | table: |- 487 | ( SELECT COALESCE(landuse, leisure, "natural", highway, amenity, tourism) AS type, 488 | name, way_area AS area, 489 | ST_PointOnSurface(way) AS way 490 | FROM planet_osm_polygon 491 | WHERE name IS NOT NULL 492 | AND way && !bbox! 493 | AND ST_IsValid(way) 494 | 495 | UNION ALL 496 | 497 | SELECT 'building' AS type, name, way_area AS area, 498 | ST_PointOnSurface(way) AS way 499 | FROM planet_osm_polygon 500 | WHERE name IS NOT NULL 501 | AND building NOT IN ('', 'no', '0', 'false') 502 | AND way && !bbox! 503 | AND ST_IsValid(way) 504 | ORDER BY area DESC 505 | ) AS data 506 | 507 | - id: motorway_label 508 | class: '' 509 | geometry: linestring 510 | <<: *extents 511 | Datasource: 512 | <<: *db 513 | table: |- 514 | ( SELECT way, highway AS type, name, ref, oneway, CHAR_LENGTH(ref) AS reflen 515 | FROM planet_osm_line 516 | WHERE highway IN ('motorway', 'trunk') 517 | AND (name IS NOT NULL OR ref IS NOT NULL) 518 | ) AS data 519 | 520 | - id: mainroad_label 521 | class: '' 522 | geometry: linestring 523 | <<: *extents 524 | Datasource: 525 | <<: *db 526 | table: |- 527 | ( SELECT way, highway AS type, name, oneway 528 | FROM planet_osm_line 529 | WHERE (name IS NOT NULL OR oneway IN ('yes', 'true', '1', '-1')) 530 | AND highway IN ('primary', 'secondary', 'tertiary') 531 | ) AS data 532 | 533 | - id: minorroad_label 534 | class: '' 535 | geometry: linestring 536 | <<: *extents 537 | Datasource: 538 | <<: *db 539 | table: |- 540 | ( SELECT way, highway AS type, name, oneway 541 | FROM planet_osm_line 542 | WHERE (name IS NOT NULL OR oneway IN ('yes', 'true', '1', '-1')) 543 | AND highway IN ('residential', 'unclassified', 'road', 'living_street', 'unknown') 544 | ) AS data 545 | -------------------------------------------------------------------------------- /roads.mss: -------------------------------------------------------------------------------- 1 | /* ================================================================== 2 | ROAD & RAIL LINES 3 | /* ================================================================== */ 4 | 5 | /* At mid-level scales start to show primary and secondary routes 6 | as well. */ 7 | 8 | #roads_med[zoom>=9][zoom<=10] 9 | { 10 | [type='motorway'], 11 | [type='motorway_link'] { 12 | line-color: @light_road; 13 | } 14 | [type='trunk'], 15 | [type='trunk_link'] { 16 | line-color: @light_road; 17 | } 18 | [type='primary'] { line-color: @light_road; } 19 | [type='secondary'] { line-color: @light_road; } 20 | [type='tertiary'] { line-color: @light_road; } 21 | [zoom=9] { 22 | [type='motorway'],[type='trunk'] { line-width: 1.4; } 23 | [type='primary'],[type='secondary'], 24 | [type='motorway_link'],[type='trunk_link'] { line-width: 0.6; } 25 | } 26 | [zoom=10] { 27 | [type='motorway'],[type='trunk'] { line-width: 1.8; } 28 | [type='primary'],[type='secondary'], 29 | [type='motorway_link'],[type='trunk_link'] { line-width: 0.8; } 30 | } 31 | } 32 | 33 | /* At higher levels the roads become more complex. We're now showing 34 | more than just automobile routes - railways, footways, and cycleways 35 | come in as well. 36 | 37 | /* Road width variables that are used in road & bridge styles */ 38 | @rdz11_maj: 1.6; @rdz11_med: 0.8; @rdz11_min: 0.4; 39 | @rdz12_maj: 2.5; @rdz12_med: 1.2; @rdz12_min: 0.8; 40 | @rdz13_maj: 3; @rdz13_med: 1.5; @rdz13_min: 1; 41 | @rdz14_maj: 4; @rdz14_med: 2.5; @rdz14_min: 1.6; 42 | @rdz15_maj: 6; @rdz15_med: 4; @rdz15_min: 2; 43 | @rdz16_maj: 8; @rdz16_med: 6; @rdz16_min: 4; 44 | @rdz17_maj: 14; @rdz17_med: 12; @rdz17_min: 10; 45 | @rdz18_maj: 20; @rdz18_med: 17; @rdz18_min: 14; 46 | 47 | /* ---- Casing ----------------------------------------------- */ 48 | 49 | #roads_high::outline[zoom>=11][zoom<=20], 50 | #tunnel[render='1_outline'][zoom>=11][zoom<=20], 51 | #bridge[render='1_outline'][zoom>=11][zoom<=20]{ 52 | [stylegroup="other"] { 53 | line-width: 0; 54 | } 55 | /* -- colors & styles -- */ 56 | line-cap: round; 57 | [bridge=1], 58 | [tunnel=1] { 59 | line-cap: butt; 60 | } 61 | line-join: round; 62 | line-color: @standard_case; 63 | [bridge=1] { line-color: @standard_case * 0.8; } 64 | [type='motorway'], 65 | [type='motorway_link'] { 66 | line-color: @motorway_case; 67 | [bridge=1] { line-color: @motorway_case * 0.8; } 68 | } 69 | [type='trunk'], 70 | [type='trunk_link'] { 71 | line-color: @trunk_case; 72 | [bridge=1] { line-color: @trunk_case * 0.8; } 73 | } 74 | [type='primary'], 75 | [type='primary_link'] { 76 | line-color: @primary_case; 77 | [bridge=1] { line-color: @primary_case * 0.8; } 78 | } 79 | [type='secondary'], 80 | [type='secondary_link'] { 81 | line-color: @secondary_case; 82 | [bridge=1] { line-color: @secondary_case * 0.8; } 83 | } 84 | [stylegroup='railway'] { 85 | line-color: fadeout(@land,50%); 86 | [bridge=1] { line-color: @secondary_case * 0.8; } 87 | } 88 | [tunnel=1] { line-dasharray: 3,3; } 89 | /* -- widths -- */ 90 | [zoom=11] { 91 | [stylegroup='motorway'] { line-width: @rdz11_maj + 2; } 92 | [stylegroup='mainroad'] { line-width: @rdz11_med + 1.6; } 93 | [stylegroup='minorroad']{ line-width: @rdz11_min; } 94 | /* No minor bridges yet */ 95 | [stylegroup='service'] { line-width: 0; } 96 | [stylegroup='noauto'] { line-width: 0; } 97 | [stylegroup='railway'] { line-width: 0; } 98 | } 99 | [zoom=12] { 100 | [stylegroup='motorway'] { line-width: @rdz12_maj + 2; } 101 | [stylegroup='mainroad'] { line-width: @rdz12_med + 2; } 102 | [stylegroup='minorroad']{ line-width: @rdz12_min; } 103 | /* No minor bridges yet */ 104 | [stylegroup='service'] { line-width: 0; } 105 | [stylegroup='noauto'] { line-width: 0; } 106 | [stylegroup='railway'] { line-width: 0; } 107 | } 108 | [zoom=13] { 109 | [stylegroup='motorway'] { line-width: @rdz13_maj + 2; } 110 | [stylegroup='mainroad'] { line-width: @rdz13_med + 2; } 111 | [stylegroup='minorroad']{ line-width: @rdz13_min + 2; } 112 | /* No minor bridges yet */ 113 | [stylegroup='service'] { line-width: 0; } 114 | [stylegroup='noauto'] { line-width: 0; } 115 | [stylegroup='railway'] { line-width: 0; } 116 | } 117 | [zoom=14] { 118 | [stylegroup='motorway'] { line-width: @rdz14_maj + 2; } 119 | [stylegroup='mainroad'] { line-width: @rdz14_med + 2; } 120 | [stylegroup='minorroad']{ line-width: @rdz14_min + 2; } 121 | /* No minor bridges yet */ 122 | [stylegroup='service'] { line-width: 0; } 123 | [stylegroup='noauto'] { line-width: 0; } 124 | [stylegroup='railway'] { line-width: 0; } 125 | } 126 | [zoom=15] { 127 | [stylegroup='motorway'] { line-width: @rdz15_maj + 2.5; } 128 | [stylegroup='mainroad'] { line-width: @rdz15_med + 2; } 129 | [stylegroup='minorroad']{ line-width: @rdz15_min + 2; } 130 | [stylegroup='service'] { line-width: @rdz15_min / 3 + 2; } 131 | [stylegroup='noauto'] { line-width: @rdz15_min / 4 + 2; } 132 | [stylegroup='railway'] { line-width: 1.5 + 2; } 133 | } 134 | [zoom=16] { 135 | [stylegroup='motorway'] { line-width: @rdz16_maj + 2.5; } 136 | [stylegroup='mainroad'] { line-width: @rdz16_med + 2.5; } 137 | [stylegroup='minorroad']{ line-width: @rdz16_min + 2; } 138 | [stylegroup='service'] { line-width: @rdz16_min / 3 + 2; } 139 | [stylegroup='noauto'] { line-width: @rdz16_min / 4 + 2; } 140 | [stylegroup='railway'] { line-width: 2 + 2; } 141 | } 142 | [zoom>=17] { 143 | [stylegroup='motorway'] { line-width: @rdz17_maj + 3; } 144 | [stylegroup='mainroad'] { line-width: @rdz17_med + 2.5; } 145 | [stylegroup='minorroad']{ line-width: @rdz17_min + 2; } 146 | [stylegroup='service'] { line-width: @rdz17_min / 3 + 2; } 147 | [stylegroup='noauto'] { line-width: @rdz17_min / 4 + 4; } 148 | [stylegroup='railway'] { line-width: 3 + 4; } // 3 + 4 149 | } 150 | [zoom>=18] { 151 | [stylegroup='motorway'] { line-width: @rdz18_maj + 4; } 152 | [stylegroup='mainroad'] { line-width: @rdz18_med + 4; } 153 | [stylegroup='minorroad']{ line-width: @rdz18_min + 3.5; } 154 | [stylegroup='service'] { line-width: @rdz18_min / 3 + 3.5; } 155 | [stylegroup='noauto'] { line-width: @rdz18_min / 4 + 6; } 156 | [stylegroup='railway'] { line-width: 4 + 6; } 157 | } 158 | } 159 | 160 | 161 | #roads_high[zoom>=11][zoom<=20], 162 | #tunnel[render='3_inline'][zoom>=11][zoom<=20], 163 | #bridge[render='3_inline'][zoom>=11][zoom<=20]{ 164 | [stylegroup="other"], 165 | [stylegroup="railway"] { 166 | line-width: 0; 167 | } 168 | /* -- colors & styles -- */ 169 | line-color: @standard_fill; 170 | [type='motorway'], 171 | [type='motorway_link'] { 172 | line-color: @motorway_fill; 173 | [tunnel=1] { line-color: lighten(@motorway_fill, 10%); } 174 | } 175 | [type='trunk'], 176 | [type='trunk_link'] { 177 | line-color: @trunk_fill; 178 | [tunnel=1] { line-color: lighten(@trunk_fill, 10%); } 179 | } 180 | [type='primary'], 181 | [type='primary_link'] { 182 | line-color: @primary_fill; 183 | [tunnel=1] { line-color: lighten(@primary_fill, 10%); } 184 | } 185 | [type='secondary'], 186 | [type='secondary_link'] { 187 | line-color: @secondary_fill; 188 | [tunnel=1] { line-color: lighten(@secondary_fill, 10%); } 189 | } 190 | [stylegroup='railway'] { 191 | line-color: @rail_line; 192 | line-dasharray: 1,1; 193 | [type='subway'] { line-opacity: 0.67; } 194 | [zoom>=16] { line-dasharray: 1,2; } 195 | } 196 | [stylegroup='noauto'], 197 | [stylegroup='service'], 198 | [stylegroup='minorroad'] { 199 | line-width: 0; 200 | } 201 | [stylegroup='service'], 202 | [stylegroup='minorroad'], 203 | [stylegroup='mainroad'], 204 | [stylegroup='motorway'] { 205 | line-cap: round; 206 | line-join: round; 207 | } 208 | [stylegroup='noauto'] { 209 | line-join: round; 210 | } 211 | [tunnel=1] { 212 | line-cap: butt; 213 | } 214 | /* -- widths -- */ 215 | [zoom=11] { 216 | [stylegroup='motorway'] { line-width: @rdz11_maj; } 217 | [stylegroup='mainroad'] { line-width: @rdz11_med; } 218 | [stylegroup='minorroad']{ line-width: 0; } 219 | [stylegroup='railway'] {line-width: 0.2;} 220 | } 221 | [zoom=12] { 222 | [stylegroup='motorway'] { line-width: @rdz12_maj; } 223 | [stylegroup='mainroad'] { line-width: @rdz12_med; } 224 | [stylegroup='minorroad']{ line-width: 0; } 225 | [stylegroup='railway'] { line-width: 0.4; } 226 | } 227 | [zoom=13] { 228 | [stylegroup='motorway'] { line-width: @rdz13_maj; } 229 | [stylegroup='mainroad'] { line-width: @rdz13_med; } 230 | [stylegroup='minorroad']{ line-width: @rdz13_min; } 231 | [stylegroup='service'] { line-width: @rdz13_min / 3; } 232 | [stylegroup='noauto'] { line-width: @rdz13_min / 4; line-dasharray: 1,1; } 233 | [stylegroup='railway'] { line-width: 1;} 234 | } 235 | [zoom=14] { 236 | [stylegroup='motorway'] { line-width: @rdz14_maj; } 237 | [stylegroup='mainroad'] { line-width: @rdz14_med; } 238 | [stylegroup='minorroad']{ line-width: @rdz14_min; } 239 | [stylegroup='service'] { line-width: @rdz14_min / 3; } 240 | [stylegroup='noauto'] { line-width: @rdz14_min / 4; line-dasharray: 1,1; } 241 | [stylegroup='railway'] { line-width: 2; } 242 | } 243 | [zoom=15] { 244 | [stylegroup='motorway'] { line-width: @rdz15_maj; } 245 | [stylegroup='mainroad'] { line-width: @rdz15_med; } 246 | [stylegroup='minorroad']{ line-width: @rdz15_min; } 247 | [stylegroup='service'] { line-width: @rdz15_min / 3; } 248 | [stylegroup='noauto'] { line-width: @rdz15_min / 4; line-dasharray: 1,1; } 249 | [stylegroup='railway'] { line-width: 2.5; } 250 | } 251 | [zoom=16] { 252 | [stylegroup='motorway'] { line-width: @rdz16_maj; } 253 | [stylegroup='mainroad'] { line-width: @rdz16_med; } 254 | [stylegroup='minorroad']{ line-width: @rdz16_min; } 255 | [stylegroup='service'] { line-width: @rdz16_min / 3; } 256 | [stylegroup='noauto'] { line-width: @rdz16_min / 4; line-dasharray: 2,1; } 257 | [stylegroup='railway'] { line-width: 3; } 258 | } 259 | [zoom=17] { 260 | [stylegroup='motorway'] { line-width: @rdz17_maj; } 261 | [stylegroup='mainroad'] { line-width: @rdz17_med; } 262 | [stylegroup='minorroad']{ line-width: @rdz17_min; } 263 | [stylegroup='service'] { line-width: @rdz17_min / 3; } 264 | [stylegroup='noauto'] { line-width: @rdz17_min / 4; line-dasharray: 2,2; } 265 | [stylegroup='railway'] { line-width: 4; } 266 | } 267 | [zoom>=18] { 268 | [stylegroup='motorway'] { line-width: @rdz18_maj; } 269 | [stylegroup='mainroad'] { line-width: @rdz18_med; } 270 | [stylegroup='minorroad']{ line-width: @rdz18_min; } 271 | [stylegroup='service'] { line-width: @rdz18_min / 2; } 272 | [stylegroup='noauto'] { line-width: @rdz18_min / 4; line-dasharray: 3,3; } 273 | [stylegroup='railway'] { line-width: 5; } 274 | } 275 | } 276 | 277 | /* ---- Bridge fill for dashed lines -------------------------------- */ 278 | #tunnel[render='2_line'][zoom>=14][zoom<=20], 279 | #bridge[render='2_line'][zoom>=14][zoom<=20]{ 280 | /* -- colors & styles -- */ 281 | [stylegroup='noauto'] { 282 | line-color: @land; 283 | line-width: 0; 284 | line-join: round; 285 | } 286 | [stylegroup='railway'] { 287 | line-color: @land; 288 | line-join: round; 289 | } 290 | /* -- widths -- */ 291 | [zoom=14] { 292 | [stylegroup='noauto'] { line-width: @rdz14_min / 4 + 1; } 293 | [stylegroup='railway'] { line-width: 1 + 1; } 294 | } 295 | [zoom=15] { 296 | [stylegroup='noauto'] { line-width: @rdz15_min / 4 + 1; } 297 | [stylegroup='railway'] { line-width: 1.5 + 1; } 298 | } 299 | [zoom=16] { 300 | [stylegroup='noauto'] { line-width: @rdz16_min / 4 + 1; } 301 | [stylegroup='railway'] { line-width: 2 + 1; } 302 | } 303 | [zoom=17] { 304 | [stylegroup='noauto'] { line-width: @rdz17_min / 4 + 3; } 305 | [stylegroup='railway'] { line-width: 3 + 2; } 306 | } 307 | [zoom>=18] { 308 | [stylegroup='noauto'] { line-width: @rdz18_min / 4 + 3; } 309 | [stylegroup='railway'] { line-width: 4 + 3; } 310 | } 311 | } 312 | 313 | /* ---- Turning Circles --------------------------------------------- */ 314 | #turning_circle_case[zoom>=14] { 315 | marker-fill:@standard_fill; 316 | marker-line-color:@standard_case; 317 | marker-line-width:2; 318 | marker-allow-overlap:true; 319 | } 320 | #turning_circle_fill[zoom>=14] { 321 | marker-fill:@standard_fill; 322 | marker-line-width:0; 323 | marker-line-opacity:0; 324 | marker-allow-overlap:true; 325 | } 326 | #turning_circle_case, 327 | #turning_circle_fill { 328 | [zoom=14] { marker-width:@rdz14_min * 1.1; } 329 | [zoom=15] { marker-width:@rdz15_min * 1.1; } 330 | [zoom=16] { marker-width:@rdz16_min * 1.1; } 331 | [zoom=17] { marker-width:@rdz17_min * 1.1; } 332 | [zoom>=18] { marker-width:@rdz18_min * 1.1; } 333 | } 334 | 335 | /* ================================================================== */ 336 | /* AEROWAYS 337 | /* ================================================================== */ 338 | 339 | #aeroway[zoom>9] { 340 | line-color:@aeroway; 341 | line-cap:butt; 342 | line-join:miter; 343 | [type='runway'] { 344 | [zoom=10]{ line-width:1; } 345 | [zoom=11]{ line-width:2; } 346 | [zoom=12]{ line-width:3; } 347 | [zoom=13]{ line-width:5; } 348 | [zoom=14]{ line-width:7; } 349 | [zoom=15]{ line-width:11; } 350 | [zoom=16]{ line-width:15; } 351 | [zoom=17]{ line-width:19; } 352 | [zoom>17]{ line-width:23; } 353 | } 354 | [type='taxiway'] { 355 | [zoom=10]{ line-width:0.2; } 356 | [zoom=11]{ line-width:0.2; } 357 | [zoom=12]{ line-width:0.2; } 358 | [zoom=13]{ line-width:1; } 359 | [zoom=14]{ line-width:1.5; } 360 | [zoom=15]{ line-width:2; } 361 | [zoom=16]{ line-width:3; } 362 | [zoom=17]{ line-width:4; } 363 | [zoom>17]{ line-width:5; } 364 | } 365 | } 366 | 367 | /******************************************************************* */ 368 | -------------------------------------------------------------------------------- /waterways.mss: -------------------------------------------------------------------------------- 1 | Map { 2 | background-color: @water; 3 | buffer-size: 256; 4 | } 5 | 6 | #waterway_network[zoom>=5][zoom<=12][navigable='yes'] { 7 | line-color: @navigable_high; 8 | [zoom>=11] { 9 | line-color: @navigable_medium; 10 | } 11 | [zoom=5] { 12 | line-width: 0.5; 13 | } 14 | [zoom=6] { 15 | line-width: 1; 16 | } 17 | [zoom=7] { 18 | line-width: 2; 19 | } 20 | [zoom=8] { 21 | line-width: 3; 22 | } 23 | [zoom=9] { 24 | [type='canal'] { line-width: 4; } 25 | [type='river'] { line-width: 3; } 26 | } 27 | [zoom=10] { 28 | [type='canal'] { line-width: 5; } 29 | [type='river'] { line-width: 4; } 30 | } 31 | [zoom=11] { 32 | [type='canal'] { line-width: 6; } 33 | [type='river'] { line-width: 5; } 34 | } 35 | [zoom=12] { 36 | [type='canal'] { line-width: 7; } 37 | [type='river'] { line-width: 6; } 38 | } 39 | } 40 | #waterway_network_high[zoom>=13] { 41 | line-color: @water; 42 | [navigable='yes'] { 43 | line-color: @navigable; 44 | } 45 | [type='stream'] { line-width: 1; } 46 | [type='canal'] { line-width: 4; } 47 | [type='river'] { line-width: 6; } 48 | [zoom>=15] { 49 | [type='stream'] { line-width: 2; } 50 | [type='canal'] { line-width: 6; } 51 | [type='river'] { line-width: 8; } 52 | } 53 | } 54 | 55 | /* ================================================================== */ 56 | /* WATER AREAS 57 | /* ================================================================== */ 58 | 59 | #water[zoom>5], 60 | #landuse[type='basin'][zoom>=13] { 61 | polygon-fill: @water; 62 | [navigable='yes'] { polygon-fill: @navigable;} 63 | } 64 | 65 | #navigable_water[zoom>=13] { 66 | ::bridge[bridge='yes'] { 67 | line-color: @navigable * 0.8; 68 | line-width: 2; 69 | } 70 | polygon-fill: @navigable; 71 | } 72 | 73 | /* ================================================================== */ 74 | /* MOORING 75 | /* ================================================================== */ 76 | 77 | #piers::outline[zoom>=14][mooring='yes'] { 78 | line-color: @mooring; 79 | line-width: 3; 80 | line-cap: round; 81 | [zoom>16] { 82 | line-width: 5; 83 | } 84 | } 85 | #piers[zoom>=14] { 86 | line-cap: butt; 87 | line-color: @land; 88 | line-width: 2; 89 | [zoom>16] { 90 | line-width: 3; 91 | } 92 | } 93 | #piers_polygons[zoom>=14] { 94 | polygon-fill: @land; 95 | } 96 | #groyne[zoom>=14] { 97 | line-cap: butt; 98 | line-color: @land; 99 | line-width: 1; 100 | [zoom>16] { 101 | line-width: 2; 102 | } 103 | } 104 | 105 | /* ================================================================== */ 106 | /* DAMS 107 | /* ================================================================== */ 108 | #dams[zoom>=14] { 109 | line-cap: butt; 110 | line-color: @land; 111 | line-width: 3; 112 | [zoom>16] { 113 | line-width: 4; 114 | } 115 | } 116 | #dams_polygons[zoom>=14] { 117 | polygon-fill: @land; 118 | } 119 | --------------------------------------------------------------------------------