diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index c29e2c2cc3..0000000000 --- a/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.mml binary diff --git a/.gitignore b/.gitignore index 4da5ad5869..72691692b4 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ data/ *.xml node_modules/ localconfig.json +localconfig.js # Generated at runtime by Python. *.pyc diff --git a/.travis.yml b/.travis.yml index 04bea3848a..bfdface41e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,10 +9,9 @@ addons: node_js: - "0.10" install: - - npm install carto@0.12.1 + - npm install carto@0.16.0 - mkdir -p data/world_boundaries data/simplified-land-polygons-complete-3857 data/ne_110m_admin_0_boundary_lines_land data/ne_10m_populated_places data/land-polygons-split-3857 - touch data/world_boundaries/builtup_area.shp data/simplified-land-polygons-complete-3857/simplified_land_polygons.shp data/ne_110m_admin_0_boundary_lines_land/ne_110m_admin_0_boundary_lines_land.shp data/ne_10m_populated_places/ne_10m_populated_places_fixed.shp data/land-polygons-split-3857/land_polygons.shp script: - - jsonlint project.mml - - ./node_modules/carto/bin/carto project.mml | xmllint - | wc -l - - ./scripts/travis_check_project_files + - set -o pipefail && ./node_modules/carto/bin/carto project.mml | xmllint - | wc -l + - find symbols/ -name '*.svg' | xargs xmllint --noout diff --git a/CARTOGRAPHY.md b/CARTOGRAPHY.md index 7e0641089a..e93597c8fd 100644 --- a/CARTOGRAPHY.md +++ b/CARTOGRAPHY.md @@ -1,39 +1,39 @@ -# Cartography -This is a style that serves multiple purposes, so here are some guidelines when considering cartographic changes. +# Design goals and guidelines for this style -## Purposes +This is an attempt to outline the goals of this style and the principles under +which the maintainers make decisions. These rules are not set in stone, they +can change and they may not be followed in all cases but contributors should +be able to expect that they are generally the guiding principles design wise. -There are multiple primary purposes of the map style, which pull in different directions +It does not make much sense to try following these principles blindly as a +contributor without understanding them, they are meant to guide you to develop +an intuition and understanding how to make design decisions to fit into the +overall concept of this style. -* It's the primary feedback mechanism for mappers to validate their edits - so detail is useful -* It's a major part of the impression visitors to osm.org receive - so clear design is useful -* It's an examplar stylesheet for rendering OSM data - so easy customisation is useful +## General purpose -It must always be borne in mind that a map style cannot show every detail of the OSM data, and in many cases it is more appropriate to show the detail in other, more specialist styles. +This style has multiple purposes: -## Colours +* It's an important feedback mechanism for mappers to validate their edits and helps to prevent unfavorable fragmentation of tag use. +* It's a major part of the public face of OpenStreetMap, for many people the map on osm.org rendered with this style _is_ OpenStreetMap. +* It's used in many map applications as a general purpose map. +* It's an examplar stylesheet for rendering OSM data. -Firstly, this is a map, not merely a colourful 2-dimensional visualisation of the database. Colours should be chosen based on their effectiveness and to make things look nice, not chosen for distinctiveness. +There is no ranking of these purposes. To allow serving all of them and to +avoid satisfying only some at the cost of the others the following main goals +have been identified. -The colour palette should be moving towards pastel/light/desaturated for background layers, midtones for streets and save highlights/bolds/saturated for points of interest. If colourspace can be left unused, that enables overlays for third parties. +## Main goals -Colour definitions should, where useful, be put into variables at the top of the file, to enable easier customisation. +The following goals need to be balanced against each other to serve the purposes +above. There is no fixed order of priorities. Apart from these goals there are +of course also technical constraints and requirements that need to be taken into +account. -## Data manipulation - -OpenStreetMap data has to be manipulated for rendering, but since this style is intended for use by mappers to check their work, it should minimise any distortions. For example, line-smoothing improves the look of railways and rivers, but introduces confusion for mappers. Post processing of geometries can improve the cartographic results, but breaks the cause-and-effect between editing the data and seeing the results. - -For similar reasons, use of external non-OSM data should be avoided. - -## Legibility - -Legibility is not only about of font size, but also about the ability of users to be able to “read” the map style. For example, a user might not be familiar with our exact road colours, but should be able to understand their relative importance via intensity of colour, width or other attributes. Important features should be more easily spotted and understood than less important information. It should be possible to gain an understanding of the majority of the map without using a legend. - -Avoid font sizes smaller than 10. - -## The Mapper Feedback Loop - -If you thought that mappers were happy just to press "Save" on their editor, you'd be wrong. A key part of their feedback loop - to reassure them their work has been saved, and also to check that they have mapped 'correctly' - is waiting to see the results of their mapping on the main map layer on www.osm.org - -While this desire is in obvious conflict with the above comments on level of detail, it has a second impact on the map style. We need to, wherever possible, avoid accidentally encouraging mistakes - that is, avoiding the situation where a clearly misspelled or misused tag leads to the originally expected result. So `highway=mtorway` shouldn't show up as if it was `highway=motorway`, and so on. This has been a problem with "catch-all" rules in queries and filters, such as `where leisure is not null` or `[amenity != ""]`. Avoid these situations. \ No newline at end of file +* **Legibility and clarity** - The map should be intuitively readable by users with some general experience using maps without a map key, preferrably with relatively little effort. A map key or more extensive experience using this map style can be required for clearly identifying minor differences or the exact meaning of certain features but in broad strokes orientation and identification of map elements should be possible on an intuitive level. We also aim for the map appearance to be esthetically pleasing. +* **Being understandable and supportive for mappers** - To serve as feedback for mappers and encourage correct mapping this style needs to render the data in a way that allows mappers to understand how the data produces a certain rendering result based on basic observation without in depth understanding how map rendering works or looking at the style implementation. +* **Diversity** - The style should represent the diversity of the OSM community and geography in general. The most obvious element to serve this goal is showing the local names everywhere on earth in their respective scripts. This goal however goes beyond labels. Both physical and cultural geography differs a lot globally and the aim is to represent this variety with equal determination - well mapped areas are not supposed to have more weight here than less mapped parts of the world. This also means the target map user is the potential global map user and no special consideration is given to the current geographic distribution of actual map use. +* **A rich map** - This style deliberately creating a fairly rich map showing a significant number of different features. This way it shows the richness of OSM data and gives a broad recognition to the mappers' work. The aim is not however to show all or even most of the OSM data. +* **Maintainability** - The implementation of this style should not be too hard to maintain. This refers to both the volume and complexity of the code and how fast the style can be parsed when rendering it, which is very important for efficient development work. So the amount of code should be kept small and complex and fragile interdependencies should be avoided. If the code is difficult to maintain this would ultimately seriously affect all of the above goals. +* **Adaptability and ease of use** - The style should be easy to customize, like for creating localized or special purpose maps. It is also important to keep demands on rendering infrastructure for serving the style low so it is not too difficult and costly to set up a tile server for this style or a specialized variant of it. diff --git a/CHANGELOG.md b/CHANGELOG.md index 0022ca5d44..aa5d842348 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,30 @@ -## [Unreleased](https://github.com/gravitystorm/openstreetmap-carto/compare/v2.43.0...master) +## [Unreleased](https://github.com/gravitystorm/openstreetmap-carto/compare/v2.45.1...master) +### Major Changes +- Mapnik 3 is now required +- CartoCSS 0.16.x is now required +- Official Tilemill support is dropped + +## [v2.45.1](https://github.com/gravitystorm/openstreetmap-carto/compare/v2.45.0...v2.45.1) - 2016-12-03 +### Changes +- Bug fix for tobacco shop and memorial icons + +## [v2.45.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v2.44.1...v2.45.0) - 2016-11-28 +### Changes +- Render all shops without a specific icon as a dot, not just a whitelist +- Scrub pattern change to random +- Change pitch and track color +- Railway stations rendering as major buildings +- Rendering the name of man_made=bridge inside the polygon +- Documentation updates (including cartography design goals and icon design guidelines) +- Icons general code cleaning +- Various bug fixes + +## [v2.44.1](https://github.com/gravitystorm/openstreetmap-carto/compare/v2.44.0...v2.44.1) - 2016-10-12 +### Changes +- Bug fixes to low zoom place rendering changes +- Documentation improvements for fonts and non-latin rendering + +## [v2.44.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v2.43.0...v2.44.0) - 2016-09-26 ### Major Changes - Rendering of restricted access roads and paths significantly changed - Changed to use Noto fonts for all languages @@ -9,6 +35,9 @@ ### Changes - A code of conduct adopted, based on the Go code of conduct - Adjustments to city wall rendering +- Revised low zoom place rendering +- Fixed oneway arrows on unnamed roads +- Render both house name and number if address has both ## [v2.43.0](https://github.com/gravitystorm/openstreetmap-carto/compare/v2.42.0...v2.43.0) - 2016-09-05 ### Changes diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 879b9539d5..5be25d8d76 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -62,7 +62,7 @@ When using the OpenStreetMap Carto spaces you should act in the spirit of the va The OpenStreetMap Carto maintainers are responsible for handling conduct-related issues. Their goal is to de-escalate conflicts and try to resolve issues to the satisfaction of all parties. -If you encounter a conduct-related issue, you should report it to the maintainers by sending them [all an email](mailto:openstreetmap-carto@gravitystorm.co.uk,penorman@mac.com,info@matthijsmelissen.nl,matkoniecz@gmail.com). +If you encounter a conduct-related issue, you should report it to the maintainers by sending them [all an email](mailto:openstreetmap-carto@gravitystorm.co.uk,penorman@mac.com,info@matthijsmelissen.nl,matkoniecz@gmail.com,chris_hormann@gmx.de,daniel@xn--ko-wla.pl,nebulon42@mailbox.org). **Note that the goal of the Code of Conduct and the maintainers is to resolve conflicts in the most harmonious way possible.** We hope that in most cases issues may be resolved through polite discussion and mutual agreement. Bans and other forceful measures are to be employed only as a last resort. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4ccccd6ac7..c9555fdced 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,36 +24,14 @@ that are particularly suitable for new contributors to get familiar with the pro ## Editing Layers -OpenStreetMap Carto uses a YAML file for defining layers. Some of the rationale -is outlined in [a GitHub issue](https://github.com/gravitystorm/openstreetmap-carto/issues/711). -Editing multi-line SQL statements in a YAML file is much friendlier than editing -escaped SQL in a JSON file. - -The `./scripts/yaml2mml.py` script is provided to convert YAML to JSON, and -depends on PyYAML, available through `pip install pyyaml` or packaged on Ubuntu -as `python-yaml`. - -[Kosmtik](https://github.com/kosmtik/kosmtik) can directly load the project from -the YAML file with `node index.js serve path/to/openstreetmap-carto/project.yaml`, -and the JSON file just needs updating before committing. - -[TileMill](https://github.com/mapbox/tilemill) and Mapbox `carto` [do not directly support YAML](https://github.com/mapbox/carto/issues/401), -so make edits to the YAML file then run the preprocessing step of -`./scripts/yaml2mml.py && touch project.mml` to -update the file and force TileMill to reload it. You shouldn't use the text editor -built-in to TileMill, it doesn't work with the number of .mss files in the style. -Instead, hide the right pane and use an external text editor. - -Before committing changes, run `./scripts/yaml2mml.py` -to update the JSON MML file and `git add project.mml` - -When committing changes, add both the `project.yaml` and `project.mml` files to -the commit with `./scripts/yaml2mml.py && git add project.mml`. -One of the big advantages of this system is that to resolve any layer merge -conflicts, they only need to be resolved in the YAML file where they are easier -to handle, then the JSON file can be regenerated, while at the same time the -styles work with TileMill and carto out-of-the-box without needing to run the -`yaml2mml` script. +OpenStreetMap Carto uses a YAML file for defining layers, because it [works much +better for big projects](https://github.com/gravitystorm/openstreetmap-carto/issues/711). +This requires CartoCSS 0.16.0 or later. If you need JSON MML, you can generate it +with `python -c 'import sys, yaml, json; json.dump(yaml.safe_load(sys.stdin), sys.stdout)' < project.mml > project.json` +or the equivalent in a different language. + +[Kosmtik](https://github.com/kosmtik/kosmtik) and CartoCSS can directly load the project from +the YAML file with `node index.js serve path/to/openstreetmap-carto/project.mml` ## CartoCSS Style Guidelines @@ -138,6 +116,23 @@ Because SQL within JSON or YAML will not generally be syntax highlighted, indent * One space before and after = etc * Name SQL subqueries after the layer name (but use underscores) +## Map Icon Guidelines + +* All new icons must be SVG format only. The SVG must be saved as standards compliant SVG without any proprietary tags. In Inkscape software, you will need to "Save As..." and choose the format Optimized SVG (preferable) or Plain SVG. +* Icons must use SVG fills only, not SVG strokes or any feature Mapnik does not support. +* Use no color for the icon's fill if the icon is monochromatic. This allows the color to be set in the MSS. +* Use a common canvas size, which is usually 14x14 px. +* Convert shapes and other components to paths and merge them into a compound path. +* Draw a simple siloutte of the subject with an "on the shelf" perspective. +* Align vectors to the pixel grid. +* Make a clean design, so reduced complexity where possible. + +### External Icon Design Resources +The project's goals and design philsophy are different from other projects, but some external resources with general information about icon design are: + +* [Maki Icons Design Guidelines](https://www.mapbox.com/maki-icons/guidelines/) +* [GNOME Icon Design Guildelines](https://developer.gnome.org/hig/stable/icons-and-artwork.html.en) + ## Pull requests Pull requests that change the cartography should contain a few images selected diff --git a/INSTALL.md b/INSTALL.md index 79a70a9511..1b926ed9e0 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -21,13 +21,14 @@ psql -d gis -f indexes.sql Additionally you need some shapefiles. ## Scripted download - -To download the shapefiles you can run the following script from this directory. No further steps should be needed as the data has been processed and placed in the requisite directories. +To download the shapefiles you can run the following script. No further steps should be needed as the data has been processed and placed in the requisite directories. ``` -./get-shapefiles.sh +scripts/get-shapefiles.py ``` +This script generates and populates the *data* directory with all needed shapefiles, including indexing them through *shapeindex*. + ## Manual download You can also download them manually at the following paths: @@ -48,26 +49,37 @@ DejaVu Sans is used as an optional fallback font for systems without Noto Sans. Unifont is used as a last resort fallback, with it's excellent coverage, common presence on machines, and ugly look. -Mapnik 3 is required for acceptable rendering of most non-Latin scripts, particularly those with complicated diacritics and tone marks. - -On Ubuntu 16.04 or Debian Testing you can install all required fonts with +On Ubuntu 16.04 or Debian Testing you can install the required fonts except Noto Emoji Regular with ``` -sudo apt-get install fonts-noto ttf-unifont +sudo apt-get install fonts-noto-cjk fonts-noto-hinted fonts-noto-unhinted ttf-unifont ``` +Noto Emoji Regular can be downloaded [from the Noto Emoji repository](https://github.com/googlei18n/noto-emoji). + +It might be useful to have a more recent version of the fonts for [rare non-latin scripts](#non-latin-scripts). This can be installed [from source](https://github.com/googlei18n/noto-fonts/blob/master/FAQ.md#where-are-the-fonts). + DejaVu is packaged as `fonts-dejavu-core`. +### Non-latin scripts + +For proper rendering of non-latin scripts, particularly those with complicated diacritics and tone marks the requirements are + +* FreeType 2.6.2 or later for CJK characters + +* A recent enough version of Noto with coverage for the scripts needed. + ## Dependencies For development, a style design studio is needed. -* [Kosmtik](https://github.com/kosmtik/kosmtik) - Kosmtik can be launched with `node index.js serve path/to/openstreetmap-carto/project.yaml` -* [TileMill](http://mapbox.com/tilemill) - This is a TileMill project you can copy (or symlink) directly into your Mapbox/project directory +* [Kosmtik](https://github.com/kosmtik/kosmtik) - Kosmtik can be launched with `node index.js serve path/to/openstreetmap-carto/project.mml` + +[TileMill](http://mapbox.com/tilemill) is not officially supported, but you may be able to use a recent TileMill version by copying or simlinking the project directly into your Mapbox/project directory. For deployment, `carto` and Mapnik are required. -* [carto](https://github.com/mapbox/carto) >= 0.9.5 (we're using instances with cascading rules and min/max zoom properties) -* [mapnik](https://github.com/mapnik/mapnik/wiki/Mapnik-Installation) >= 2.1.0. Mapnik 3.0 is supported, but not required. +* [Carto](https://github.com/mapbox/carto) >= 0.16.0 (we're using YAML) +* [Mapnik](https://github.com/mapnik/mapnik/wiki/Mapnik-Installation) 3.0 --- @@ -84,5 +96,4 @@ For both development and deployment, a database and some utilities are required Some colours, SVGs and other files are generated with helper scripts. Not all users will need these dependencies * Python and Ruby to run helper scripts -* [PyYAML](http://pyyaml.org/wiki/PyYAML) if editing the MML (layer definition) file (packaged as `python-yaml` on Ubuntu, or installed with `pip install pyyaml`) * [Color Math](https://github.com/gtaylor/python-colormath) and [numpy](http://www.numpy.org/) if running generate_road_colors.py helper script (may be obtained with `pip install colormath numpy`) diff --git a/README.md b/README.md index 8b174ccfae..7b63a212f8 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,8 @@ These are the CartoCSS map stylesheets for the Standard map layer on [OpenStreetMap.org](http://www.openstreetmap.org). These stylesheets can be used in your own cartography projects, and are designed -to be easily customised. They work with [Kosmtik](https://github.com/kosmtik/kosmtik), -[TileMill](http://www.mapbox.com/tilemill/) and also with the command-line -[CartoCSS](https://github.com/mapbox/carto) processor. +to be easily customised. They work with [Kosmtik](https://github.com/kosmtik/kosmtik) + and also with the command-line [CartoCSS](https://github.com/mapbox/carto) processor. Since August 2013 these stylesheets have been used on the OSMF tileservers (tile.openstreetmap.org), and are updated from each point release. They supersede the previous [XML-based stylesheets](https://github.com/openstreetmap/mapnik-stylesheets). @@ -45,12 +44,17 @@ cartographic project you can expect the following: This was a full re-implementation of the original OSM style, with only a few bugs discovered later. There's been no interest in creating further point releases in the v1.x series. -## Current work (v2.x) +## Mapnik 2 work (v2.x) The v2.x series initially focused on refactoring the style, both to to fix glitches and to leverage new features in CartoCSS / Mapnik to simplify the stylesheets with only small changes to the output, as well as removing 'old-skool' -tagging methods that are now rarely used. +tagging methods that are now rarely used. It then started adding new features. + + +## Current work (v3.x) +The v3.x series was triggered by an update to the required Mapnik and CartoCSS +versions. Care is being taken to not get too clever with variables and expressions. While these often make it easier to customise, experience has shown that over-cleverness @@ -63,19 +67,19 @@ that need some cartographic judgement. [issues]: https://github.com/gravitystorm/openstreetmap-carto/issues [cleverness]: https://github.com/openstreetmap/mapnik-stylesheets/blob/master/inc/settings.xml.inc.template#L16 -## Database schema change (v3.x) +## Database schema change (4.x) -The v3.x series will include [osm2pgsql lua transforms](https://github.com/openstreetmap/osm2pgsql/blob/master/docs/lua.md) +The v4.x series will include [osm2pgsql lua transforms](https://github.com/openstreetmap/osm2pgsql/blob/master/docs/lua.md) and a hstore column with all other tags, allowing use of more OpenStreetMap data. Work is being done in the [lua branch](https://github.com/gravitystorm/openstreetmap-carto/tree/lua) and issues have their own [tag](https://github.com/gravitystorm/openstreetmap-carto/issues?q=is%3Aopen+is%3Aissue+label%3Alua). Initial releases will not make use of the new features, maintaining compatibility -with v2.x and v2.x releases will continue with backports, allowing the style to be +with v3.x and v3.x releases will continue with backports, allowing the style to be rendered from either a new database or an old one. When sufficient time has passed for users to reload their databases, new features -can be used and 2.x compatibility will not be maintained. +can be used and 3.x compatibility will not be maintained. # Alternatives @@ -93,3 +97,6 @@ maps using Mapnik, many based on this project. Some alternatives are: * Matthijs Melissen [@math1985](https://github.com/math1985/) * Paul Norman [@pnorman](https://github.com/pnorman/) * Mateusz Konieczny [@matkoniecz](https://github.com/matkoniecz/) +* Daniel Koć [@kocio-pl](https://github.com/kocio-pl) +* Christoph Hormann [@imagico](https://github.com/imagico) +* Michael Glanznig [@nebulon42](https://github.com/nebulon42) diff --git a/amenity-points.mss b/amenity-points.mss index 6e4139784c..4979964ce6 100644 --- a/amenity-points.mss +++ b/amenity-points.mss @@ -29,36 +29,40 @@ point-placement: interior; } + [feature = 'tourism_wilderness_hut'][zoom >= 13], [feature = 'amenity_shelter'][zoom >= 16] { - marker-file: url('symbols/shelter-14.svg'); + marker-file: url('symbols/shelter.svg'); + [feature = 'tourism_wilderness_hut'] { + marker-file: url('symbols/wilderness_hut.svg'); + } marker-fill: @transportation-icon; marker-placement: interior; marker-clip: false; } [feature = 'amenity_atm'][zoom >= 17] { - marker-file: url('symbols/atm.16.svg'); + marker-file: url('symbols/atm.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; } [feature = 'amenity_bank'][zoom >= 17] { - marker-file: url('symbols/bank.16.svg'); + marker-file: url('symbols/bank.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; } [feature = 'amenity_bar'][zoom >= 17] { - marker-file: url('symbols/bar.16.svg'); + marker-file: url('symbols/bar.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; } [feature = 'amenity_bicycle_rental'][zoom >= 17] { - marker-file: url('symbols/rental_bicycle.16.svg'); + marker-file: url('symbols/rental_bicycle.svg'); marker-fill: @transportation-icon; marker-placement: interior; marker-clip: false; @@ -81,7 +85,7 @@ [feature = 'highway_elevator'][zoom >= 18] { [access = null], [access = 'yes'] { - marker-file: url('symbols/elevator-12.svg'); + marker-file: url('symbols/elevator.12.svg'); marker-fill: @transportation-icon; marker-placement: interior; } @@ -93,63 +97,63 @@ } [feature = 'amenity_taxi'][zoom >= 17] { - marker-file: url('symbols/taxi.16.svg'); + marker-file: url('symbols/taxi.svg'); marker-fill: @transportation-icon; marker-placement: interior; marker-clip: false; } [feature = 'highway_traffic_signals'][zoom >= 17] { - marker-file: url('symbols/traffic_light.svg'); + marker-file: url('symbols/traffic_light.16.svg'); marker-fill: #0a0a0a; marker-placement: interior; marker-clip: false; } [feature = 'amenity_cafe'][zoom >= 17] { - marker-file: url('symbols/cafe.16.svg'); + marker-file: url('symbols/cafe.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; } [feature = 'tourism_artwork'][zoom >= 17] { - marker-file: url('symbols/artwork-14.svg'); + marker-file: url('symbols/artwork.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; } [feature = 'tourism_camp_site'][zoom >= 16] { - marker-file: url('symbols/camping.16.svg'); + marker-file: url('symbols/camping.svg'); marker-fill: @transportation-icon; marker-placement: interior; marker-clip: false; } [feature = 'highway_ford'][zoom >= 16] { - marker-file: url('symbols/ford.16.svg'); + marker-file: url('symbols/ford.svg'); marker-fill: @transportation-icon; marker-placement: interior; marker-clip: false; } [feature = 'tourism_caravan_site'][zoom >= 16] { - marker-file: url('symbols/caravan_park.16.svg'); + marker-file: url('symbols/caravan_park.svg'); marker-placement: interior; marker-clip: false; marker-fill: @transportation-icon; } [feature = 'amenity_car_rental'][zoom >= 17] { - marker-file: url('symbols/rental_car.16.svg'); + marker-file: url('symbols/rental_car.svg'); marker-fill: @transportation-icon; marker-placement: interior; marker-clip: false; } [feature = 'amenity_car_wash'][zoom >= 17] { - marker-file: url('symbols/car_wash-14.svg'); + marker-file: url('symbols/car_wash.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; @@ -161,21 +165,21 @@ } [feature = 'amenity_cinema'][zoom >= 16] { - marker-file: url('symbols/cinema.16.svg'); + marker-file: url('symbols/cinema.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; } [feature = 'amenity_nightclub'][zoom >= 17] { - marker-file: url('symbols/nightclub.14.svg'); + marker-file: url('symbols/nightclub.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; } [feature = 'amenity_fire_station'][zoom >= 16] { - marker-file: url('symbols/firestation.16.svg'); + marker-file: url('symbols/firestation.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; @@ -200,7 +204,7 @@ nozzle/marker-height: 3; } [zoom >= 18] { - nozzle/marker-file: url('symbols/fountain-14.svg'); + nozzle/marker-file: url('symbols/fountain.svg'); nozzle/marker-fill: @marina-text; nozzle/marker-placement: interior; nozzle/marker-clip: false; @@ -209,14 +213,14 @@ } [feature = 'amenity_charging_station'][zoom >= 17] { - marker-file: url('symbols/charging_station.16.svg'); + marker-file: url('symbols/charging_station.svg'); marker-fill: @transportation-icon; marker-placement: interior; marker-clip: false; } [feature = 'amenity_fuel'][zoom >= 17] { - marker-file: url('symbols/fuel.16.svg'); + marker-file: url('symbols/fuel.svg'); marker-fill: @transportation-icon; marker-placement: interior; marker-clip: false; @@ -228,35 +232,35 @@ } [feature = 'amenity_hospital'][zoom >= 15] { - marker-file: url('symbols/hospital.16.svg'); + marker-file: url('symbols/hospital.svg'); marker-fill: @health-color; marker-placement: interior; marker-clip: false; } [feature = 'tourism_hostel'][zoom >= 17] { - marker-file: url('symbols/hostel.16.svg'); + marker-file: url('symbols/hostel.svg'); marker-placement: interior; marker-clip: false; marker-fill: @transportation-icon; } [feature = 'tourism_hotel'][zoom >= 17] { - marker-file: url('symbols/hotel.16.svg'); + marker-file: url('symbols/hotel.svg'); marker-placement: interior; marker-clip: false; marker-fill: @transportation-icon; } [feature = 'tourism_motel'][zoom >= 17] { - marker-file: url('symbols/motel.16.svg'); + marker-file: url('symbols/motel.svg'); marker-placement: interior; marker-clip: false; marker-fill: @transportation-icon; } [feature = 'amenity_ice_cream'][zoom >= 17] { - marker-file: url('symbols/ice-cream-14.svg'); + marker-file: url('symbols/shop/ice_cream.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; @@ -270,56 +274,56 @@ } [feature = 'amenity_embassy'][zoom >= 17] { - marker-file: url('symbols/embassy.16.svg'); + marker-file: url('symbols/embassy.svg'); marker-fill: @transportation-icon; marker-placement: interior; marker-clip: false; } [feature = 'amenity_library'][zoom >= 16] { - marker-file: url('symbols/library.14.svg'); + marker-file: url('symbols/library.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; } [feature = 'amenity_courthouse'][zoom >= 16] { - marker-file: url('symbols/courthouse-16.svg'); + marker-file: url('symbols/courthouse.svg'); marker-placement: interior; marker-fill: @amenity-brown; marker-clip: false; } [feature = 'amenity_community_centre'][zoom >= 17] { - marker-file: url('symbols/community_centre-14.svg'); + marker-file: url('symbols/community_centre.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; } [feature = 'amenity_social_facility'][zoom >= 17] { - marker-file: url('symbols/social_facility-14.svg'); + marker-file: url('symbols/social_facility.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; } [feature = 'amenity_townhall'][zoom >= 16] { - marker-file: url('symbols/town_hall.16.svg'); + marker-file: url('symbols/town_hall.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; } [feature = 'man_made_mast'][zoom >= 17] { - marker-file: url('symbols/communications.16.svg'); + marker-file: url('symbols/communications.svg'); marker-fill: @man-made-icon; marker-placement: interior; marker-clip: false; } [feature = 'tourism_museum'][zoom >= 16] { - marker-file: url('symbols/museum.16.svg'); + marker-file: url('symbols/museum.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; @@ -332,10 +336,10 @@ marker-file: url('symbols/parking.svg'); } [feature = 'amenity_bicycle_parking'] { - marker-file: url('symbols/bicycle_parking.16.svg'); + marker-file: url('symbols/bicycle_parking.svg'); } [feature = 'amenity_motorcycle_parking'] { - marker-file: url('symbols/motorcycle_parking.16.svg'); + marker-file: url('symbols/motorcycle_parking.svg'); } marker-placement: interior; marker-clip: false; @@ -346,7 +350,7 @@ } [feature = 'amenity_pharmacy'][zoom >= 17] { - marker-file: url('symbols/pharmacy.16.svg'); + marker-file: url('symbols/pharmacy.svg'); marker-fill: @health-color; marker-placement: interior; marker-clip: false; @@ -354,57 +358,57 @@ [feature = 'amenity_clinic'][zoom >= 16], [feature = 'amenity_doctors'][zoom >= 17] { - marker-file: url('symbols/doctors.16.svg'); + marker-file: url('symbols/doctors.svg'); marker-fill: @health-color; marker-placement: interior; marker-clip: false; } [feature = 'amenity_dentist'][zoom >= 17] { - marker-file: url('symbols/dentist.16.svg'); + marker-file: url('symbols/dentist.svg'); marker-fill: @health-color; marker-placement: interior; marker-clip: false; } [feature = 'amenity_veterinary'][zoom >= 17] { - marker-file: url('symbols/veterinary-14.svg'); + marker-file: url('symbols/veterinary.svg'); marker-fill: @health-color; marker-placement: interior; marker-clip: false; } [feature = 'amenity_place_of_worship'][zoom >= 16] { - marker-file: url('symbols/place_of_worship.16.svg'); + marker-file: url('symbols/place_of_worship.svg'); marker-fill: #000000; marker-placement: interior; marker-clip: false; [religion = 'christian'] { - marker-file: url('symbols/christian.16.svg'); + marker-file: url('symbols/christian.svg'); [denomination = 'jehovahs_witness']{ - marker-file: url('symbols/place_of_worship.16.svg'); + marker-file: url('symbols/place_of_worship.svg'); } } [religion = 'muslim'] { - marker-file: url('symbols/muslim.16.svg'); + marker-file: url('symbols/muslim.svg'); } [religion = 'sikh'] { - marker-file: url('symbols/sikhist.16.svg'); + marker-file: url('symbols/sikhist.svg'); } [religion = 'jewish'] { - marker-file: url('symbols/jewish.16.svg'); + marker-file: url('symbols/jewish.svg'); } [religion = 'hindu'] { - marker-file: url('symbols/hinduist.16.svg'); + marker-file: url('symbols/hinduist.svg'); } [religion = 'buddhist'] { - marker-file: url('symbols/buddhist.16.svg'); + marker-file: url('symbols/buddhist.svg'); } [religion = 'shinto'] { - marker-file: url('symbols/shintoist.16.svg'); + marker-file: url('symbols/shintoist.svg'); } [religion = 'taoist'] { - marker-file: url('symbols/taoist.16.svg'); + marker-file: url('symbols/taoist.svg'); } } @@ -417,42 +421,42 @@ } [feature = 'amenity_police'][zoom >= 16] { - marker-file: url('symbols/police.16.svg'); + marker-file: url('symbols/police.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; } [feature = 'amenity_post_box'][zoom >= 17] { - marker-file: url('symbols/post_box-12.svg'); + marker-file: url('symbols/post_box.12.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; } [feature = 'amenity_post_office'][zoom >= 17] { - marker-file: url('symbols/post_office-14.svg'); + marker-file: url('symbols/post_office.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; } [feature = 'amenity_pub'][zoom >= 17] { - marker-file: url('symbols/pub.16.svg'); + marker-file: url('symbols/pub.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; } [feature = 'amenity_biergarten'][zoom >= 17] { - marker-file: url('symbols/biergarten.16.svg'); + marker-file: url('symbols/biergarten.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; } [feature = 'amenity_recycling'][zoom >= 17] { - marker-file: url('symbols/recycling.16.svg'); + marker-file: url('symbols/recycling.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; @@ -463,77 +467,77 @@ [feature = 'amenity_restaurant'][zoom >= 17], [feature = 'amenity_food_court'][zoom >= 17] { - marker-file: url('symbols/restaurant.16.svg'); + marker-file: url('symbols/restaurant.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; } [feature = 'amenity_fast_food'][zoom >= 17] { - marker-file: url('symbols/fast_food.16.svg'); + marker-file: url('symbols/fast_food.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; } [feature = 'amenity_telephone'][zoom >= 17] { - marker-file: url('symbols/telephone.16.svg'); + marker-file: url('symbols/telephone.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; } [feature = 'amenity_emergency_phone'][zoom >= 17] { - marker-file: url('symbols/emergency_phone.16.svg'); + marker-file: url('symbols/emergency_phone.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; } [feature = 'amenity_theatre'][zoom >= 16] { - marker-file: url('symbols/theatre.16.svg'); + marker-file: url('symbols/theatre.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; } [feature = 'amenity_toilets'][zoom >= 17] { - marker-file: url('symbols/toilets.16.svg'); + marker-file: url('symbols/toilets.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; } [feature = 'amenity_drinking_water'][zoom >= 17] { - marker-file: url('symbols/drinking_water.16.svg'); + marker-file: url('symbols/drinking_water.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; } [feature = 'amenity_prison'][zoom >= 17] { - marker-file: url('symbols/prison.16.svg'); + marker-file: url('symbols/prison.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; } [feature = 'tourism_viewpoint'][zoom >= 16] { - marker-file: url('symbols/viewpoint.16.svg'); + marker-file: url('symbols/viewpoint.svg'); marker-placement: interior; marker-fill: @amenity-brown; marker-clip: false; } [feature = 'man_made_water_tower'][zoom >= 17] { - marker-file: url('symbols/water_tower.16.svg'); + marker-file: url('symbols/water_tower.svg'); marker-fill: @man-made-icon; marker-placement: interior; marker-clip: false; } [feature = 'historic_memorial'][zoom >= 17] { - marker-file: url('symbols/tourist_memorial.16.svg'); + marker-file: url('symbols/memorial.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; @@ -541,14 +545,14 @@ [feature = 'man_made_obelisk'][zoom >= 16], [feature = 'historic_monument'][zoom >= 16] { - marker-file: url('symbols/monument.16.svg'); + marker-file: url('symbols/monument.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; } [feature = 'historic_archaeological_site'][zoom >= 16] { - marker-file: url('symbols/archaeological_site.16.svg'); + marker-file: url('symbols/archaeological_site.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; @@ -563,62 +567,62 @@ } [feature = 'shop_supermarket'][zoom >= 16] { - marker-file: url('symbols/shop_supermarket.svg'); + marker-file: url('symbols/shop/supermarket.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; } [feature = 'shop_art'][zoom >= 17] { - marker-file: url('symbols/art-14.svg'); + marker-file: url('symbols/shop/art.svg'); marker-fill: @shop-icon; marker-placement: interior; marker-clip: false; } [feature = 'shop_bag'][zoom >= 17] { - marker-file: url('symbols/bag-14.svg'); + marker-file: url('symbols/shop/bag.svg'); marker-fill: @shop-icon; marker-placement: interior; marker-clip: false; } [feature = 'shop_bakery'][zoom >= 17] { - marker-file: url('symbols/shop_bakery.16.svg'); + marker-file: url('symbols/shop/bakery.svg'); marker-fill: @shop-icon; marker-placement: interior; marker-clip: false; } [feature = 'shop_beauty'][zoom >= 17] { - marker-file: url('symbols/beauty-14.svg'); + marker-file: url('symbols/shop/beauty.svg'); marker-fill: @shop-icon; marker-placement: interior; marker-clip: false; } [feature = 'shop_beverages'][zoom >= 17] { - marker-file: url('symbols/beverages-14.svg'); + marker-file: url('symbols/shop/beverages.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; } [feature = 'shop_books'][zoom >= 17] { - marker-file: url('symbols/library.14.svg'); + marker-file: url('symbols/library.svg'); marker-fill: @shop-icon; marker-placement: interior; marker-clip: false; } [feature = 'shop_butcher'][zoom >= 17] { - marker-file: url('symbols/shop_butcher.png'); + marker-file: url('symbols/shop/butcher.png'); marker-placement: interior; marker-clip: false; } [feature = 'shop_chemist'][zoom >= 17] { - marker-file: url('symbols/chemist-14.svg'); + marker-file: url('symbols/shop/chemist.svg'); marker-fill: @shop-icon; marker-placement: interior; marker-clip: false; @@ -627,7 +631,7 @@ [feature = 'shop_clothes'], [feature = 'shop_fashion'] { [zoom >= 17] { - marker-file: url('symbols/shop_clothes.16.svg'); + marker-file: url('symbols/shop/clothes.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; @@ -635,28 +639,28 @@ } [feature = 'shop_computer'][zoom >= 17] { - marker-file: url('symbols/computer-14.svg'); + marker-file: url('symbols/shop/computer.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; } [feature = 'shop_convenience'][zoom >= 17] { - marker-file: url('symbols/shop_convenience.svg'); + marker-file: url('symbols/shop/convenience.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; } [feature = 'shop_confectionery'][zoom >= 17] { - marker-file: url('symbols/confectionery-14.svg'); + marker-file: url('symbols/shop/confectionery.svg'); marker-fill: @shop-icon; marker-placement: interior; marker-clip: false; } [feature = 'shop_copyshop'][zoom >= 17] { - marker-file: url('symbols/copyshop-14.svg'); + marker-file: url('symbols/shop/copyshop.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; @@ -665,7 +669,7 @@ [feature = 'shop_cosmetics'], [feature = 'shop_perfumery'] { [zoom >= 17] { - marker-file: url('symbols/perfumery-14.svg'); + marker-file: url('symbols/shop/perfumery.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; @@ -674,7 +678,7 @@ [feature = 'shop_deli'] { [zoom >= 17] { - marker-file: url('symbols/deli-14.svg'); + marker-file: url('symbols/shop/deli.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; @@ -682,7 +686,7 @@ } [feature = 'shop_department_store'][zoom >= 16] { - marker-file: url('symbols/department_store.p.16.svg'); + marker-file: url('symbols/shop/department_store.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; @@ -691,7 +695,7 @@ [feature = 'shop_doityourself'], [feature = 'shop_hardware'] { [zoom >= 17] { - marker-file: url('symbols/shop_diy.16.svg'); + marker-file: url('symbols/shop/diy.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; @@ -701,7 +705,7 @@ [feature = 'shop_dry_cleaning'], [feature = 'shop_laundry'] { [zoom >= 17] { - marker-file: url('symbols/laundry-14.svg'); + marker-file: url('symbols/shop/laundry.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; @@ -711,7 +715,7 @@ [feature = 'shop_fishmonger'], [feature = 'shop_seafood'] { [zoom >= 17] { - marker-file: url('symbols/seafood-14.svg'); + marker-file: url('symbols/shop/seafood.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; @@ -719,14 +723,14 @@ } [feature = 'shop_florist'][zoom >= 17] { - marker-file: url('symbols/florist.16.svg'); + marker-file: url('symbols/shop/florist.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; } [feature = 'shop_garden_centre'][zoom >= 17] { - marker-file: url('symbols/garden_centre-14.svg'); + marker-file: url('symbols/shop/garden_centre.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; @@ -735,7 +739,7 @@ [feature = 'shop_greengrocer'], [feature = 'shop_farm'] { [zoom >= 17] { - marker-file: url('symbols/greengrocer-14.svg'); + marker-file: url('symbols/shop/greengrocer.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; @@ -743,56 +747,56 @@ } [feature = 'shop_hairdresser'][zoom >= 17] { - marker-file: url('symbols/shop_hairdresser.16.svg'); + marker-file: url('symbols/shop/hairdresser.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; } [feature = 'shop_hifi'][zoom >= 17] { - marker-file: url('symbols/hifi-14.svg'); + marker-file: url('symbols/shop/hifi.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; } [feature = 'shop_ice_cream'][zoom >= 17] { - marker-file: url('symbols/ice-cream-14.svg'); + marker-file: url('symbols/shop/ice_cream.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; } [feature = 'shop_car'][zoom >= 17] { - marker-file: url('symbols/shop_car.svg'); + marker-file: url('symbols/shop/car.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; } [feature = 'shop_car_parts'][zoom >= 17] { - marker-file: url('symbols/car_parts-14.svg'); + marker-file: url('symbols/shop/car_parts.svg'); marker-fill: @shop-icon; marker-placement: interior; marker-clip: false; } [feature = 'shop_car_repair'][zoom >= 17] { - marker-file: url('symbols/shopping_car_repair.16.svg'); + marker-file: url('symbols/shop/car_repair.svg'); marker-placement: interior; marker-clip: false; marker-fill: @amenity-brown; } [feature = 'shop_bicycle'][zoom >= 17] { - marker-file: url('symbols/shop_bicycle.16.svg'); + marker-file: url('symbols/shop/bicycle.svg'); marker-fill: @shop-icon; marker-placement: interior; marker-clip: false; } [feature = 'shop_pet'][zoom >= 17] { - marker-file: url('symbols/shop_pet.16.svg'); + marker-file: url('symbols/shop/pet.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; @@ -802,7 +806,7 @@ [feature = 'shop_photo_studio'], [feature = 'shop_photography'] { [zoom >= 17] { - marker-file: url('symbols/photo-14.svg'); + marker-file: url('symbols/shop/photo.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; @@ -810,21 +814,21 @@ } [feature = 'shop_shoes'][zoom >= 17] { - marker-file: url('symbols/shop_shoes.16.svg'); + marker-file: url('symbols/shop/shoes.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; } [feature = 'shop_gift'][zoom >= 17] { - marker-file: url('symbols/shop_gift.16.svg'); + marker-file: url('symbols/shop/gift.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; } [feature = 'shop_electronics'][zoom >= 17] { - marker-file: url('symbols/shop_electronics.16.svg'); + marker-file: url('symbols/shop/electronics.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; @@ -833,7 +837,7 @@ [feature = 'shop_alcohol'], [feature = 'shop_wine'] { [zoom >= 17] { - marker-file: url('symbols/shop_alcohol.16.svg'); + marker-file: url('symbols/shop/alcohol.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; @@ -841,42 +845,42 @@ } [feature = 'shop_optician'][zoom >= 17] { - marker-file: url('symbols/shop_optician.16.svg'); + marker-file: url('symbols/shop/optician.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; } [feature = 'shop_outdoor'][zoom >= 17] { - marker-file: url('symbols/outdoor-14.svg'); + marker-file: url('symbols/shop/outdoor.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; } [feature = 'shop_furniture'][zoom >= 17] { - marker-file: url('symbols/shop_furniture.16.svg'); + marker-file: url('symbols/shop/furniture.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; } [feature = 'shop_mobile_phone'][zoom >= 17] { - marker-file: url('symbols/shop_mobile_phone.16.svg'); + marker-file: url('symbols/shop/mobile_phone.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; } [feature = 'shop_motorcycle'][zoom >= 17] { - marker-file: url('symbols/motorcycle-14.svg'); + marker-file: url('symbols/motorcycle.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; } [feature = 'shop_musical_instrument'][zoom >= 17] { - marker-file: url('symbols/musical_instrument-14.svg'); + marker-file: url('symbols/shop/musical_instrument.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; @@ -885,7 +889,7 @@ [feature = 'shop_kiosk'], [feature = 'shop_newsagent'] { [zoom >= 17] { - marker-file: url('symbols/newsagent-14.svg'); + marker-file: url('symbols/shop/newsagent.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; @@ -895,7 +899,7 @@ [feature = 'shop_jewelry'], [feature = 'shop_jewellery'] { [zoom >= 17] { - marker-file: url('symbols/shop_jewelry.16.svg'); + marker-file: url('symbols/shop/jewelry.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; @@ -903,70 +907,70 @@ } [feature = 'shop_toys'][zoom >= 17] { - marker-file: url('symbols/toys-14.svg'); + marker-file: url('symbols/shop/toys.svg'); marker-fill: @shop-icon; marker-placement: interior; marker-clip: false; } [feature = 'shop_travel_agency'][zoom >= 17] { - marker-file: url('symbols/travel_agency-14.svg'); + marker-file: url('symbols/shop/travel_agency.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; } [feature = 'shop_sports'][zoom >= 17] { - marker-file: url('symbols/sports-14.svg'); + marker-file: url('symbols/shop/sports.svg'); marker-fill: @shop-icon; marker-placement: interior; marker-clip: false; } [feature = 'shop_stationery'][zoom >= 17] { - marker-file: url('symbols/stationery-14.svg'); + marker-file: url('symbols/shop/stationery.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; } [feature = 'shop_tobacco'][zoom >= 17] { - marker-file: url('symbols/tobacco-14.svg'); + marker-file: url('symbols/shop/tobacco.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; } [feature = 'shop_tea'][zoom >= 17] { - marker-file: url('symbols/tea-14.svg'); + marker-file: url('symbols/shop/tea.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; } [feature = 'shop_variety_store'][zoom >= 17] { - marker-file: url('symbols/variety_store-14.svg'); + marker-file: url('symbols/shop/variety_store.svg'); marker-placement: interior; marker-clip: false; marker-fill: @shop-icon; } [feature = 'leisure_water_park'][zoom >= 17] { - marker-file: url('symbols/water_park.16.svg'); + marker-file: url('symbols/water_park.svg'); marker-placement: interior; marker-fill: @amenity-brown; marker-clip: false; } [feature = 'leisure_dog_park'][zoom >= 17] { - marker-file: url('symbols/shop_pet.16.svg'); + marker-file: url('symbols/shop/pet.svg'); marker-placement: interior; marker-fill: @amenity-brown; marker-clip: false; } [feature = 'leisure_playground'][zoom >= 17] { - marker-file: url('symbols/playground.16.svg'); + marker-file: url('symbols/playground.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; @@ -986,14 +990,14 @@ } [feature = 'tourism_picnic_site'][zoom >= 16] { - marker-file: url('symbols/picnic.16.svg'); + marker-file: url('symbols/picnic.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; } [feature = 'leisure_picnic_table'][zoom >= 17] { - marker-file: url('symbols/picnic.16.svg'); + marker-file: url('symbols/picnic.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; @@ -1005,21 +1009,21 @@ } [feature = 'aeroway_helipad'][zoom >= 16] { - marker-file: url('symbols/helipad.svg'); + marker-file: url('symbols/helipad.16.svg'); marker-placement: interior; marker-clip: false; marker-fill: @airtransport; } [feature = 'aeroway_aerodrome'][zoom >= 10][zoom < 14] { - marker-file: url('symbols/aerodrome.svg'); + marker-file: url('symbols/aerodrome.12.svg'); marker-placement: interior; marker-clip: false; marker-fill: @airtransport; } [feature = 'man_made_lighthouse'][zoom >= 15] { - marker-file: url('symbols/lighthouse.16.svg'); + marker-file: url('symbols/lighthouse.svg'); marker-placement: interior; marker-clip: false; marker-fill: @transportation-icon; @@ -1047,7 +1051,7 @@ } [feature = 'natural_cave_entrance'][zoom >= 15] { - marker-file: url('symbols/cave.14.svg'); + marker-file: url('symbols/cave.svg'); marker-placement: interior; marker-clip: false; } @@ -1061,7 +1065,7 @@ [feature = 'power_generator']['generator:source' = 'wind'], [feature = 'power_generator'][power_source = 'wind'] { [zoom >= 15] { - marker-file: url('symbols/power_wind-16.svg'); + marker-file: url('symbols/power_wind.svg'); marker-placement: interior; marker-fill: black; marker-clip: false; @@ -1069,14 +1073,14 @@ } [feature = 'man_made_windmill'][zoom >= 16] { - marker-file: url('symbols/windmill.16.svg'); + marker-file: url('symbols/windmill.svg'); marker-placement: interior; marker-fill: @amenity-brown; marker-clip: false; } [feature = 'amenity_hunting_stand'][zoom >= 16] { - marker-file: url('symbols/hunting-stand.16.svg'); + marker-file: url('symbols/hunting_stand.svg'); marker-fill: @man-made-icon; marker-placement: interior; marker-clip: false; @@ -1099,10 +1103,10 @@ marker-file: url('symbols/parking.svg'); } [feature = 'amenity_bicycle_parking'] { - marker-file: url('symbols/bicycle_parking.16.svg'); + marker-file: url('symbols/bicycle_parking.svg'); } [feature = 'amenity_motorcycle_parking'] { - marker-file: url('symbols/motorcycle_parking.16.svg'); + marker-file: url('symbols/motorcycle_parking.svg'); } marker-placement: interior; marker-clip: false; @@ -1158,7 +1162,7 @@ } [feature = 'amenity_bench'][zoom >= 19]::amenity { - marker-file: url('symbols/bench.16.svg'); + marker-file: url('symbols/bench.svg'); marker-fill: @amenity-brown; marker-placement: interior; } @@ -1741,6 +1745,7 @@ [feature = 'tourism_hostel'][zoom >= 17], [feature = 'tourism_chalet'][zoom >= 17], [feature = 'tourism_guest_house'][zoom >= 17], + [feature = 'tourism_wilderness_hut'][zoom >= 14], [feature = 'tourism_camp_site'][zoom >= 17] { text-name: "[name]"; text-size: @standard-text-size; @@ -1972,7 +1977,8 @@ [feature = 'shop_variety_store'], [feature = 'shop_wine'], [feature = 'shop_other']{ - [zoom >= 17] { + [way_pixels > 3000][zoom >= 17], + [zoom >= 18] { text-name: "[name]"; text-size: @standard-text-size; text-dy: 12; @@ -2256,4 +2262,3 @@ } } } - diff --git a/buildings.mss b/buildings.mss index 482633fc5f..721e74d509 100644 --- a/buildings.mss +++ b/buildings.mss @@ -33,7 +33,8 @@ line-color: @building-aeroway-line; } } - [amenity = 'place_of_worship'] { + [amenity = 'place_of_worship'], + [building = 'train_station'] { polygon-fill: @building-major-fill; polygon-clip: false; [zoom >= 15] { diff --git a/get-shapefiles.sh b/get-shapefiles.sh deleted file mode 100755 index b6fe4cb206..0000000000 --- a/get-shapefiles.sh +++ /dev/null @@ -1,101 +0,0 @@ -#!/bin/sh -set -e -u - -UNZIP_OPTS=-qqun - -# check essential applications -exists() -{ - command -v "$1" >/dev/null 2>&1 -} - -for application in curl tar unzip; do - if exists $application; then - echo $application 'detected...' - else - echo 'ERROR:' $application 'not detected, you need to install it first!' - exit 1 - fi -done - -# create and populate data dir -mkdir -p data/ -mkdir -p data/world_boundaries -mkdir -p data/simplified-land-polygons-complete-3857 -mkdir -p data/ne_110m_admin_0_boundary_lines_land -mkdir -p data/land-polygons-split-3857 - -# world_boundaries -echo "downloading world_boundaries..." -curl -z "data/world_boundaries-spherical.tgz" -L -o "data/world_boundaries-spherical.tgz" "http://planet.openstreetmap.org/historical-shapefiles/world_boundaries-spherical.tgz" -echo "expanding world_boundaries..." -tar -xzf data/world_boundaries-spherical.tgz -C data/ - -# simplified-land-polygons-complete-3857 -echo "downloading simplified-land-polygons-complete-3857..." -curl -z "data/simplified-land-polygons-complete-3857.zip" -L -o "data/simplified-land-polygons-complete-3857.zip" "http://data.openstreetmapdata.com/simplified-land-polygons-complete-3857.zip" -echo "simplified-land-polygons-complete-3857..." -unzip $UNZIP_OPTS data/simplified-land-polygons-complete-3857.zip \ - simplified-land-polygons-complete-3857/simplified_land_polygons.shp \ - simplified-land-polygons-complete-3857/simplified_land_polygons.shx \ - simplified-land-polygons-complete-3857/simplified_land_polygons.prj \ - simplified-land-polygons-complete-3857/simplified_land_polygons.dbf \ - simplified-land-polygons-complete-3857/simplified_land_polygons.cpg \ - -d data/ - -# ne_110m_admin_0_boundary_lines_land -echo "downloading ne_110m_admin_0_boundary_lines_land..." -curl -z data/ne_110m_admin_0_boundary_lines_land.zip -L -o data/ne_110m_admin_0_boundary_lines_land.zip http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_boundary_lines_land.zip -echo "expanding ne_110m_admin_0_boundary_lines_land..." -unzip $UNZIP_OPTS data/ne_110m_admin_0_boundary_lines_land.zip \ - ne_110m_admin_0_boundary_lines_land.shp \ - ne_110m_admin_0_boundary_lines_land.shx \ - ne_110m_admin_0_boundary_lines_land.prj \ - ne_110m_admin_0_boundary_lines_land.dbf \ - -d data/ne_110m_admin_0_boundary_lines_land/ - -# land-polygons-split-3857 -echo "downloading land-polygons-split-3857..." -curl -z "data/land-polygons-split-3857.zip" -L -o "data/land-polygons-split-3857.zip" "http://data.openstreetmapdata.com/land-polygons-split-3857.zip" -echo "expanding land-polygons-split-3857..." -unzip $UNZIP_OPTS data/land-polygons-split-3857.zip \ - land-polygons-split-3857/land_polygons.shp \ - land-polygons-split-3857/land_polygons.shx \ - land-polygons-split-3857/land_polygons.prj \ - land-polygons-split-3857/land_polygons.dbf \ - land-polygons-split-3857/land_polygons.cpg \ - -d data/ - -# antarctica-icesheet-polygons-3857 -echo "downloading antarctica-icesheet-polygons-3857..." -curl -z "data/antarctica-icesheet-polygons-3857.zip" -L -o "data/antarctica-icesheet-polygons-3857.zip" "http://data.openstreetmapdata.com/antarctica-icesheet-polygons-3857.zip" -echo "expanding antarctica-icesheet-polygons-3857..." -unzip $UNZIP_OPTS data/antarctica-icesheet-polygons-3857.zip \ - antarctica-icesheet-polygons-3857/icesheet_polygons.shp \ - antarctica-icesheet-polygons-3857/icesheet_polygons.shx \ - antarctica-icesheet-polygons-3857/icesheet_polygons.prj \ - antarctica-icesheet-polygons-3857/icesheet_polygons.dbf \ - -d data/ - -# antarctica-icesheet-outlines-3857 -echo "downloading antarctica-icesheet-outlines-3857..." -curl -z "data/antarctica-icesheet-outlines-3857.zip" -L -o "data/antarctica-icesheet-outlines-3857.zip" "http://data.openstreetmapdata.com/antarctica-icesheet-outlines-3857.zip" -echo "expanding antarctica-icesheet-outlines-3857..." -unzip $UNZIP_OPTS data/antarctica-icesheet-outlines-3857.zip \ - antarctica-icesheet-outlines-3857/icesheet_outlines.shp \ - antarctica-icesheet-outlines-3857/icesheet_outlines.shx \ - antarctica-icesheet-outlines-3857/icesheet_outlines.prj \ - antarctica-icesheet-outlines-3857/icesheet_outlines.dbf \ - -d data/ - -#index -echo "indexing shapefiles" -shapeindex --shape_files \ -data/simplified-land-polygons-complete-3857/simplified_land_polygons.shp \ -data/land-polygons-split-3857/land_polygons.shp \ -data/antarctica-icesheet-polygons-3857/icesheet_polygons.shp \ -data/antarctica-icesheet-outlines-3857/icesheet_outlines.shp \ -data/ne_110m_admin_0_boundary_lines_land/ne_110m_admin_0_boundary_lines_land.shp - -#finish -echo "...done!" diff --git a/landcover.mss b/landcover.mss index bd83fea3e5..e69a04cf5d 100644 --- a/landcover.mss +++ b/landcover.mss @@ -7,55 +7,57 @@ @park: #c8facc; // Lch(94,30,145) also recreation_ground @orchard: #aedfa3; -// --- "base" landuses --- +// --- "Base" landuses --- @residential: #e0dfdf; // Lch(89,0,0) -@residential-line: #B9B9B9; // Lch(75,0,0) -@retail: #FFD6D1; // Lch(89,16,30) -@retail-line: #D99C95; // Lch(70,25,30) -@commercial: #F2DAD9; // Lch(89,8.5,25) -@commercial-line: #D1B2B0; // Lch(75,12,25) -@industrial: #EBDBE8; // Lch(89,9,330) -@industrial-line: #C6B3C3; // Lch(75,11,330) -@railway: @industrial; -@railway-line: @industrial-line; +@residential-line: #b9b9b9; // Lch(75,0,0) +@retail: #ffd6d1; // Lch(89,16,30) +@retail-line: #d99c95; // Lch(70,25,30) +@commercial: #f2dad9; // Lch(89,8.5,25) +@commercial-line: #d1b2b0; // Lch(75,12,25) +@industrial: #ebdbe8; // Lch(89,9,330) (Also used for railway) +@industrial-line: #c6b3c3; // Lch(75,11,330) (Also used for railway-line) @farmland: #fbecd7; // Lch(94,12,80) (Also used for farm) @farmland-line: #d6c4ab; // Lch(80,15,80) - @farmyard: #f5dcba; // Lch(89,20,80) -@farmyard-line: #D1B48C; // Lch(75,25,80) +@farmyard-line: #d1b48c; // Lch(75,25,80) -// --- Other ---- +// --- Transport ---- @aerodrome: #e9e7e2; -@allotments: #eecfb3; // Lch(85,19,70) @apron: #e9d1ff; +@garages: #dfddce; +@parking: #f7efb7; +@railway: @industrial; +@railway-line: @industrial-line; +@rest_area: #efc8c8; // also services +@station: #d4aaaa; + +// --- Other ---- + +@allotments: #eecfb3; // Lch(85,19,70) @bare_ground: #eee5dc; @campsite: #def6c0; // also caravan_site, picnic_site @cemetery: #aacbaf; // also grave_yard @construction: #c7c7b4; // also brownfield @danger_area: pink; -@garages: #dfddce; @heath: #d6d99f; @mud: rgba(203,177,154,0.3); // produces #e6dcd1 over @land -@parking: #f7efb7; @place_of_worship: #cdccc9; @place_of_worship_outline: #111; @playground: lighten(@park, 5%); @power: darken(@industrial, 5%); @power-line: darken(@industrial-line, 5%); -@rest_area: #efc8c8; // also services @sand: #f5e9c6; @societal_amenities: #f0f0d8; -@station: #d4aaaa; @tourism: #734a08; @quarry: #c5c3c3; @military: #f55; @beach: #fff1ba; -// --- sports --- +// --- Sports --- -@pitch: #80d7b5; +@pitch: #aae0cb; // also track @track: @pitch; @stadium: @societal_amenities; // also sports_centre @golf_course: #b5e3b5; @@ -426,17 +428,10 @@ [way_pixels >= 64] { polygon-gamma: 0.3; } } - [feature = 'natural_scrub'] { - [zoom >= 10] { - polygon-fill: @scrub; - [way_pixels >= 4] { polygon-gamma: 0.75; } - [way_pixels >= 64] { polygon-gamma: 0.3; } - } - [zoom >= 14] { - polygon-pattern-file: url('symbols/scrub.png'); - [way_pixels >= 4] { polygon-pattern-gamma: 0.75; } - [way_pixels >= 64] { polygon-pattern-gamma: 0.3; } - } + [feature = 'natural_scrub'][zoom >= 10] { + polygon-fill: @scrub; + [way_pixels >= 4] { polygon-gamma: 0.75; } + [way_pixels >= 64] { polygon-gamma: 0.3; } } [feature = 'wetland_swamp'][zoom >= 8] { @@ -625,7 +620,12 @@ polygon-pattern-alignment: global; } } + [natural = 'scrub'] { + polygon-pattern-file: url('symbols/scrub.png'); + polygon-pattern-alignment: global; + } } + //Also landuse = forest, converted in the SQL [natural = 'wood'][zoom >= 13]::wood { polygon-pattern-file: url('symbols/forest.png'); // Lch(55,30,135) diff --git a/placenames.mss b/placenames.mss index 1decda5110..d381759a1e 100644 --- a/placenames.mss +++ b/placenames.mss @@ -62,8 +62,6 @@ shield-face-name: @book-fonts; shield-fill: @placenames; shield-size: 11; - shield-margin: 5; - shield-avoid-edges: true; shield-wrap-width: 30; shield-halo-fill: @standard-halo-fill; shield-halo-radius: @standard-halo-radius * 1.5; @@ -92,7 +90,6 @@ text-face-name: @book-fonts; text-fill: @placenames; text-size: 13; - text-margin: 6; text-wrap-width: 60; text-halo-fill: @standard-halo-fill; text-halo-radius: @standard-halo-radius * 1.5; @@ -115,8 +112,6 @@ shield-face-name: @book-fonts; shield-fill: @placenames; shield-size: 11; - shield-margin: 5; - shield-avoid-edges: true; shield-wrap-width: 30; shield-halo-fill: @standard-halo-fill; shield-halo-radius: @standard-halo-radius * 1.5; @@ -147,7 +142,6 @@ text-face-name: @book-fonts; text-fill: @placenames; text-size: 13; - text-margin: 6; text-wrap-width: 60; text-halo-fill: @standard-halo-fill; text-halo-radius: @standard-halo-radius * 1.5; @@ -174,8 +168,6 @@ shield-halo-fill: @standard-halo-fill; shield-halo-radius: @standard-halo-radius * 1.5; shield-wrap-width: 30; - shield-margin: 5; - shield-avoid-edges: true; shield-placement-type: simple; shield-placements: 'S,N,E,W'; [dir = 1] { @@ -194,7 +186,6 @@ text-halo-fill: @standard-halo-fill; text-halo-radius: @standard-halo-radius * 1.5; text-wrap-width: 60; - text-margin: 6; [zoom >= 9] { text-size: 12; text-wrap-width: 60; @@ -221,7 +212,6 @@ text-halo-fill: @standard-halo-fill; text-halo-radius: @standard-halo-radius * 1.5; text-wrap-width: 45; - text-margin: 6; [zoom >= 11] { text-size: 11; text-wrap-width: 55; diff --git a/preview.png b/preview.png index d9b2fd1049..4566c4c167 100644 Binary files a/preview.png and b/preview.png differ diff --git a/project.mml b/project.mml index fffc90702c..0ea237b500 100644 --- a/project.mml +++ b/project.mml @@ -1,2112 +1,2522 @@ -{ - "interactivity": false, - "Layer": [ - { - "name": "world", - "srs-name": "900913", - "geometry": "polygon", - "class": "", - "id": "world", - "srs": "+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", - "Datasource": { - "type": "shape", - "file": "data/simplified-land-polygons-complete-3857/simplified_land_polygons.shp" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "maxzoom": 9 - }, - "advanced": {} - }, - { - "name": "coast-poly", - "srs-name": "900913", - "geometry": "polygon", - "class": "", - "id": "coast-poly", - "srs": "+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", - "Datasource": { - "type": "shape", - "file": "data/land-polygons-split-3857/land_polygons.shp" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 10 - }, - "advanced": {} - }, - { - "name": "builtup", - "srs-name": "mercator", - "geometry": "polygon", - "class": "", - "id": "builtup", - "srs": "+proj=merc +datum=WGS84 +over", - "Datasource": { - "type": "shape", - "file": "data/world_boundaries/builtup_area.shp" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "maxzoom": 9, - "minzoom": 8 - }, - "advanced": {} - }, - { - "name": "necountries", - "srs-name": "WGS84", - "geometry": "linestring", - "class": "", - "id": "necountries", - "srs": "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs", - "Datasource": { - "type": "shape", - "file": "data/ne_110m_admin_0_boundary_lines_land/ne_110m_admin_0_boundary_lines_land.shp" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "maxzoom": 3, - "minzoom": 1 - }, - "advanced": {} - }, - { - "name": "landcover-low-zoom", - "srs-name": "900913", - "geometry": "polygon", - "class": "", - "id": "landcover-low-zoom", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way, name, way_pixels,\n COALESCE(wetland, landuse, \"natural\") AS feature\n FROM (SELECT\n way, COALESCE(name, '') AS name,\n ('landuse_' || (CASE WHEN landuse IN ('forest', 'military') THEN landuse ELSE NULL END)) AS landuse,\n ('natural_' || (CASE WHEN \"natural\" IN ('wood', 'sand', 'scree', 'shingle', 'bare_rock') THEN \"natural\" ELSE NULL END)) AS \"natural\",\n ('wetland_' || (CASE WHEN \"natural\" IN ('wetland', 'mud') THEN (CASE WHEN \"natural\" IN ('mud') THEN \"natural\" ELSE wetland END) ELSE NULL END)) AS wetland,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels\n FROM planet_osm_polygon\n WHERE (landuse IN ('forest', 'military')\n OR \"natural\" IN ('wood', 'wetland', 'mud', 'sand', 'scree', 'shingle', 'bare_rock'))\n AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real\n AND building IS NULL\n ORDER BY CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END, way_area DESC\n ) AS features\n) AS landcover_low_zoom", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "maxzoom": 9, - "minzoom": 7 - }, - "advanced": {} - }, - { - "name": "landcover", - "srs-name": "900913", - "geometry": "polygon", - "class": "", - "id": "landcover", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way, name, religion, way_pixels,\n COALESCE(aeroway, amenity, wetland, power, landuse, leisure, military, \"natural\", tourism, highway, railway) AS feature\n FROM (SELECT\n way, COALESCE(name, '') AS name,\n ('aeroway_' || (CASE WHEN aeroway IN ('apron', 'aerodrome') THEN aeroway ELSE NULL END)) AS aeroway,\n ('amenity_' || (CASE WHEN amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking', 'university', 'college', 'school', \n 'hospital', 'kindergarten', 'grave_yard', 'prison', 'place_of_worship', 'clinic') \n THEN amenity ELSE NULL END)) AS amenity,\n ('landuse_' || (CASE WHEN landuse IN ('quarry', 'vineyard', 'orchard', 'cemetery', 'residential', 'garages', 'meadow', 'grass', \n 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'greenhouse_horticulture', \n 'recreation_ground', 'village_green', 'retail', 'industrial', 'railway', 'commercial', \n 'brownfield', 'landfill', 'construction') THEN landuse ELSE NULL END)) AS landuse,\n ('leisure_' || (CASE WHEN leisure IN ('swimming_pool', 'playground', 'park', 'recreation_ground', 'common', 'garden', \n 'golf_course', 'miniature_golf', 'picnic_table', 'sports_centre', 'stadium', 'pitch', \n 'track', 'dog_park') THEN leisure ELSE NULL END)) AS leisure,\n ('military_' || (CASE WHEN military IN ('danger_area') THEN military ELSE NULL END)) AS military,\n ('natural_' || (CASE WHEN \"natural\" IN ('beach', 'shoal', 'heath', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub') THEN \"natural\" ELSE NULL END)) AS \"natural\",\n ('wetland_' || (CASE WHEN \"natural\" IN ('wetland', 'marsh', 'mud') THEN (CASE WHEN \"natural\" IN ('marsh', 'mud') THEN \"natural\" ELSE wetland END) ELSE NULL END)) AS wetland,\n ('power_' || (CASE WHEN power IN ('station', 'sub_station', 'substation', 'generator') THEN power ELSE NULL END)) AS power,\n ('tourism_' || (CASE WHEN tourism IN ('attraction', 'camp_site', 'caravan_site', 'picnic_site') THEN tourism ELSE NULL END)) AS tourism,\n ('highway_' || (CASE WHEN highway IN ('services', 'rest_area') THEN highway ELSE NULL END)) AS highway,\n ('railway_' || (CASE WHEN railway = 'station' THEN railway ELSE NULL END)) AS railway,\n CASE WHEN religion IN ('christian', 'jewish') THEN religion ELSE 'INT-generic'::text END AS religion,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels\n FROM planet_osm_polygon\n WHERE (landuse IS NOT NULL\n OR leisure IS NOT NULL\n OR aeroway IN ('apron', 'aerodrome')\n OR amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking', 'university', 'college', 'school', 'hospital', 'kindergarten', \n 'grave_yard', 'place_of_worship', 'prison', 'clinic')\n OR military IN ('danger_area')\n OR \"natural\" IN ('beach', 'shoal', 'heath', 'mud', 'marsh', 'wetland', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub')\n OR power IN ('station', 'sub_station', 'substation', 'generator')\n OR tourism IN ('attraction', 'camp_site', 'caravan_site', 'picnic_site')\n OR highway IN ('services', 'rest_area')\n OR railway = 'station')\n AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real\n ORDER BY CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END, way_area DESC\n ) AS landcover\n) AS features", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 10 - }, - "advanced": {} - }, - { - "name": "landcover-line", - "srs-name": "900913", - "geometry": "linestring", - "class": "", - "id": "landcover-line", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way\n FROM planet_osm_line\n WHERE man_made = 'cutline'\n) AS landcover_line", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 14 - }, - "advanced": {} - }, - { - "name": "water-lines-casing", - "srs-name": "900913", - "geometry": "linestring", - "class": "", - "id": "water-lines-casing", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way, waterway, intermittent,\n CASE WHEN tunnel IN ('yes', 'culvert') THEN 'yes' ELSE 'no' END AS int_tunnel\n FROM planet_osm_line\n WHERE waterway IN ('stream', 'drain', 'ditch')\n) AS water_lines_casing", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 13 - }, - "advanced": {} - }, - { - "name": "water-lines-low-zoom", - "srs-name": "900913", - "geometry": "linestring", - "class": "", - "id": "water-lines-low-zoom", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n waterway,\n intermittent\n FROM planet_osm_line\n WHERE waterway = 'river'\n) AS water_lines_low_zoom", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "maxzoom": 11, - "minzoom": 8 - }, - "advanced": {} - }, - { - "name": "icesheet-poly", - "srs-name": "900913", - "geometry": "polygon", - "class": "", - "id": "icesheet-poly", - "srs": "+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", - "Datasource": { - "type": "shape", - "file": "data/antarctica-icesheet-polygons-3857/icesheet_polygons.shp" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 4 - }, - "advanced": {} - }, - { - "name": "water-areas", - "srs-name": "900913", - "geometry": "polygon", - "class": "", - "id": "water-areas", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n \"natural\",\n waterway,\n landuse,\n name,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels\n FROM planet_osm_polygon\n WHERE\n (waterway IN ('dock', 'riverbank', 'canal')\n OR landuse IN ('reservoir', 'basin')\n OR \"natural\" IN ('water', 'glacier'))\n AND building IS NULL\n AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real\n ORDER BY z_order, way_area DESC\n) AS water_areas", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 4 - }, - "advanced": {} - }, - { - "name": "landcover-area-symbols", - "srs-name": "900913", - "geometry": "polygon", - "class": "", - "id": "landcover-area-symbols", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way, surface, \n COALESCE(CASE WHEN landuse = 'forest' THEN 'wood' ELSE NULL END, \"natural\") AS \"natural\",\n CASE WHEN \"natural\" IN ('marsh', 'mud') \n THEN \"natural\" \n ELSE CASE WHEN (\"natural\" = 'wetland' AND wetland IS NULL) \n THEN 'wetland' \n ELSE CASE WHEN (\"natural\" = 'wetland')\n THEN wetland\n ELSE NULL\n END \n END\n END AS int_wetland\n FROM planet_osm_polygon\n WHERE (\"natural\" IN ('marsh', 'mud', 'wetland', 'wood', 'beach', 'shoal', 'reef') OR landuse = 'forest')\n AND building IS NULL\n AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real\n ORDER BY z_order, way_area DESC\n) AS landcover_area_symbols", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 10 - }, - "advanced": {} - }, - { - "name": "icesheet-outlines", - "srs-name": "900913", - "geometry": "linestring", - "class": "", - "id": "icesheet-outlines", - "srs": "+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", - "Datasource": { - "type": "shape", - "file": "data/antarctica-icesheet-outlines-3857/icesheet_outlines.shp" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 4 - }, - "advanced": {} - }, - { - "name": "water-lines", - "srs-name": "900913", - "geometry": "linestring", - "class": "water-lines", - "id": "water-lines", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way, waterway, name, intermittent,\n CASE WHEN tunnel IN ('yes', 'culvert') THEN 'yes' ELSE 'no' END AS int_tunnel,\n 'no' AS bridge\n FROM planet_osm_line\n WHERE waterway IN ('river', 'canal', 'derelict_canal', 'stream', 'drain', 'ditch', 'wadi')\n AND (bridge IS NULL OR bridge NOT IN ('yes', 'aqueduct'))\n ORDER BY z_order\n) AS water_lines", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 12 - }, - "advanced": {} - }, - { - "name": "water-barriers-line", - "srs-name": "900913", - "geometry": "linestring", - "class": "", - "id": "water-barriers-line", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n waterway,\n name\n FROM planet_osm_line\n WHERE waterway IN ('dam', 'weir', 'lock_gate')\n) AS water_barriers_line", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 13 - }, - "advanced": {} - }, - { - "name": "water-barriers-poly", - "srs-name": "900913", - "geometry": "polygon", - "class": "", - "id": "water-barriers-poly", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n waterway,\n name\n FROM planet_osm_polygon\n WHERE waterway IN ('dam', 'weir', 'lock_gate')\n) AS water_barriers_poly", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 13 - }, - "advanced": {} - }, - { - "name": "marinas-area", - "srs-name": "900913", - "geometry": "polygon", - "class": "", - "id": "marinas-area", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way\n FROM planet_osm_polygon\n WHERE leisure = 'marina'\n) AS marinas_area", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 14 - }, - "advanced": {} - }, - { - "name": "piers-poly", - "srs-name": "900913", - "geometry": "polygon", - "class": "", - "id": "piers-poly", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way, man_made\n FROM planet_osm_polygon\n WHERE man_made IN ('pier', 'breakwater', 'groyne')\n) AS piers_poly", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 12 - }, - "advanced": {} - }, - { - "name": "piers-line", - "srs-name": "900913", - "geometry": "linestring", - "class": "", - "id": "piers-line", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way, man_made\n FROM planet_osm_line\n WHERE man_made IN ('pier', 'breakwater', 'groyne')\n) AS piers_line", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 12 - }, - "advanced": {} - }, - { - "name": "water-barriers-point", - "srs-name": "900913", - "geometry": "point", - "class": "", - "id": "water-barriers-point", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way, waterway\n FROM planet_osm_point\n WHERE waterway IN ('dam', 'weir', 'lock_gate')\n) AS water_barriers_points", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 17 - }, - "advanced": {} - }, - { - "name": "bridge", - "srs-name": "900913", - "geometry": "polygon", - "class": "", - "id": "bridge", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels,\n man_made,\n name\n FROM planet_osm_polygon\n WHERE man_made = 'bridge'\n) AS bridge", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 12 - }, - "advanced": {} - }, - { - "name": "buildings", - "srs-name": "900913", - "geometry": "polygon", - "class": "", - "id": "buildings", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n building\n FROM planet_osm_polygon\n WHERE building IS NOT NULL\n AND building != 'no'\n AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real\n ORDER BY z_order, way_area DESC\n) AS buildings", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 13 - }, - "advanced": {} - }, - { - "name": "buildings-major", - "srs-name": "900913", - "geometry": "polygon", - "class": "", - "id": "buildings-major", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n building,\n amenity,\n aeroway\n FROM planet_osm_polygon\n WHERE building IS NOT NULL\n AND building != 'no'\n AND (aeroway = 'terminal' OR amenity = 'place_of_worship')\n AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real\n ORDER BY z_order, way_area DESC)\nAS buildings_major", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 13 - }, - "advanced": {} - }, - { - "name": "tunnels", - "srs-name": "900913", - "geometry": "linestring", - "class": "tunnels-fill tunnels-casing access", - "id": "tunnels", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n (CASE WHEN substr(feature, length(feature)-3, 4) = 'link' THEN substr(feature, 0, length(feature)-4) ELSE feature END) AS feature,\n horse,\n foot,\n bicycle,\n tracktype,\n int_surface,\n access,\n construction,\n service,\n link,\n layernotnull\n FROM ( -- subselect that contains both roads and rail/aero\n SELECT\n way,\n ('highway_' || highway) AS feature, --only motorway to tertiary links are accepted later on\n horse,\n foot,\n bicycle,\n tracktype,\n CASE WHEN surface IN ('unpaved', 'compacted', 'dirt', 'earth', 'fine_gravel', 'grass', 'grass_paver', 'gravel', 'ground',\n 'mud', 'pebblestone', 'salt', 'sand', 'woodchips', 'clay') THEN 'unpaved'\n WHEN surface IN ('paved', 'asphalt', 'cobblestone', 'cobblestone:flattened', 'sett', 'concrete', 'concrete:lanes',\n 'concrete:plates', 'paving_stones', 'metal', 'wood') THEN 'paved'\n ELSE NULL\n END AS int_surface,\n CASE WHEN access IN ('destination') THEN 'destination'::text\n WHEN access IN ('no', 'private') THEN 'no'::text\n ELSE NULL\n END AS access,\n construction,\n CASE\n WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text\n ELSE 'INT-normal'::text\n END AS service,\n CASE\n WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes'\n ELSE 'no'\n END AS link,\n CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull\n FROM planet_osm_line\n WHERE (tunnel = 'yes' OR tunnel = 'building_passage' OR covered = 'yes')\n AND highway IS NOT NULL -- end of road select\n UNION ALL\n SELECT\n way,\n COALESCE(\n ('railway_' || (CASE WHEN railway = 'preserved' AND service IN ('spur', 'siding', 'yard') THEN 'INT-preserved-ssy'::text \n WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' \n WHEN (railway = 'tram' AND service IN ('spur', 'siding', 'yard')) THEN 'tram-service' ELSE railway END)),\n ('aeroway_' || aeroway)\n ) AS feature,\n horse,\n foot,\n bicycle,\n tracktype,\n 'null',\n CASE\n WHEN access IN ('destination') THEN 'destination'::text\n WHEN access IN ('no', 'private') THEN 'no'::text\n ELSE NULL\n END AS access,\n construction,\n CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service,\n 'no' AS link,\n CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull\n FROM planet_osm_line\n WHERE (tunnel = 'yes' OR tunnel = 'building_passage' OR covered = 'yes')\n AND (railway IS NOT NULL OR aeroway IS NOT NULL) -- end of rail/aero select\n ) AS features\n JOIN (VALUES -- this join is also putting a condition on what is selected. features not matching it do not make it into the results.\n ('railway_rail', 440),\n ('railway_INT-preserved-ssy', 430),\n ('railway_INT-spur-siding-yard', 430),\n ('railway_subway', 420),\n ('railway_narrow_gauge', 420),\n ('railway_light_rail', 420),\n ('railway_preserved', 420),\n ('railway_funicular', 420),\n ('railway_monorail', 420),\n ('railway_miniature', 420),\n ('railway_turntable', 420),\n ('railway_tram', 410),\n ('railway_tram-service', 405),\n ('railway_disused', 400),\n ('railway_construction', 400),\n ('highway_motorway', 380),\n ('highway_trunk', 370),\n ('highway_primary', 360),\n ('highway_secondary', 350),\n ('highway_tertiary', 340),\n ('highway_residential', 330),\n ('highway_unclassified', 330),\n ('highway_road', 330),\n ('highway_living_street', 320),\n ('highway_pedestrian', 310),\n ('highway_raceway', 300),\n ('highway_motorway_link', 240),\n ('highway_trunk_link', 230),\n ('highway_primary_link', 220),\n ('highway_secondary_link', 210),\n ('highway_tertiary_link', 200),\n ('highway_service', 150),\n ('highway_track', 110),\n ('highway_path', 100),\n ('highway_footway', 100),\n ('highway_bridleway', 100),\n ('highway_cycleway', 100),\n ('highway_steps', 100),\n ('highway_platform', 90),\n ('railway_platform', 90),\n ('aeroway_runway', 60),\n ('aeroway_taxiway', 50),\n ('highway_construction', 10)\n ) AS ordertable (feature, prio)\n USING (feature)\n ORDER BY\n layernotnull,\n prio,\n CASE WHEN access IN ('no', 'private') THEN 0 WHEN access IN ('destination') THEN 1 ELSE 2 END,\n CASE WHEN int_surface IN ('unpaved') THEN 0 ELSE 2 END\n) AS tunnels", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "group-by": "layernotnull", - "minzoom": 9 - }, - "advanced": {} - }, - { - "name": "landuse-overlay", - "srs-name": "900913", - "geometry": "polygon", - "class": "", - "id": "landuse-overlay", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n landuse,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels\n FROM planet_osm_polygon\n WHERE landuse = 'military'\n AND building IS NULL\n) AS landuse_overlay", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 7 - }, - "advanced": {} - }, - { - "name": "line-barriers", - "srs-name": "900913", - "geometry": "linestring", - "class": "barriers", - "id": "line-barriers", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way, COALESCE(historic, barrier) AS feature\n FROM (SELECT way,\n ('barrier_' || (CASE WHEN barrier IN ('chain', 'city_wall', 'embankment', 'ditch', 'fence', 'guard_rail',\n 'handrail', 'hedge', 'kerb', 'retaining_wall', 'wall') THEN barrier ELSE NULL END)) AS barrier,\n ('historic_' || (CASE WHEN historic = 'citywalls' THEN historic ELSE NULL END)) AS historic\n FROM planet_osm_line\n WHERE barrier IN ('chain', 'city_wall', 'embankment', 'ditch', 'fence', 'guard_rail',\n 'handrail', 'hedge', 'kerb', 'retaining_wall', 'wall')\n OR historic = 'city_wall'\n AND (waterway IS NULL OR waterway NOT IN ('river', 'canal', 'derelict_canal', 'stream', 'drain', 'ditch', 'wadi'))\n ) AS features\n) AS line_barriers", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 14 - }, - "advanced": {} - }, - { - "name": "cliffs", - "srs-name": "900913", - "geometry": "linestring", - "class": "", - "id": "cliffs", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way, \"natural\", man_made\n FROM planet_osm_line\n WHERE \"natural\" = 'cliff' OR man_made = 'embankment'\n) AS cliffs", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 13 - }, - "advanced": {} - }, - { - "name": "area-barriers", - "srs-name": "900913", - "geometry": "polygon", - "class": "barriers", - "id": "area-barriers", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way, barrier AS feature\n FROM (SELECT way,\n ('barrier_' || barrier) AS barrier\n FROM planet_osm_polygon\n WHERE barrier IS NOT NULL\n ) AS features\n) AS area_barriers", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 16 - }, - "advanced": {} - }, - { - "name": "ferry-routes", - "srs-name": "900913", - "geometry": "linestring", - "class": "", - "id": "ferry-routes", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way\n FROM planet_osm_line\n WHERE route = 'ferry'\n) AS ferry_routes", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 7 - }, - "advanced": {} - }, - { - "name": "turning-circle-casing", - "srs-name": "900913", - "geometry": "point", - "class": "", - "id": "turning-circle-casing", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT DISTINCT ON (p.way)\n p.way AS way, l.highway AS int_tc_type,\n CASE WHEN l.service IN ('parking_aisle', 'drive-through', 'driveway')\n THEN 'INT-minor'::text\n ELSE 'INT-normal'::text\n END AS int_tc_service\n FROM planet_osm_point p\n JOIN planet_osm_line l ON ST_DWithin(p.way, l.way, 0.1) -- Assumes Mercator\n JOIN (VALUES\n ('tertiary', 1),\n ('unclassified', 2),\n ('residential', 3),\n ('living_street', 4),\n ('service', 5)\n ) AS v (highway, prio)\n ON v.highway=l.highway\n WHERE p.highway = 'turning_circle'\n OR p.highway = 'turning_loop'\n ORDER BY p.way, v.prio\n) AS turning_circle_casing", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 15 - }, - "advanced": {} - }, - { - "name": "highway-area-casing", - "srs-name": "900913", - "geometry": "polygon", - "class": "", - "id": "highway-area-casing", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n COALESCE((\n 'highway_' || (CASE WHEN highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'cycleway', 'track', 'path', 'platform') THEN highway ELSE NULL END)),\n ('railway_' || (CASE WHEN railway IN ('platform') THEN railway ELSE NULL END))\n ) AS feature\n FROM planet_osm_polygon\n WHERE highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'track', 'path', 'platform')\n OR railway IN ('platform')\n ORDER BY z_order, way_area DESC\n) AS highway_area_casing", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 14 - }, - "advanced": {} - }, - { - "name": "roads-casing", - "srs-name": "900913", - "geometry": "linestring", - "class": "roads-casing", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n (CASE WHEN substr(feature, length(feature)-3, 4) = 'link' THEN substr(feature, 0, length(feature)-4) ELSE feature END) AS feature,\n horse,\n foot,\n bicycle,\n tracktype,\n int_surface,\n access,\n construction,\n service,\n link,\n layernotnull\n FROM ( -- subselect that contains both roads and rail/aero\n SELECT\n way,\n ('highway_' || highway) AS feature, --only motorway to tertiary links are accepted later on\n horse,\n foot,\n bicycle,\n tracktype,\n CASE WHEN surface IN ('unpaved', 'compacted', 'dirt', 'earth', 'fine_gravel', 'grass', 'grass_paver', 'gravel', 'ground',\n 'mud', 'pebblestone', 'salt', 'sand', 'woodchips', 'clay') THEN 'unpaved'\n WHEN surface IN ('paved', 'asphalt', 'cobblestone', 'cobblestone:flattened', 'sett', 'concrete', 'concrete:lanes',\n 'concrete:plates', 'paving_stones', 'metal', 'wood') THEN 'paved'\n ELSE NULL\n END AS int_surface,\n CASE WHEN access IN ('destination') THEN 'destination'::text\n WHEN access IN ('no', 'private') THEN 'no'::text\n ELSE NULL\n END AS access,\n construction,\n CASE\n WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text\n ELSE 'INT-normal'::text\n END AS service,\n CASE\n WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes'\n ELSE 'no'\n END AS link,\n CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull\n FROM planet_osm_line\n WHERE (tunnel IS NULL OR NOT tunnel IN ('yes', 'building_passage'))\n AND (covered IS NULL OR NOT covered = 'yes')\n AND (bridge IS NULL OR NOT bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct'))\n AND highway IS NOT NULL -- end of road select\n UNION ALL\n SELECT\n way,\n COALESCE(\n ('railway_' || (CASE WHEN railway = 'preserved' AND service IN ('spur', 'siding', 'yard') THEN 'INT-preserved-ssy'::text \n WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' \n WHEN (railway = 'tram' AND service IN ('spur', 'siding', 'yard')) THEN 'tram-service' ELSE railway END)),\n ('aeroway_' || aeroway)\n ) AS feature,\n horse,\n foot,\n bicycle,\n tracktype,\n 'null',\n CASE\n WHEN access IN ('destination') THEN 'destination'::text\n WHEN access IN ('no', 'private') THEN 'no'::text\n ELSE NULL\n END AS access,\n construction,\n CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service,\n 'no' AS link,\n CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull\n FROM planet_osm_line\n WHERE (tunnel IS NULL OR NOT tunnel IN ('yes', 'building_passage'))\n AND (covered IS NULL OR NOT covered = 'yes')\n AND (bridge IS NULL OR NOT bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct'))\n AND (railway IS NOT NULL OR aeroway IS NOT NULL) -- end of rail/aero select\n ) AS features\n JOIN (VALUES -- this join is also putting a condition on what is selected. features not matching it do not make it into the results.\n ('railway_rail', 440),\n ('railway_INT-preserved-ssy', 430),\n ('railway_INT-spur-siding-yard', 430),\n ('railway_subway', 420),\n ('railway_narrow_gauge', 420),\n ('railway_light_rail', 420),\n ('railway_preserved', 420),\n ('railway_funicular', 420),\n ('railway_monorail', 420),\n ('railway_miniature', 420),\n ('railway_turntable', 420),\n ('railway_tram', 410),\n ('railway_tram-service', 405),\n ('railway_disused', 400),\n ('railway_construction', 400),\n ('highway_motorway', 380),\n ('highway_trunk', 370),\n ('highway_primary', 360),\n ('highway_secondary', 350),\n ('highway_tertiary', 340),\n ('highway_residential', 330),\n ('highway_unclassified', 330),\n ('highway_road', 330),\n ('highway_living_street', 320),\n ('highway_pedestrian', 310),\n ('highway_raceway', 300),\n ('highway_motorway_link', 240),\n ('highway_trunk_link', 230),\n ('highway_primary_link', 220),\n ('highway_secondary_link', 210),\n ('highway_tertiary_link', 200),\n ('highway_service', 150),\n ('highway_track', 110),\n ('highway_path', 100),\n ('highway_footway', 100),\n ('highway_bridleway', 100),\n ('highway_cycleway', 100),\n ('highway_steps', 100),\n ('highway_platform', 90),\n ('railway_platform', 90),\n ('aeroway_runway', 60),\n ('aeroway_taxiway', 50),\n ('highway_construction', 10)\n ) AS ordertable (feature, prio)\n USING (feature)\n ORDER BY\n layernotnull,\n prio,\n CASE WHEN access IN ('no', 'private') THEN 0 WHEN access IN ('destination') THEN 1 ELSE 2 END,\n CASE WHEN int_surface IN ('unpaved') THEN 0 ELSE 2 END\n) AS roads_casing", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "id": "roads-casing", - "properties": { - "minzoom": 9 - }, - "advanced": {} - }, - { - "name": "highway-area-fill", - "srs-name": "900913", - "class": "", - "id": "highway-area-fill", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n COALESCE(\n ('highway_' || (CASE WHEN highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'cycleway', 'living_street', \n 'track', 'path', 'platform', 'services') THEN highway ELSE NULL END)),\n ('railway_' || (CASE WHEN railway IN ('platform') THEN railway ELSE NULL END)),\n (('aeroway_' || CASE WHEN aeroway IN ('runway', 'taxiway', 'helipad') THEN aeroway ELSE NULL END))\n ) AS feature\n FROM planet_osm_polygon\n WHERE highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'living_street', 'track', 'path', 'platform', 'services')\n OR railway IN ('platform')\n OR aeroway IN ('runway', 'taxiway', 'helipad')\n ORDER BY z_order, way_area desc\n) AS highway_area_fill", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 14 - }, - "advanced": {} - }, - { - "name": "roads-fill", - "srs-name": "900913", - "geometry": "linestring", - "class": "roads-fill access", - "id": "roads-fill", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n (CASE WHEN substr(feature, length(feature)-3, 4) = 'link' THEN substr(feature, 0, length(feature)-4) ELSE feature END) AS feature,\n horse,\n foot,\n bicycle,\n tracktype,\n int_surface,\n access,\n construction,\n service,\n link,\n layernotnull\n FROM ( -- begin \"features\" subselect that contains both roads and rail/aero\n SELECT\n way,\n ('highway_' || highway) AS feature, -- only motorway to tertiary links are accepted later on\n horse,\n foot,\n bicycle,\n tracktype,\n CASE WHEN surface IN ('unpaved', 'compacted', 'dirt', 'earth', 'fine_gravel', 'grass', 'grass_paver', 'gravel', 'ground',\n 'mud', 'pebblestone', 'salt', 'sand', 'woodchips', 'clay') THEN 'unpaved'\n WHEN surface IN ('paved', 'asphalt', 'cobblestone', 'cobblestone:flattened', 'sett', 'concrete', 'concrete:lanes',\n 'concrete:plates', 'paving_stones', 'metal', 'wood') THEN 'paved'\n ELSE NULL\n END AS int_surface,\n CASE WHEN access IN ('destination') THEN 'destination'::text\n WHEN access IN ('no', 'private') THEN 'no'::text\n ELSE NULL\n END AS access,\n construction,\n CASE\n WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text\n ELSE 'INT-normal'::text\n END AS service,\n CASE\n WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes'\n ELSE 'no'\n END AS link,\n CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull\n FROM planet_osm_line\n WHERE (tunnel IS NULL OR NOT tunnel IN ('yes', 'building_passage'))\n AND (covered IS NULL OR NOT covered = 'yes')\n AND (bridge IS NULL OR NOT bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct'))\n AND highway IS NOT NULL -- end of road select\n UNION ALL\n SELECT\n way,\n COALESCE(\n ('railway_' || (CASE WHEN railway = 'preserved' AND service IN ('spur', 'siding', 'yard') THEN 'INT-preserved-ssy'::text \n WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' \n WHEN (railway = 'tram' AND service IN ('spur', 'siding', 'yard')) THEN 'tram-service' ELSE railway END)),\n ('aeroway_' || aeroway)\n ) AS feature,\n horse,\n foot,\n bicycle,\n tracktype,\n 'null' AS surface, -- Should be a SQL NULL?\n CASE\n WHEN access IN ('destination') THEN 'destination'::text\n WHEN access IN ('no', 'private') THEN 'no'::text\n ELSE NULL\n END AS access,\n construction,\n CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service,\n 'no' AS link,\n CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull\n FROM planet_osm_line\n WHERE (tunnel IS NULL OR NOT tunnel IN ('yes', 'building_passage'))\n AND (covered IS NULL OR NOT covered = 'yes')\n AND (bridge IS NULL OR NOT bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct'))\n AND (railway IS NOT NULL OR aeroway IS NOT NULL) -- end of rail/aero select\n ) AS features\n JOIN (VALUES -- this join is also putting a condition on what is selected. features not matching it do not make it into the results.\n ('railway_rail', 440),\n ('railway_INT-preserved-ssy', 430),\n ('railway_INT-spur-siding-yard', 430),\n ('railway_subway', 420),\n ('railway_narrow_gauge', 420),\n ('railway_light_rail', 420),\n ('railway_preserved', 420),\n ('railway_funicular', 420),\n ('railway_monorail', 420),\n ('railway_miniature', 420),\n ('railway_turntable', 420),\n ('railway_tram', 410),\n ('railway_tram-service', 405),\n ('railway_disused', 400),\n ('railway_construction', 400),\n ('highway_motorway', 380),\n ('highway_trunk', 370),\n ('highway_primary', 360),\n ('highway_secondary', 350),\n ('highway_tertiary', 340),\n ('highway_residential', 330),\n ('highway_unclassified', 330),\n ('highway_road', 330),\n ('highway_living_street', 320),\n ('highway_pedestrian', 310),\n ('highway_raceway', 300),\n ('highway_motorway_link', 240),\n ('highway_trunk_link', 230),\n ('highway_primary_link', 220),\n ('highway_secondary_link', 210),\n ('highway_tertiary_link', 200),\n ('highway_service', 150),\n ('highway_track', 110),\n ('highway_path', 100),\n ('highway_footway', 100),\n ('highway_bridleway', 100),\n ('highway_cycleway', 100),\n ('highway_steps', 100),\n ('highway_platform', 90),\n ('railway_platform', 90),\n ('aeroway_runway', 60),\n ('aeroway_taxiway', 50),\n ('highway_construction', 10)\n ) AS ordertable (feature, prio)\n USING (feature)\n ORDER BY\n layernotnull,\n prio,\n CASE WHEN access IN ('no', 'private') THEN 0 WHEN access IN ('destination') THEN 1 ELSE 2 END,\n CASE WHEN int_surface IN ('unpaved') THEN 0 ELSE 2 END\n) AS roads_fill", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 10 - }, - "advanced": {} - }, - { - "name": "turning-circle-fill", - "srs-name": "900913", - "geometry": "point", - "class": "", - "id": "turning-circle-fill", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n DISTINCT on (p.way)\n p.way AS way, l.highway AS int_tc_type,\n CASE WHEN l.service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text\n ELSE 'INT-normal'::text END AS int_tc_service\n FROM planet_osm_point p\n JOIN planet_osm_line l\n ON ST_DWithin(p.way, l.way, 0.1)\n JOIN (VALUES\n ('tertiary', 1),\n ('unclassified', 2),\n ('residential', 3),\n ('living_street', 4),\n ('service', 5),\n ('track', 6)\n ) AS v (highway, prio)\n ON v.highway=l.highway\n WHERE p.highway = 'turning_circle' OR p.highway = 'turning_loop'\n ORDER BY p.way, v.prio\n) AS turning_circle_fill", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 15 - }, - "advanced": {} - }, - { - "name": "aerialways", - "srs-name": "900913", - "geometry": "linestring", - "class": "", - "id": "aerialways", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n aerialway\n FROM planet_osm_line\n WHERE aerialway IS NOT NULL\n) AS aerialways", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 12 - }, - "advanced": {} - }, - { - "name": "roads-low-zoom", - "srs-name": "900913", - "geometry": "linestring", - "class": "", - "id": "roads-low-zoom", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n COALESCE(\n ('highway_' || (CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN substr(highway, 0, length(highway)-4) ELSE highway end)),\n ('railway_' || (CASE WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' \n WHEN railway IN ('rail', 'tram', 'light_rail', 'funicular', 'narrow_gauge') THEN railway ELSE NULL END))\n ) AS feature,\n CASE WHEN tunnel = 'yes' OR tunnel = 'building_passage' OR covered = 'yes' THEN 'yes' ELSE 'no' END AS int_tunnel,\n CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes' ELSE 'no' END AS link,\n CASE WHEN surface IN ('unpaved', 'compacted', 'dirt', 'earth', 'fine_gravel', 'grass', 'grass_paver', 'gravel', 'ground',\n 'mud', 'pebblestone', 'salt', 'sand', 'woodchips', 'clay') THEN 'unpaved'\n WHEN surface IN ('paved', 'asphalt', 'cobblestone', 'cobblestone:flattened', 'sett', 'concrete', 'concrete:lanes',\n 'concrete:plates', 'paving_stones', 'metal', 'wood') THEN 'paved'\n ELSE NULL\n END AS int_surface\n FROM planet_osm_roads\n WHERE highway IS NOT NULL\n OR (railway IS NOT NULL AND railway != 'preserved'\n AND (service IS NULL OR service NOT IN ('spur', 'siding', 'yard')))\n ORDER BY z_order\n) AS roads_low_zoom", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "maxzoom": 9, - "minzoom": 5 - }, - "advanced": {} - }, - { - "name": "waterway-bridges", - "srs-name": "900913", - "geometry": "linestring", - "class": "water-lines", - "id": "waterway-bridges", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n waterway,\n name,\n intermittent,\n CASE WHEN tunnel IN ('yes', 'culvert') THEN 'yes' ELSE 'no' END AS int_tunnel,\n 'yes' AS bridge\n FROM planet_osm_line\n WHERE waterway IN ('river', 'canal', 'derelict_canal', 'stream', 'drain', 'ditch', 'wadi')\n AND bridge IN ('yes', 'aqueduct')\n ORDER BY z_order\n) AS waterway_bridges", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 15 - }, - "advanced": {} - }, - { - "name": "bridges", - "srs-name": "900913", - "geometry": "linestring", - "class": "bridges-fill bridges-casing access", - "id": "bridges", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n (CASE WHEN substr(feature, length(feature)-3, 4) = 'link' THEN substr(feature, 0, length(feature)-4) ELSE feature END) AS feature,\n horse,\n foot,\n bicycle,\n tracktype,\n int_surface,\n access,\n construction,\n service,\n link,\n layernotnull\n FROM ( -- subselect that contains both roads and rail/aero\n SELECT\n way,\n ('highway_' || highway) AS feature, --only motorway to tertiary links are accepted later on\n horse,\n foot,\n bicycle,\n tracktype,\n CASE WHEN surface IN ('unpaved', 'compacted', 'dirt', 'earth', 'fine_gravel', 'grass', 'grass_paver', 'gravel', 'ground',\n 'mud', 'pebblestone', 'salt', 'sand', 'woodchips', 'clay') THEN 'unpaved'\n WHEN surface IN ('paved', 'asphalt', 'cobblestone', 'cobblestone:flattened', 'sett', 'concrete', 'concrete:lanes',\n 'concrete:plates', 'paving_stones', 'metal', 'wood') THEN 'paved'\n ELSE NULL\n END AS int_surface,\n CASE WHEN access IN ('destination') THEN 'destination'::text\n WHEN access IN ('no', 'private') THEN 'no'::text\n ELSE NULL\n END AS access,\n construction,\n CASE\n WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text\n ELSE 'INT-normal'::text\n END AS service,\n CASE\n WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes'\n ELSE 'no'\n END AS link,\n CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull\n FROM planet_osm_line\n WHERE bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct')\n AND highway IS NOT NULL -- end of road select\n UNION ALL\n SELECT\n way,\n COALESCE(\n ('railway_' || (CASE WHEN railway = 'preserved' AND service IN ('spur', 'siding', 'yard') THEN 'INT-preserved-ssy'::text \n WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' \n WHEN (railway = 'tram' AND service IN ('spur', 'siding', 'yard')) THEN 'tram-service' ELSE railway END)),\n ('aeroway_' || aeroway)\n ) AS feature,\n horse,\n foot,\n bicycle,\n tracktype,\n 'null',\n CASE\n WHEN access IN ('destination') THEN 'destination'::text\n WHEN access IN ('no', 'private') THEN 'no'::text\n ELSE NULL\n END AS access,\n construction,\n CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service,\n 'no' AS link,\n CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull\n FROM planet_osm_line\n WHERE bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct')\n AND (railway IS NOT NULL OR aeroway IS NOT NULL) -- end of rail/aero select\n ) AS features\n JOIN (VALUES -- this join is also putting a condition on what is selected. features not matching it do not make it into the results.\n ('railway_rail', 440),\n ('railway_INT-preserved-ssy', 430),\n ('railway_INT-spur-siding-yard', 430),\n ('railway_subway', 420),\n ('railway_narrow_gauge', 420),\n ('railway_light_rail', 420),\n ('railway_preserved', 420),\n ('railway_funicular', 420),\n ('railway_monorail', 420),\n ('railway_miniature', 420),\n ('railway_turntable', 420),\n ('railway_tram', 410),\n ('railway_tram-service', 405),\n ('railway_disused', 400),\n ('railway_construction', 400),\n ('highway_motorway', 380),\n ('highway_trunk', 370),\n ('highway_primary', 360),\n ('highway_secondary', 350),\n ('highway_tertiary', 340),\n ('highway_residential', 330),\n ('highway_unclassified', 330),\n ('highway_road', 330),\n ('highway_living_street', 320),\n ('highway_pedestrian', 310),\n ('highway_raceway', 300),\n ('highway_motorway_link', 240),\n ('highway_trunk_link', 230),\n ('highway_primary_link', 220),\n ('highway_secondary_link', 210),\n ('highway_tertiary_link', 200),\n ('highway_service', 150),\n ('highway_track', 110),\n ('highway_path', 100),\n ('highway_footway', 100),\n ('highway_bridleway', 100),\n ('highway_cycleway', 100),\n ('highway_steps', 100),\n ('highway_platform', 90),\n ('railway_platform', 90),\n ('aeroway_runway', 60),\n ('aeroway_taxiway', 50),\n ('highway_construction', 10)\n ) AS ordertable (feature, prio)\n USING (feature)\n ORDER BY\n layernotnull,\n prio,\n CASE WHEN access IN ('no', 'private') THEN 0 WHEN access IN ('destination') THEN 1 ELSE 2 END,\n CASE WHEN int_surface IN ('unpaved') THEN 0 ELSE 2 END\n) AS bridges", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "group-by": "layernotnull", - "minzoom": 9 - }, - "advanced": {} - }, - { - "name": "guideways", - "srs-name": "900913", - "geometry": "linestring", - "class": "", - "id": "guideways", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way\n FROM planet_osm_line\n WHERE highway = 'bus_guideway'\n) AS guideways", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 13 - }, - "advanced": {} - }, - { - "name": "admin-low-zoom", - "srs-name": "900913", - "geometry": "linestring", - "class": "", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n admin_level\n FROM planet_osm_roads\n WHERE boundary = 'administrative'\n AND admin_level IN ('0', '1', '2', '3', '4')\n AND osm_id < 0\n ORDER BY admin_level DESC\n) AS admin_low_zoom", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "id": "admin-low-zoom", - "properties": { - "maxzoom": 10, - "minzoom": 4 - }, - "advanced": {} - }, - { - "name": "admin-mid-zoom", - "srs-name": "900913", - "geometry": "linestring", - "class": "", - "id": "admin-mid-zoom", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n admin_level\n FROM planet_osm_roads\n WHERE boundary = 'administrative'\n AND admin_level IN ('0', '1', '2', '3', '4', '5', '6', '7', '8')\n AND osm_id < 0\n ORDER BY admin_level DESC\n) AS admin_mid_zoom", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "maxzoom": 12, - "minzoom": 11 - }, - "advanced": {} - }, - { - "name": "admin-high-zoom", - "srs-name": "900913", - "geometry": "linestring", - "class": "", - "id": "admin-high-zoom", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n admin_level\n FROM planet_osm_roads\n WHERE boundary = 'administrative'\n AND admin_level IN ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10')\n AND osm_id < 0\n ORDER BY admin_level::integer DESC -- With 10 as a valid value, we need to do a numeric ordering, not a text ordering\n) AS admin_high_zoom", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 13 - }, - "advanced": {} - }, - { - "name": "power-minorline", - "srs-name": "900913", - "geometry": "linestring", - "class": "", - "id": "power-minorline", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way\n FROM planet_osm_line\n WHERE power = 'minor_line'\n) AS power_minorline", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 16 - }, - "advanced": {} - }, - { - "name": "power-line", - "srs-name": "900913", - "geometry": "linestring", - "class": "", - "id": "power-line", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way\n FROM planet_osm_line\n WHERE power = 'line'\n) AS power_line", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 14 - }, - "advanced": {} - }, - { - "name": "nature-reserve-boundaries", - "srs-name": "900913", - "geometry": "polygon", - "class": "", - "id": "nature-reserve-boundaries", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n name,\n boundary,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels\n FROM planet_osm_polygon\n WHERE (boundary = 'national_park' OR leisure = 'nature_reserve')\n AND building IS NULL\n AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real\n) AS national_park_boundaries", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 7 - }, - "advanced": {} - }, - { - "name": "tourism-boundary", - "srs-name": "900913", - "geometry": "polygon", - "class": "", - "id": "tourism-boundary", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels,\n name,\n tourism\n FROM planet_osm_polygon\n WHERE tourism = 'theme_park'\n OR tourism = 'zoo'\n) AS tourism_boundary", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 10 - }, - "advanced": {} - }, - { - "name": "trees", - "srs-name": "900913", - "geometry": "polygon", - "class": "", - "id": "trees", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way, \"natural\"\n FROM planet_osm_point\n WHERE \"natural\" = 'tree'\nUNION ALL\nSELECT\n way, \"natural\"\n FROM planet_osm_line\n WHERE \"natural\" = 'tree_row'\n) AS trees", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 16 - }, - "advanced": {} - }, - { - "name": "country-names", - "srs-name": "900913", - "geometry": "point", - "class": "country", - "id": "country-names", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels,\n name\n FROM planet_osm_polygon\n WHERE boundary = 'administrative'\n AND admin_level = '2'\n AND name IS NOT NULL\n AND way_area > 100*!pixel_width!::real*!pixel_height!::real\n ORDER BY way_area DESC\n) AS country_names", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 2 - } - }, - { - "name": "capital-names", - "srs-name": "900913", - "geometry": "point", - "class": "", - "id": "capital-names", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n name,\n CASE\n WHEN (population ~ '^[0-9]{1,8}$') THEN population::INTEGER ELSE 0\n END as population,\n round(random()) AS dir\n FROM planet_osm_point\n WHERE capital = 'yes'\n AND admin_level = '2'\n ORDER BY population DESC\n) AS capital_names", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "maxzoom": 15, - "minzoom": 3 - }, - "advanced": {} - }, - { - "name": "state-names", - "srs-name": "900913", - "geometry": "point", - "class": "state", - "id": "state-names", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels,\n name,\n ref\n FROM planet_osm_polygon\n WHERE boundary = 'administrative'\n AND admin_level = '4'\n AND name IS NOT NULL\n AND way_area > 100*!pixel_width!::real*!pixel_height!::real\n ORDER BY way_area DESC\n) AS state_names", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 4 - }, - "advanced": {} - }, - { - "name": "placenames-medium", - "srs-name": "900913", - "geometry": "point", - "class": "", - "id": "placenames-medium", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n name,\n score,\n CASE\n WHEN (place = 'city') THEN 1\n ELSE 2\n END as category,\n round(random()) AS dir\n FROM \n (SELECT\n way,\n place,\n name,\n (\n (CASE\n WHEN (population ~ '^[0-9]{1,8}$') THEN population::INTEGER\n WHEN (place = 'city') THEN 100000\n WHEN (place = 'town') THEN 1000\n ELSE 1\n END)\n *\n (CASE\n WHEN (capital = '4' OR (capital = 'yes' AND admin_level = '4')) THEN 2\n ELSE 1\n END)\n ) AS score\n FROM planet_osm_point\n WHERE place IN ('city', 'town')\n AND name IS NOT NULL\n AND capital IS NULL OR capital != 'yes' OR (capital = 'yes' AND admin_level != '2')\n ) as p\n ORDER BY score DESC, length(name) DESC, name\n) AS placenames_medium", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "maxzoom": 15, - "minzoom": 4 - }, - "advanced": {} - }, - { - "name": "placenames-small", - "srs-name": "900913", - "geometry": "point", - "class": "", - "id": "placenames-small", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n place,\n name\n FROM planet_osm_point\n WHERE place IN ('suburb', 'village', 'hamlet', 'neighbourhood', 'locality', 'isolated_dwelling', 'farm')\n AND name IS NOT NULL\n ORDER BY CASE\n WHEN place = 'suburb' THEN 3\n WHEN place = 'village' THEN 4\n WHEN place = 'hamlet' THEN 5\n WHEN place = 'neighbourhood' THEN 6\n WHEN place = 'locality' THEN 7\n WHEN place = 'isolated_dwelling' THEN 8\n WHEN place = 'farm' THEN 9\n END ASC, length(name) DESC, name\n) AS placenames_small", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 12 - }, - "advanced": {} - }, - { - "name": "stations", - "srs-name": "900913", - "geometry": "point", - "class": "stations", - "id": "stations", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n name,\n railway,\n aerialway,\n CASE railway \n WHEN 'station' THEN 1 \n WHEN 'subway_entrance' THEN 3\n ELSE 2\n END\n AS prio\n FROM planet_osm_point\n WHERE railway IN ('station', 'halt', 'tram_stop', 'subway_entrance')\n OR aerialway = 'station'\n ORDER BY prio\n) AS stations", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 12 - }, - "advanced": {} - }, - { - "name": "stations-poly", - "srs-name": "900913", - "geometry": "polygon", - "class": "stations", - "id": "stations-poly", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n name,\n railway,\n aerialway\nFROM planet_osm_polygon\nWHERE railway IN ('station', 'halt', 'tram_stop')\n OR aerialway = 'station'\n) AS stations_poly", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 12 - }, - "advanced": {} - }, - { - "name": "amenity-points-poly", - "srs-name": "900913", - "geometry": "polygon", - "class": "points", - "id": "amenity-points-poly", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n COALESCE(\n 'aeroway_' || CASE WHEN aeroway IN ('helipad', 'aerodrome') THEN aeroway ELSE NULL END,\n 'tourism_' || CASE WHEN tourism IN ('artwork', 'alpine_hut', 'camp_site', 'caravan_site', 'chalet', 'guest_house', \n 'hostel', 'hotel', 'motel', 'information', 'museum', 'picnic_site') THEN tourism ELSE NULL END,\n 'amenity_' || CASE WHEN amenity IN ('shelter', 'atm', 'bank', 'bar', 'bicycle_rental', 'bus_station', 'cafe', \n 'car_rental', 'car_wash', 'cinema', 'clinic', 'community_centre', 'fire_station', 'fountain',\n 'fuel', 'hospital', 'ice_cream', 'embassy', 'library', 'courthouse', 'townhall', 'parking', \n 'bicycle_parking', 'motorcycle_parking', 'pharmacy', 'doctors', 'dentist', 'place_of_worship', \n 'police', 'post_box', 'post_office', 'pub', 'biergarten', 'recycling', 'restaurant', 'food_court', \n 'fast_food', 'telephone', 'emergency_phone', 'taxi', 'theatre', 'toilets', 'drinking_water', \n 'prison', 'hunting_stand', 'nightclub', 'veterinary', 'social_facility',\n 'charging_station') THEN amenity ELSE NULL END,\n 'shop_' || CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer', \n 'confectionery', 'fashion', 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', \n 'garden_centre', 'hairdresser', 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', \n 'photo', 'photo_studio', 'photography', 'seafood', 'shoes', 'alcohol', 'gift', 'furniture', 'kiosk', \n 'mobile_phone', 'motorcycle', 'musical_instrument', 'newsagent', 'optician', 'jewelry', 'jewellery', \n 'electronics', 'chemist', 'toys', 'travel_agency', 'car_parts', 'greengrocer', 'farm', 'stationery', \n 'laundry', 'dry_cleaning', 'beverages', 'perfumery', 'cosmetics', 'variety_store', 'wine', 'outdoor', \n 'copyshop', 'sports', 'deli', 'tobacco', 'art', 'tea') THEN shop \n WHEN shop IN ('accessories', 'antiques', 'appliance', 'baby_goods', 'bathroom_furnishing', \n 'bed', 'boat', 'bookmaker', 'boutique', 'builder', 'building_materials', 'camera', 'car_service', \n 'carpet', 'charity', 'cheese', 'chocolate', 'coffee', 'communication', 'craft', 'curtain', 'dairy', \n 'discount', 'e-cigarette', 'electrical', 'energy', 'erotic', 'estate_agent', \n 'fabric', 'fishing', 'flooring', 'food', 'frame', 'frozen_food', 'funeral_directors', 'furnace', \n 'gallery', 'games', 'gas', 'general', 'glaziery', 'grocery', 'health', 'health_food', 'hearing_aids', \n 'herbalist', 'hobby', 'household', 'houseware', 'hunting', 'interior_decoration', 'kitchen', \n 'leather', 'lighting', 'locksmith', 'lottery', 'market', 'massage', 'medical', 'medical_supply', 'money_lender', \n 'motorcycle_repair', 'music', 'office_supplies', 'organic', 'paint', 'pastry', 'pawnbroker', \n 'phone', 'pottery', 'printing', 'radiotechnics', 'real_estate', 'religion', 'rental', 'salon', \n 'scuba_diving', 'second_hand', 'sewing', 'shoe_repair', 'shopping_centre', 'solarium', 'souvenir', \n 'tailor', 'tanning', 'tattoo', 'ticket', 'tiles', 'trade', 'tyres', 'vacuum_cleaner', 'video', \n 'video_games', 'watches', 'wholesale', 'yes') THEN 'other' ELSE NULL END,\n 'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table') THEN leisure ELSE NULL END,\n 'man_made_' || CASE WHEN man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk') THEN man_made ELSE NULL END,\n 'natural_' || CASE WHEN \"natural\" IN ('spring') THEN \"natural\" ELSE NULL END,\n 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END,\n 'highway_'|| CASE WHEN highway IN ('bus_stop', 'elevator', 'traffic_signals') THEN highway ELSE NULL END,\n 'power_' || CASE WHEN power IN ('generator') THEN power ELSE NULL END,\n 'tourism_' || CASE WHEN tourism IN ('viewpoint') THEN tourism ELSE NULL END\n ) AS feature,\n access,\n religion,\n denomination,\n \"generator:source\",\n power_source,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels\n FROM planet_osm_polygon\n -- The upcoming where clause is needed for performance only, as the CASE statements would end up doing the equivalent filtering\n WHERE aeroway IN ('helipad', 'aerodrome')\n OR tourism IN ('artwork', 'alpine_hut', 'camp_site', 'caravan_site', 'chalet', 'guest_house', 'hostel', \n 'hotel', 'motel', 'information', 'museum', 'viewpoint', 'picnic_site')\n OR amenity IN ('shelter', 'atm', 'bank', 'bar', 'bicycle_rental', 'bus_station', 'cafe', \n 'car_rental', 'car_wash', 'cinema', 'clinic', 'community_centre',\n 'fire_station', 'fountain', 'fuel', 'hospital', 'ice_cream', 'embassy', 'library', 'courthouse', \n 'townhall', 'parking', 'bicycle_parking', 'motorcycle_parking', 'pharmacy', 'doctors', \n 'dentist', 'place_of_worship', 'police', 'post_box', 'post_office', 'pub', 'biergarten', \n 'recycling', 'restaurant', 'food_court', 'fast_food', 'telephone', 'emergency_phone', 'taxi', \n 'theatre', 'toilets', 'drinking_water', 'prison', 'hunting_stand', 'nightclub', 'veterinary',\n 'social_facility', 'charging_station')\n OR shop IS NOT NULL -- skip checking a huge list and use a null check\n OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table')\n OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk')\n OR \"natural\" IN ('spring')\n OR historic IN ('memorial', 'monument', 'archaeological_site')\n OR highway IN ('bus_stop', 'elevator', 'traffic_signals')\n OR (power = 'generator' AND (\"generator:source\" = 'wind' OR power_source = 'wind'))\n ORDER BY way_area desc\n) AS amenity_points_poly", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 10 - }, - "advanced": {} - }, - { - "name": "amenity-points", - "srs-name": "900913", - "geometry": "point", - "class": "points", - "id": "amenity-points", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n COALESCE(\n 'aeroway_' || CASE WHEN aeroway IN ('helipad', 'aerodrome') THEN aeroway ELSE NULL END,\n 'tourism_' || CASE WHEN tourism IN ('artwork', 'alpine_hut', 'camp_site', 'caravan_site', 'chalet', 'guest_house', 'hostel', \n 'hotel', 'motel', 'information', 'museum', 'picnic_site') THEN tourism ELSE NULL END,\n 'amenity_' || CASE WHEN amenity IN ('shelter', 'atm', 'bank', 'bar', 'bicycle_rental', 'bus_station', 'cafe', \n 'car_rental', 'car_wash', 'cinema', 'clinic', 'community_centre', 'fire_station', 'fountain',\n 'fuel', 'hospital', 'ice_cream', 'embassy', 'library', 'courthouse', 'townhall', 'parking', \n 'bicycle_parking', 'motorcycle_parking', 'pharmacy', 'doctors', 'dentist', 'place_of_worship', \n 'police', 'post_box', 'post_office', 'pub', 'biergarten', 'recycling', 'restaurant', 'food_court', \n 'fast_food', 'telephone', 'emergency_phone', 'taxi', 'theatre', 'toilets', 'drinking_water', \n 'prison', 'hunting_stand', 'nightclub', 'veterinary', 'social_facility',\n 'charging_station') THEN amenity ELSE NULL END,\n 'shop_' || CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer', 'confectionery', \n 'fashion', 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', 'garden_centre', \n 'hairdresser', 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', 'photo', 'photo_studio', \n 'photography', 'seafood', 'shoes', 'alcohol', 'gift', 'furniture', 'kiosk', 'mobile_phone', 'motorcycle', \n 'musical_instrument', 'newsagent', 'optician', 'jewelry', 'jewellery', 'electronics', 'chemist', 'toys', \n 'travel_agency', 'car_parts', 'greengrocer', 'farm', 'stationery', 'laundry', 'dry_cleaning', 'beverages', \n 'perfumery', 'cosmetics', 'variety_store', 'wine', 'outdoor', 'copyshop', 'sports', 'deli', 'tobacco', 'art', 'tea') THEN shop \n WHEN shop IN ('accessories', 'antiques', 'appliance', 'baby_goods', 'bathroom_furnishing', 'bed', \n 'boat', 'bookmaker', 'boutique', 'builder', 'building_materials', 'camera', 'car_service', 'carpet', 'charity', \n 'cheese', 'chocolate', 'coffee', 'communication', 'craft', 'curtain', 'dairy', \n 'discount', 'e-cigarette', 'electrical', 'energy', 'erotic', 'estate_agent', 'fabric', 'fishing', \n 'flooring', 'food', 'frame', 'frozen_food', 'funeral_directors', 'furnace', 'gallery', 'games', 'gas', \n 'general', 'glaziery', 'grocery', 'health', 'health_food', 'hearing_aids', 'herbalist', 'hobby', 'household', \n 'houseware', 'hunting', 'interior_decoration', 'kitchen', 'leather', 'lighting', 'locksmith', 'lottery', \n 'market', 'massage', 'medical', 'medical_supply', 'money_lender', 'motorcycle_repair', 'music', 'office_supplies', \n 'organic', 'paint', 'pastry', 'pawnbroker', 'phone', 'pottery', 'printing', 'radiotechnics', \n 'real_estate', 'religion', 'rental', 'salon', 'scuba_diving', 'second_hand', 'sewing', 'shoe_repair', 'shopping_centre', \n 'solarium', 'souvenir', 'tailor', 'tanning', 'tattoo', 'ticket', 'tiles', 'trade', 'tyres', \n 'vacuum_cleaner', 'video', 'video_games', 'watches', 'wholesale', 'yes') THEN 'other' ELSE NULL END,\n 'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway',\n 'dog_park') THEN leisure ELSE NULL END,\n 'man_made_' || CASE WHEN man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk') THEN man_made ELSE NULL END,\n 'natural_' || CASE WHEN \"natural\" IN ('peak', 'volcano', 'saddle', 'spring', 'cave_entrance') THEN \"natural\" ELSE NULL END,\n 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END,\n 'highway_'|| CASE WHEN highway IN ('bus_stop', 'elevator', 'traffic_signals', 'ford') THEN highway ELSE NULL END,\n 'power_' || CASE WHEN power IN ('generator') THEN power ELSE NULL END,\n 'tourism_' || CASE WHEN tourism IN ('viewpoint') THEN tourism ELSE NULL END,\n 'man_made_' || CASE WHEN man_made IN ('cross') THEN man_made ELSE NULL END,\n 'historic_' || CASE WHEN historic IN ('wayside_cross') THEN historic ELSE NULL END\n ) AS feature,\n access,\n CASE\n WHEN \"natural\" IN ('peak', 'volcano', 'saddle') THEN\n CASE\n WHEN ele ~ '^-?\\d{1,4}(\\.\\d+)?$' THEN ele::NUMERIC\n ELSE NULL\n END\n ELSE NULL\n END AS score,\n religion,\n denomination,\n \"generator:source\",\n power_source,\n NULL AS way_pixels\n FROM planet_osm_point\n -- The upcoming where clause is needed for performance only, as the CASE statements would end up doing the equivalent filtering\n WHERE aeroway IN ('helipad', 'aerodrome')\n OR tourism IN ('artwork', 'alpine_hut', 'camp_site', 'caravan_site', 'chalet', 'guest_house', 'hostel', \n 'hotel', 'motel', 'information', 'museum', 'viewpoint', 'picnic_site')\n OR amenity IN ('shelter', 'atm', 'bank', 'bar', 'bicycle_rental', 'bus_station', 'cafe', \n 'car_rental', 'car_wash', 'cinema', 'clinic', 'community_centre',\n 'fire_station', 'fountain', 'fuel', 'hospital', 'ice_cream', 'embassy', 'library', 'courthouse', \n 'townhall', 'parking', 'bicycle_parking', 'motorcycle_parking', 'pharmacy', 'doctors', \n 'dentist', 'place_of_worship', 'police', 'post_box', 'post_office', 'pub', 'biergarten', \n 'recycling', 'restaurant', 'food_court', 'fast_food', 'telephone', 'emergency_phone', \n 'taxi', 'theatre', 'toilets', 'drinking_water', 'prison', 'hunting_stand', 'nightclub', \n 'veterinary', 'social_facility', 'charging_station')\n OR shop IS NOT NULL -- skip checking a huge list and use a null check\n OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway',\n 'dog_park')\n OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'cross', 'obelisk')\n OR \"natural\" IN ('peak', 'volcano', 'saddle', 'spring', 'cave_entrance')\n OR historic IN ('memorial', 'monument', 'archaeological_site', 'wayside_cross')\n OR highway IN ('bus_stop', 'elevator', 'traffic_signals', 'ford')\n OR (power = 'generator' AND (\"generator:source\" = 'wind' OR power_source = 'wind'))\n ORDER BY score DESC NULLS LAST\n ) AS amenity_points", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 10 - }, - "advanced": {} - }, - { - "name": "power-towers", - "srs-name": "900913", - "geometry": "point", - "class": "", - "id": "power-towers", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way\n FROM planet_osm_point\n WHERE power = 'tower'\n) AS power_towers", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 14 - }, - "advanced": {} - }, - { - "name": "power-poles", - "srs-name": "900913", - "geometry": "point", - "class": "", - "id": "power-poles", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way\n FROM planet_osm_point\n WHERE power = 'pole'\n) AS power_poles", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 16 - }, - "advanced": {} - }, - { - "name": "roads-text-ref-low-zoom", - "srs-name": "900913", - "geometry": "linestring", - "class": "", - "id": "roads-text-ref-low-zoom", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n highway,\n height,\n width,\n refs\n FROM (\n SELECT\n way, highway,\n array_length(refs,1) AS height,\n (SELECT MAX(char_length(ref)) FROM unnest(refs) AS u(ref)) AS width,\n array_to_string(refs, E'\\n') AS refs\n FROM (\n SELECT\n way,\n highway,\n string_to_array(ref, ';') AS refs\n FROM planet_osm_roads\n WHERE highway IN ('motorway', 'trunk', 'primary', 'secondary')\n AND ref IS NOT NULL\n ) AS p) AS q\n WHERE height <= 4 AND width <= 11) AS roads_text_ref_low_zoom", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "maxzoom": 12, - "minzoom": 10 - }, - "advanced": {} - }, - { - "name": "junctions", - "srs-name": "900913", - "geometry": "point", - "class": "", - "id": "junctions", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n highway,\n junction,\n ref,\n name\n FROM planet_osm_point\n WHERE highway = 'motorway_junction' OR highway = 'traffic_signals' OR junction = 'yes'\n) AS junctions", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 11 - }, - "advanced": {} - }, - { - "name": "bridge-text", - "srs-name": "900913", - "geometry": "polygon", - "class": "", - "id": "bridge-text", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels,\n man_made,\n name\n FROM planet_osm_polygon\n WHERE man_made = 'bridge'\n) AS bridge_text", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 11 - }, - "advanced": {} - }, - { - "name": "roads-text-ref", - "srs-name": "900913", - "geometry": "linestring", - "class": "", - "id": "roads-text-ref", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n highway,\n height,\n width,\n refs\n FROM (\n SELECT\n way, highway,\n array_length(refs,1) AS height,\n (SELECT MAX(char_length(ref)) FROM unnest(refs) AS u(ref)) AS width,\n array_to_string(refs, E'\\n') AS refs\n FROM (\n SELECT\n way,\n COALESCE(\n CASE WHEN highway IN ('motorway', 'trunk', 'primary', 'secondary', 'tertiary', 'unclassified', 'residential') THEN highway ELSE NULL END,\n CASE WHEN aeroway IN ('runway', 'taxiway') THEN aeroway ELSE NULL END\n ) AS highway,\n string_to_array(ref, ';') AS refs\n FROM planet_osm_line\n WHERE (highway IN ('motorway', 'trunk', 'primary', 'secondary', 'tertiary', 'unclassified', 'residential') OR aeroway IN ('runway', 'taxiway'))\n AND ref IS NOT NULL\n ) AS p) AS q\n WHERE height <= 4 AND width <= 11) AS roads_text_ref", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 13 - }, - "advanced": {} - }, - { - "name": "roads-area-text-name", - "srs-name": "900913", - "geometry": "polygon", - "class": "", - "id": "roads-area-text-name", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels,\n highway,\n name\n FROM planet_osm_polygon\n WHERE highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'cycleway', 'living_street', 'track', 'path', 'platform')\n OR railway IN ('platform')\n AND name IS NOT NULL\n) AS roads_area_text_name", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 15 - }, - "advanced": {} - }, - { - "name": "roads-text-name", - "srs-name": "900913", - "geometry": "linestring", - "class": "directions", - "id": "roads-text-name", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN substr(highway, 0, length(highway)-4) ELSE highway END,\n CASE WHEN (tunnel = 'yes' OR tunnel = 'building_passage' OR covered = 'yes') THEN 'yes' ELSE 'no' END AS tunnel,\n CASE WHEN construction IN ('service', 'footway', 'cycleway', 'bridleway', 'path', 'track') THEN 'yes' ELSE 'no' END AS int_construction_minor,\n name,\n CASE\n WHEN oneway IN ('yes', '-1') THEN oneway\n WHEN junction IN ('roundabout') AND (oneway IS NULL OR NOT oneway IN ('no', 'reversible')) THEN 'yes'\n ELSE NULL\n END AS oneway,\n horse, bicycle\n FROM planet_osm_line\n WHERE highway IN ('motorway', 'motorway_link', 'trunk', 'trunk_link', 'primary', 'primary_link', 'secondary', 'secondary_link', 'tertiary', \n 'tertiary_link', 'residential', 'unclassified', 'road', 'service', 'pedestrian', 'raceway', 'living_street', 'construction')\n AND (name IS NOT NULL\n OR oneway IN ('yes', '-1')\n OR junction IN ('roundabout'))\n) AS roads_text_name", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 13 - }, - "advanced": {} - }, - { - "name": "paths-text-name", - "srs-name": "900913", - "geometry": "linestring", - "class": "", - "id": "paths-text-name", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n highway,\n name\n FROM planet_osm_line\n WHERE highway IN ('bridleway', 'footway', 'cycleway', 'path', 'track', 'steps')\n AND name IS NOT NULL\n) AS paths_text_name", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 15 - }, - "advanced": {} - }, - { - "name": "text-poly-low-zoom", - "srs-name": "900913", - "geometry": "polygon", - "class": "text-low-zoom", - "id": "text-poly-low-zoom", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels,\n COALESCE(\n 'landuse_' || CASE WHEN landuse IN ('forest', 'military') THEN landuse ELSE NULL END,\n 'natural_' || CASE WHEN \"natural\" IN ('wood', 'glacier', 'sand', 'scree', 'shingle', 'bare_rock') THEN \"natural\" ELSE NULL END,\n 'place_' || CASE WHEN place IN ('island') THEN place ELSE NULL END,\n 'boundary_' || CASE WHEN boundary IN ('national_park') THEN boundary ELSE NULL END,\n 'leisure_' || CASE WHEN leisure IN ('nature_reserve') THEN leisure ELSE NULL END\n ) AS feature,\n name,\n CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building -- always no with the where conditions\n FROM planet_osm_polygon\n WHERE (landuse IN ('forest', 'military')\n OR \"natural\" IN ('wood', 'glacier', 'sand', 'scree', 'shingle', 'bare_rock')\n OR \"place\" IN ('island')\n OR boundary IN ('national_park')\n OR leisure IN ('nature_reserve'))\n AND building IS NULL\n AND name IS NOT NULL\n ORDER BY way_area DESC\n) AS text_poly_low_zoom", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "maxzoom": 9, - "minzoom": 7 - }, - "advanced": {} - }, - { - "name": "text-poly", - "srs-name": "900913", - "geometry": "polygon", - "class": "text", - "id": "text-poly", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels,\n COALESCE(\n 'aeroway_' || CASE WHEN aeroway IN ('gate', 'apron', 'helipad', 'aerodrome') THEN aeroway ELSE NULL END,\n 'tourism_' || CASE WHEN tourism IN ('artwork', 'alpine_hut', 'hotel', 'motel', 'hostel', 'chalet', 'guest_house', 'camp_site', 'caravan_site', \n 'theme_park', 'museum', 'zoo', 'information', 'picnic_site') THEN tourism ELSE NULL END,\n 'amenity_' || CASE WHEN amenity IN ('pub', 'restaurant', 'food_court', 'cafe', 'fast_food', 'biergarten', 'bar', 'library', \n 'theatre', 'courthouse', 'townhall', 'cinema', 'clinic', 'community_centre', 'parking', \n 'bicycle_parking', 'motorcycle_parking', 'police', 'fire_station', 'fountain', 'place_of_worship', \n 'grave_yard', 'shelter', 'bank', 'embassy', 'fuel', 'bus_station', 'prison', 'university', \n 'school', 'college', 'kindergarten', 'hospital', 'ice_cream', 'pharmacy', 'doctors', 'dentist', \n 'atm', 'bicycle_rental', 'car_rental', 'car_wash', 'post_box', 'post_office',\n 'recycling', 'telephone', 'emergency_phone', 'toilets', 'taxi', 'drinking_water', 'hunting_stand', \n 'nightclub', 'veterinary', 'social_facility', 'charging_station') THEN amenity ELSE NULL END,\n 'shop_' || CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer', 'confectionery', \n 'fashion', 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', 'garden_centre', \n 'hairdresser', 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', 'photo', 'photo_studio', \n 'photography', 'seafood', 'shoes', 'alcohol', 'gift', 'furniture', 'kiosk', 'mobile_phone', 'motorcycle', \n 'musical_instrument', 'newsagent', 'optician', 'jewelry', 'jewellery', 'electronics', 'chemist', 'toys', \n 'travel_agency', 'car_parts', 'greengrocer', 'farm', 'stationery', 'laundry', 'dry_cleaning', 'beverages', \n 'perfumery', 'cosmetics', 'variety_store', 'wine', 'outdoor', 'copyshop', 'sports', 'deli', 'tobacco', 'art', 'tea') THEN shop \n WHEN shop IN ('accessories', 'antiques', 'appliance', 'baby_goods', 'bathroom_furnishing', 'bed', \n 'boat', 'bookmaker', 'boutique', 'builder', 'building_materials', 'camera', 'car_service', 'carpet', 'charity', \n 'cheese', 'chocolate', 'coffee', 'communication', 'craft', 'curtain', 'dairy', \n 'discount', 'e-cigarette', 'electrical', 'energy', 'erotic', 'estate_agent', 'fabric', 'fishing', \n 'flooring', 'food', 'frame', 'frozen_food', 'funeral_directors', 'furnace', 'gallery', 'games', 'gas', \n 'general', 'glaziery', 'grocery', 'health', 'health_food', 'hearing_aids', 'herbalist', 'hobby', 'household', \n 'houseware', 'hunting', 'interior_decoration', 'kitchen', 'leather', 'lighting', 'locksmith', \n 'lottery', 'market', 'massage', 'medical', 'medical_supply', 'money_lender', 'motorcycle_repair', 'music', \n 'office_supplies', 'organic', 'paint', 'pastry', 'pawnbroker', 'phone', 'pottery', \n 'printing', 'radiotechnics', 'real_estate', 'religion', 'rental', 'salon', 'scuba_diving', 'second_hand', \n 'sewing', 'shoe_repair', 'shopping_centre', 'solarium', 'souvenir', 'tailor', 'tanning', 'tattoo',\n 'ticket', 'tiles', 'trade', 'tyres', 'vacuum_cleaner', 'video', 'video_games', 'watches', 'wholesale', \n 'yes') THEN 'other' ELSE NULL END,\n 'leisure_' || CASE WHEN leisure IN ('swimming_pool', 'water_park', 'miniature_golf', 'golf_course', 'sports_centre', 'stadium', 'track', \n 'pitch', 'playground', 'park', 'recreation_ground', 'common', 'garden', 'nature_reserve', 'marina', \n 'picnic_table', 'dog_park') THEN leisure ELSE NULL END,\n 'power_' || CASE WHEN power IN ('plant', 'station', 'generator', 'sub_station', 'substation') THEN power ELSE NULL END,\n 'landuse_' || CASE WHEN landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery', \n 'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', \n 'greenhouse_horticulture', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', \n 'construction', 'military') THEN landuse ELSE NULL END,\n 'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk') THEN man_made ELSE NULL END,\n 'natural_' || CASE WHEN \"natural\" IN ('wood', 'water', 'mud', 'wetland', 'marsh', 'bay', 'spring', 'scree', 'shingle', 'bare_rock', 'sand', 'heath', \n 'grassland', 'scrub', 'beach', 'shoal', 'reef', 'glacier') THEN \"natural\" ELSE NULL END,\n 'place_' || CASE WHEN place IN ('island', 'islet') THEN place ELSE NULL END,\n 'military_' || CASE WHEN military IN ('danger_area') THEN military ELSE NULL END,\n 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END,\n 'highway_' || CASE WHEN highway IN ('services', 'rest_area', 'bus_stop', 'elevator', 'ford') THEN highway ELSE NULL END,\n 'boundary_' || CASE WHEN boundary IN ('national_park') THEN boundary ELSE NULL END,\n 'waterway_' || CASE WHEN waterway IN ('dam') THEN waterway ELSE NULL END,\n 'tourism_' || CASE WHEN tourism IN ('viewpoint', 'attraction') THEN tourism ELSE NULL END\n ) AS feature,\n access,\n name,\n operator,\n ref,\n way_area,\n CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building\n FROM planet_osm_polygon\n -- The upcoming where clause is needed for performance only, as the CASE statements would end up doing the equivalent filtering\n WHERE (aeroway IN ('gate', 'apron', 'helipad', 'aerodrome')\n OR tourism IN ('artwork', 'alpine_hut', 'hotel', 'motel', 'hostel', 'chalet', 'guest_house', 'camp_site', 'caravan_site', 'theme_park', \n 'museum', 'viewpoint', 'attraction', 'zoo', 'information', 'picnic_site')\n OR amenity IS NOT NULL -- skip checking a huge list and use a null check\n OR shop IS NOT NULL\n OR leisure IS NOT NULL\n OR landuse IS NOT NULL\n OR man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk')\n OR \"natural\" IS NOT NULL\n OR place IN ('island', 'islet')\n OR military IN ('danger_area')\n OR historic IN ('memorial', 'monument', 'archaeological_site')\n OR highway IN ('services', 'rest_area', 'bus_stop', 'elevator', 'ford')\n OR power IN ('plant', 'station', 'generator', 'sub_station', 'substation')\n OR boundary IN ('national_park')\n OR waterway = 'dam')\n AND (name IS NOT NULL\n OR (ref IS NOT NULL AND aeroway IN ('gate'))\n )\n ORDER BY way_area DESC\n) AS text_poly", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 10 - }, - "advanced": {} - }, - { - "name": "text-line", - "srs-name": "900913", - "geometry": "linestring", - "class": "", - "id": "text-line", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n NULL as way_pixels,\n COALESCE('man_made_' || man_made, 'waterway_' || waterway, 'natural_' || \"natural\") AS feature,\n access,\n name,\n operator,\n ref,\n NULL AS way_area,\n CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building\n FROM planet_osm_line\n WHERE (man_made IN ('pier', 'breakwater', 'groyne', 'embankment')\n OR waterway IN ('dam', 'weir')\n OR \"natural\" IN ('cliff'))\n AND name IS NOT NULL\n) AS text_line", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 10 - }, - "advanced": {} - }, - { - "name": "text-point", - "srs-name": "900913", - "geometry": "point", - "class": "text", - "id": "text-point", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n way_pixels,\n feature,\n access,\n CONCAT(\n name,\n CASE WHEN name IS NOT NULL AND elevation IS NOT NULL THEN E'\\n' ELSE NULL END,\n CASE WHEN elevation IS NOT NULL THEN CONCAT(REPLACE(ROUND(elevation)::TEXT, '-', U&'\\2212'), U&'\\00A0', 'm') ELSE NULL END\n ) AS name,\n CASE\n WHEN \"natural\" IN ('peak', 'volcano', 'saddle') THEN elevation\n ELSE NULL\n END AS score,\n operator,\n ref,\n way_area,\n is_building\n FROM\n (SELECT\n way,\n NULL AS way_pixels,\n COALESCE(\n 'aeroway_' || CASE WHEN aeroway IN ('gate', 'apron', 'helipad', 'aerodrome') THEN aeroway ELSE NULL END,\n 'tourism_' || CASE WHEN tourism IN ('artwork', 'alpine_hut', 'hotel', 'motel', 'hostel', 'chalet', 'guest_house', 'camp_site', 'caravan_site', \n 'theme_park', 'museum', 'zoo', 'information', 'picnic_site') THEN tourism ELSE NULL END,\n 'amenity_' || CASE WHEN amenity IN ('pub', 'restaurant', 'food_court', 'cafe', 'fast_food', 'biergarten', 'bar', 'library', 'theatre', \n 'courthouse', 'townhall', 'cinema', 'clinic', 'community_centre', 'parking', 'bicycle_parking', \n 'motorcycle_parking', 'police', 'fire_station', 'fountain', 'place_of_worship', 'grave_yard', 'shelter', 'bank', \n 'embassy', 'fuel', 'bus_station', 'prison', 'university', 'school', 'college', 'kindergarten', 'hospital', \n 'ice_cream', 'pharmacy', 'doctors', 'dentist', 'atm', 'bicycle_rental', 'car_rental',\n 'car_wash', 'post_box', 'post_office', 'recycling', 'telephone', 'emergency_phone', 'toilets', 'taxi', \n 'drinking_water', 'hunting_stand', 'nightclub', 'veterinary', 'social_facility',\n 'charging_station') THEN amenity ELSE NULL END,\n 'shop_' || CASE WHEN shop IN ('supermarket', 'bag','bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer', 'confectionery', 'fashion', \n 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', 'garden_centre', 'hairdresser', \n 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', 'photo', 'photo_studio', 'photography', \n 'seafood', 'shoes', 'alcohol', 'gift', 'furniture', 'kiosk', 'mobile_phone', 'motorcycle', 'musical_instrument', \n 'newsagent', 'optician', 'jewelry', 'jewellery', 'electronics', 'chemist', 'toys', 'travel_agency', 'car_parts', \n 'greengrocer', 'farm', 'stationery', 'laundry', 'dry_cleaning', 'beverages', 'perfumery', 'cosmetics', \n 'variety_store', 'wine', 'outdoor', 'copyshop', 'sports', 'deli', 'tobacco', 'art', 'tea') THEN shop \n WHEN shop IN ('accessories', 'antiques', 'appliance',\n 'baby_goods', 'bathroom_furnishing', 'bed', 'boat', 'bookmaker', 'boutique', 'builder', \n 'building_materials', 'camera', 'car_service', 'carpet', 'charity', 'cheese', 'chocolate', 'coffee', \n 'communication', 'craft', 'curtain', 'dairy', 'discount', \n 'e-cigarette', 'electrical', 'energy', 'erotic', 'estate_agent', 'fabric', 'fishing', 'flooring', \n 'food', 'frame', 'frozen_food', 'funeral_directors', 'furnace', 'gallery', 'games', 'gas', \n 'general', 'glaziery', 'grocery', 'health', 'health_food', 'hearing_aids', 'herbalist', 'hobby', 'household', \n 'houseware', 'hunting', 'interior_decoration', 'kitchen', 'leather', 'lighting', 'locksmith', \n 'lottery', 'market', 'massage', 'medical', 'medical_supply', 'money_lender', 'motorcycle_repair', 'music', \n 'office_supplies', 'organic', 'paint', 'pastry', 'pawnbroker', 'phone', 'pottery', \n 'printing', 'radiotechnics', 'real_estate', 'religion', 'rental', 'salon', 'scuba_diving', 'second_hand', \n 'sewing', 'shoe_repair', 'shopping_centre', 'solarium', 'souvenir', 'tailor', 'tanning', 'tattoo', \n 'ticket', 'tiles', 'trade', 'tyres', 'vacuum_cleaner', 'video', 'video_games', 'watches', \n 'wholesale', 'yes') THEN 'other' ELSE NULL END,\n 'leisure_' || CASE WHEN leisure IN ('swimming_pool', 'water_park', 'miniature_golf', 'golf_course', 'sports_centre', 'stadium', 'track', \n 'pitch','playground', 'park', 'recreation_ground', 'common', 'garden', 'nature_reserve', 'marina', \n 'slipway', 'picnic_table', 'dog_park') THEN leisure ELSE NULL END,\n 'power_' || CASE WHEN power IN ('plant', 'station', 'generator', 'sub_station', 'substation') THEN power ELSE NULL END,\n 'landuse_' || CASE WHEN landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery', \n 'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', \n 'greenhouse_horticulture', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', \n 'construction', 'military') THEN landuse ELSE NULL END,\n 'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'obelisk') THEN man_made ELSE NULL END,\n 'natural_' || CASE WHEN \"natural\" IN ('wood', 'peak', 'volcano', 'saddle', 'cave_entrance', 'water', 'mud', 'wetland', 'marsh', 'bay', 'spring', \n 'scree', 'shingle', 'bare_rock', 'sand', 'heath', 'grassland', 'scrub', 'beach', 'glacier', 'tree') \n THEN \"natural\" ELSE NULL END,\n 'place_' || CASE WHEN place IN ('island', 'islet') THEN place ELSE NULL END,\n 'military_' || CASE WHEN military IN ('danger_area') THEN military ELSE NULL END,\n 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END,\n 'highway_' || CASE WHEN highway IN ('services', 'rest_area', 'bus_stop', 'elevator', 'ford') THEN highway ELSE NULL END,\n 'boundary_' || CASE WHEN boundary IN ('national_park') THEN boundary ELSE NULL END,\n 'waterway_' || CASE WHEN waterway IN ('dam', 'weir') THEN waterway ELSE NULL END,\n 'tourism_' || CASE WHEN tourism IN ('viewpoint', 'attraction') THEN tourism ELSE NULL END,\n 'man_made_' || CASE WHEN man_made IN ('cross') THEN man_made ELSE NULL END,\n 'historic_' || CASE WHEN historic IN ('wayside_cross') THEN historic ELSE NULL END\n ) AS feature,\n access,\n name,\n CASE\n WHEN \"natural\" IN ('peak', 'volcano', 'saddle') OR tourism = 'alpine_hut' OR amenity = 'shelter' THEN\n CASE\n WHEN ele ~ '^-?\\d{1,4}(\\.\\d+)?$' THEN ele::NUMERIC\n ELSE NULL\n END\n ELSE NULL\n END AS elevation,\n \"natural\",\n operator,\n ref,\n NULL AS way_area,\n CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building\n FROM planet_osm_point\n -- The upcoming where clause is needed for performance only, as the CASE statements would end up doing the equivalent filtering\n WHERE (aeroway IN ('gate', 'apron', 'helipad', 'aerodrome')\n OR tourism IN ('artwork', 'alpine_hut', 'hotel', 'motel', 'hostel', 'chalet', 'guest_house', 'camp_site', 'caravan_site', 'theme_park', \n 'museum', 'viewpoint', 'attraction', 'zoo', 'information', 'picnic_site')\n OR amenity IS NOT NULL -- skip checking a huge list and use a null check\n OR shop IS NOT NULL\n OR leisure IS NOT NULL\n OR landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery', 'residential', \n 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'greenhouse_horticulture', \n 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction', 'military')\n OR man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'cross', 'obelisk')\n OR \"natural\" IS NOT NULL\n OR place IN ('island', 'islet')\n OR military IN ('danger_area')\n OR historic IN ('memorial', 'monument', 'archaeological_site', 'wayside_cross')\n OR highway IN ('bus_stop', 'services', 'rest_area', 'elevator', 'ford')\n OR power IN ('plant', 'station', 'generator', 'sub_station', 'substation')\n OR boundary IN ('national_park')\n OR waterway IN ('dam', 'weir'))\n AND (name IS NOT NULL\n OR (ele IS NOT NULL AND (\"natural\" IN ('peak', 'volcano', 'saddle') OR tourism = 'alpine_hut' OR amenity = 'shelter'))\n OR (ref IS NOT NULL AND aeroway IN ('gate'))\n )\n ) AS p\n ORDER BY score DESC NULLS LAST\n ) AS text", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 10 - }, - "advanced": {} - }, - { - "name": "building-text", - "srs-name": "900913", - "geometry": "polygon", - "class": "", - "id": "building-text", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n name,\n way,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels\n FROM planet_osm_polygon\n WHERE building IS NOT NULL\n AND building NOT IN ('no')\n AND name IS NOT NULL\n ORDER BY way_area DESC\n) AS building_text", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 14 - }, - "advanced": {} - }, - { - "name": "interpolation", - "srs-name": "900913", - "geometry": "linestring", - "class": "", - "id": "interpolation", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way\n FROM planet_osm_line\n WHERE \"addr:interpolation\" IS NOT NULL\n) AS interpolation", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 17 - }, - "advanced": {} - }, - { - "name": "addresses", - "srs-name": "900913", - "geometry": "point", - "class": "", - "id": "addresses", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n \"addr:housenumber\" AS addr_housenumber,\n \"addr:housename\" AS addr_housename,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels\n FROM planet_osm_polygon\n WHERE ((\"addr:housenumber\" IS NOT NULL) OR (\"addr:housename\" IS NOT NULL))\n AND building IS NOT NULL\nUNION ALL\nSELECT\n way,\n \"addr:housenumber\" AS addr_housenumber,\n \"addr:housename\" AS addr_housename,\n NULL AS way_pixels\n FROM planet_osm_point\n WHERE (\"addr:housenumber\" IS NOT NULL) OR (\"addr:housename\" IS NOT NULL)\n ORDER BY way_pixels DESC NULLS LAST\n) AS addresses", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 17 - }, - "advanced": {} - }, - { - "name": "water-lines-text", - "srs-name": "900913", - "geometry": "linestring", - "class": "", - "id": "water-lines-text", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n waterway,\n lock,\n name,\n intermittent,\n CASE WHEN tunnel IN ('yes', 'culvert') THEN 'yes' ELSE 'no' END AS int_tunnel\n FROM planet_osm_line\n WHERE waterway IN ('river', 'canal', 'derelict_canal', 'stream', 'drain', 'ditch', 'wadi')\n AND (tunnel IS NULL or tunnel != 'culvert')\n AND name IS NOT NULL\n ORDER BY z_order\n) AS water_lines_text", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 13 - }, - "advanced": {} - }, - { - "name": "ferry-routes-text", - "srs-name": "900913", - "geometry": "linestring", - "class": "", - "id": "ferry-routes-text", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n name\n FROM planet_osm_line\n WHERE route = 'ferry'\n AND name IS NOT NULL\n) AS ferry_routes_text", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 13 - }, - "advanced": {} - }, - { - "name": "admin-text", - "srs-name": "900913", - "geometry": "linestring", - "class": "", - "id": "admin-text", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n name,\n admin_level\n FROM planet_osm_polygon\n WHERE boundary = 'administrative'\n AND admin_level IN ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10')\n AND name IS NOT NULL\n ORDER BY admin_level::integer ASC, way_area DESC\n) AS admin_text", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 16 - }, - "advanced": {} - }, - { - "name": "nature-reserve-text", - "srs-name": "900913", - "geometry": "linestring", - "class": "", - "id": "nature-reserve-text", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n name,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels\n FROM planet_osm_polygon\n WHERE (boundary = 'national_park' OR leisure = 'nature_reserve')\n AND name IS NOT NULL\n) AS nature_reserve_text", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 13 - }, - "advanced": {} - }, - { - "name": "amenity-low-priority", - "srs-name": "900913", - "geometry": "point", - "class": "amenity-low-priority", - "id": "amenity-low-priority", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n COALESCE(\n 'highway_' || CASE WHEN highway IN ('mini_roundabout') THEN highway ELSE NULL END,\n 'railway_' || CASE WHEN railway IN ('level_crossing', 'crossing') THEN railway ELSE NULL END,\n 'amenity_' || CASE WHEN amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking', 'bench', 'waste_basket') THEN amenity ELSE NULL END,\n 'historic_' || CASE WHEN historic IN ('wayside_cross') THEN historic ELSE NULL END,\n 'man_made_' || CASE WHEN man_made IN ('cross') THEN man_made ELSE NULL END,\n 'barrier_' || CASE WHEN barrier IN ('bollard', 'gate', 'lift_gate', 'swing_gate', 'block') THEN barrier ELSE NULL END\n ) AS feature,\n access,\n CASE WHEN amenity='waste_basket' THEN 2 ELSE 1 END AS prio\n FROM planet_osm_point p\n WHERE highway IN ('mini_roundabout')\n OR railway IN ('level_crossing', 'crossing')\n OR amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking', 'bench', 'waste_basket')\n OR historic IN ('wayside_cross')\n OR man_made IN ('cross')\n OR barrier IN ('bollard', 'gate', 'lift_gate', 'swing_gate', 'block')\n ORDER BY prio\n ) AS amenity_low_priority", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 14 - }, - "advanced": {} - }, - { - "name": "amenity-low-priority-poly", - "srs-name": "900913", - "geometry": "polygon", - "class": "amenity-low-priority", - "id": "amenity-low-priority-poly", - "srs": "+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", - "Datasource": { - "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n COALESCE(\n 'amenity_' || CASE WHEN amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking') THEN amenity ELSE NULL END,\n 'barrier_' || CASE WHEN barrier IN ('bollard', 'gate', 'lift_gate', 'swing_gate', 'block') THEN barrier ELSE NULL END\n ) AS feature,\n access\n FROM planet_osm_polygon p\n WHERE amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking')\n OR barrier IN ('bollard', 'gate', 'lift_gate', 'swing_gate', 'block')\n ) AS amenity_low_priority_poly", - "geometry_field": "way", - "type": "postgis", - "key_field": "", - "dbname": "gis" - }, - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "properties": { - "minzoom": 14 - }, - "advanced": {} - } - ], - "scale": 1, - "center": [ - 0, - 0, - 4 - ], - "format": "png", - "_parts": { - "extents": { - "srs": "+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", - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "srs-name": "900913" - }, - "osm2pgsql": { - "geometry_field": "way", - "type": "postgis", - "dbname": "gis", - "extent": "-20037508,-20037508,20037508,20037508", - "key_field": "" - }, - "extents84": { - "srs": "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs", - "extent": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "srs-name": "WGS84" - } - }, - "metatile": 2, - "bounds": [ - -180, - -85.05112877980659, - 180, - 85.05112877980659 - ], - "name": "OpenStreetMap Carto", - "srs": "+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", - "Stylesheet": [ - "style.mss", - "shapefiles.mss", - "landcover.mss", - "water.mss", - "water-features.mss", - "road-colors-generated.mss", - "roads.mss", - "power.mss", - "placenames.mss", - "buildings.mss", - "stations.mss", - "amenity-points.mss", - "ferry-routes.mss", - "aerialways.mss", - "admin.mss", - "addressing.mss" - ], - "minzoom": 0, - "maxzoom": 22, - "description": "A general-purpose OpenStreetMap mapnik style, in CartoCSS" -} \ No newline at end of file +scale: 1 +metatile: 2 +name: "OpenStreetMap Carto" +description: "A general-purpose OpenStreetMap mapnik style, in CartoCSS" +bounds: &world + - -180 + - -85.05112877980659 + - 180 + - 85.05112877980659 +center: + - 0 + - 0 + - 4 +format: "png" +interactivity: false +minzoom: 0 +maxzoom: 22 +srs: "+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" + +# Various parts to be included later on +_parts: + # Extents are used for tilemill, and don't actually make it to the generated XML + extents: &extents + extent: *world + srs-name: "900913" + srs: "+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" + extents84: &extents84 + extent: *world + srs-name: "WGS84" + srs: "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs" + osm2pgsql: &osm2pgsql + type: "postgis" + dbname: "gis" + key_field: "" + geometry_field: "way" + extent: "-20037508,-20037508,20037508,20037508" + +Stylesheet: + - "style.mss" + - "shapefiles.mss" + - "landcover.mss" + - "water.mss" + - "water-features.mss" + - "road-colors-generated.mss" + - "roads.mss" + - "power.mss" + - "placenames.mss" + - "buildings.mss" + - "stations.mss" + - "amenity-points.mss" + - "ferry-routes.mss" + - "aerialways.mss" + - "admin.mss" + - "addressing.mss" +Layer: + - id: "world" + name: "world" + class: "" + geometry: "polygon" + <<: *extents + Datasource: + file: "data/simplified-land-polygons-complete-3857/simplified_land_polygons.shp" + type: "shape" + advanced: {} + properties: + maxzoom: 9 + - id: "coast-poly" + name: "coast-poly" + class: "" + geometry: "polygon" + <<: *extents + Datasource: + file: "data/land-polygons-split-3857/land_polygons.shp" + type: "shape" + properties: + minzoom: 10 + advanced: {} + - id: "builtup" + name: "builtup" + geometry: "polygon" + class: "" + extent: *world + srs-name: "mercator" + srs: "+proj=merc +datum=WGS84 +over" + Datasource: + file: "data/world_boundaries/builtup_area.shp" + type: "shape" + properties: + minzoom: 8 + maxzoom: 9 + advanced: {} + - id: "necountries" + name: "necountries" + class: "" + geometry: "linestring" + <<: *extents84 + Datasource: + file: "data/ne_110m_admin_0_boundary_lines_land/ne_110m_admin_0_boundary_lines_land.shp" + type: "shape" + properties: + minzoom: 1 + maxzoom: 3 + advanced: {} + - id: "landcover-low-zoom" + name: "landcover-low-zoom" + class: "" + geometry: "polygon" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, name, way_pixels, + COALESCE(wetland, landuse, "natural") AS feature + FROM (SELECT + way, COALESCE(name, '') AS name, + ('landuse_' || (CASE WHEN landuse IN ('forest', 'military') THEN landuse ELSE NULL END)) AS landuse, + ('natural_' || (CASE WHEN "natural" IN ('wood', 'sand', 'scree', 'shingle', 'bare_rock') THEN "natural" ELSE NULL END)) AS "natural", + ('wetland_' || (CASE WHEN "natural" IN ('wetland', 'mud') THEN (CASE WHEN "natural" IN ('mud') THEN "natural" ELSE wetland END) ELSE NULL END)) AS wetland, + way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels + FROM planet_osm_polygon + WHERE (landuse IN ('forest', 'military') + OR "natural" IN ('wood', 'wetland', 'mud', 'sand', 'scree', 'shingle', 'bare_rock')) + AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real + AND building IS NULL + ORDER BY CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END, way_area DESC + ) AS features + ) AS landcover_low_zoom + properties: + minzoom: 7 + maxzoom: 9 + advanced: {} + - id: "landcover" + name: "landcover" + class: "" + geometry: "polygon" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, name, religion, way_pixels, + COALESCE(aeroway, amenity, wetland, power, landuse, leisure, military, "natural", tourism, highway, railway) AS feature + FROM (SELECT + way, COALESCE(name, '') AS name, + ('aeroway_' || (CASE WHEN aeroway IN ('apron', 'aerodrome') THEN aeroway ELSE NULL END)) AS aeroway, + ('amenity_' || (CASE WHEN amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking', 'university', 'college', 'school', + 'hospital', 'kindergarten', 'grave_yard', 'prison', 'place_of_worship', 'clinic') + THEN amenity ELSE NULL END)) AS amenity, + ('landuse_' || (CASE WHEN landuse IN ('quarry', 'vineyard', 'orchard', 'cemetery', 'residential', 'garages', 'meadow', 'grass', + 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'greenhouse_horticulture', + 'recreation_ground', 'village_green', 'retail', 'industrial', 'railway', 'commercial', + 'brownfield', 'landfill', 'construction') THEN landuse ELSE NULL END)) AS landuse, + ('leisure_' || (CASE WHEN leisure IN ('swimming_pool', 'playground', 'park', 'recreation_ground', 'common', 'garden', + 'golf_course', 'miniature_golf', 'picnic_table', 'sports_centre', 'stadium', 'pitch', + 'track', 'dog_park') THEN leisure ELSE NULL END)) AS leisure, + ('military_' || (CASE WHEN military IN ('danger_area') THEN military ELSE NULL END)) AS military, + ('natural_' || (CASE WHEN "natural" IN ('beach', 'shoal', 'heath', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub') THEN "natural" ELSE NULL END)) AS "natural", + ('wetland_' || (CASE WHEN "natural" IN ('wetland', 'marsh', 'mud') THEN (CASE WHEN "natural" IN ('marsh', 'mud') THEN "natural" ELSE wetland END) ELSE NULL END)) AS wetland, + ('power_' || (CASE WHEN power IN ('station', 'sub_station', 'substation', 'generator') THEN power ELSE NULL END)) AS power, + ('tourism_' || (CASE WHEN tourism IN ('attraction', 'camp_site', 'caravan_site', 'picnic_site') THEN tourism ELSE NULL END)) AS tourism, + ('highway_' || (CASE WHEN highway IN ('services', 'rest_area') THEN highway ELSE NULL END)) AS highway, + ('railway_' || (CASE WHEN railway = 'station' THEN railway ELSE NULL END)) AS railway, + CASE WHEN religion IN ('christian', 'jewish') THEN religion ELSE 'INT-generic'::text END AS religion, + way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels + FROM planet_osm_polygon + WHERE (landuse IS NOT NULL + OR leisure IS NOT NULL + OR aeroway IN ('apron', 'aerodrome') + OR amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking', 'university', 'college', 'school', 'hospital', 'kindergarten', + 'grave_yard', 'place_of_worship', 'prison', 'clinic') + OR military IN ('danger_area') + OR "natural" IN ('beach', 'shoal', 'heath', 'mud', 'marsh', 'wetland', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub') + OR power IN ('station', 'sub_station', 'substation', 'generator') + OR tourism IN ('attraction', 'camp_site', 'caravan_site', 'picnic_site') + OR highway IN ('services', 'rest_area') + OR railway = 'station') + AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real + ORDER BY CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END, way_area DESC + ) AS landcover + ) AS features + properties: + minzoom: 10 + advanced: {} + - id: "landcover-line" + name: "landcover-line" + class: "" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way + FROM planet_osm_line + WHERE man_made = 'cutline' + ) AS landcover_line + advanced: {} + properties: + minzoom: 14 + - id: "water-lines-casing" + name: "water-lines-casing" + class: "" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, waterway, intermittent, + CASE WHEN tunnel IN ('yes', 'culvert') THEN 'yes' ELSE 'no' END AS int_tunnel + FROM planet_osm_line + WHERE waterway IN ('stream', 'drain', 'ditch') + ) AS water_lines_casing + properties: + minzoom: 13 + advanced: {} + - id: "water-lines-low-zoom" + name: "water-lines-low-zoom" + class: "" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + waterway, + intermittent + FROM planet_osm_line + WHERE waterway = 'river' + ) AS water_lines_low_zoom + properties: + minzoom: 8 + maxzoom: 11 + advanced: {} + - id: "icesheet-poly" + name: "icesheet-poly" + class: "" + geometry: "polygon" + <<: *extents + Datasource: + file: "data/antarctica-icesheet-polygons-3857/icesheet_polygons.shp" + type: "shape" + properties: + minzoom: 4 + advanced: {} + - id: "water-areas" + name: "water-areas" + class: "" + geometry: "polygon" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + "natural", + waterway, + landuse, + name, + way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels + FROM planet_osm_polygon + WHERE + (waterway IN ('dock', 'riverbank', 'canal') + OR landuse IN ('reservoir', 'basin') + OR "natural" IN ('water', 'glacier')) + AND building IS NULL + AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real + ORDER BY z_order, way_area DESC + ) AS water_areas + properties: + minzoom: 4 + advanced: {} + - id: "landcover-area-symbols" + name: "landcover-area-symbols" + class: "" + geometry: "polygon" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, surface, + COALESCE(CASE WHEN landuse = 'forest' THEN 'wood' ELSE NULL END, "natural") AS "natural", + CASE WHEN "natural" IN ('marsh', 'mud') + THEN "natural" + ELSE CASE WHEN ("natural" = 'wetland' AND wetland IS NULL) + THEN 'wetland' + ELSE CASE WHEN ("natural" = 'wetland') + THEN wetland + ELSE NULL + END + END + END AS int_wetland + FROM planet_osm_polygon + WHERE ("natural" IN ('marsh', 'mud', 'wetland', 'wood', 'beach', 'shoal', 'reef', 'scrub') OR landuse = 'forest') + AND building IS NULL + AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real + ORDER BY z_order, way_area DESC + ) AS landcover_area_symbols + properties: + minzoom: 10 + advanced: {} + - id: "icesheet-outlines" + name: "icesheet-outlines" + class: "" + geometry: "linestring" + <<: *extents + Datasource: + file: "data/antarctica-icesheet-outlines-3857/icesheet_outlines.shp" + type: "shape" + properties: + minzoom: 4 + advanced: {} + - id: "water-lines" + name: "water-lines" + class: "water-lines" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, waterway, name, intermittent, + CASE WHEN tunnel IN ('yes', 'culvert') THEN 'yes' ELSE 'no' END AS int_tunnel, + 'no' AS bridge + FROM planet_osm_line + WHERE waterway IN ('river', 'canal', 'derelict_canal', 'stream', 'drain', 'ditch', 'wadi') + AND (bridge IS NULL OR bridge NOT IN ('yes', 'aqueduct')) + ORDER BY z_order + ) AS water_lines + properties: + minzoom: 12 + advanced: {} + - id: "water-barriers-line" + name: "water-barriers-line" + class: "" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + waterway, + name + FROM planet_osm_line + WHERE waterway IN ('dam', 'weir', 'lock_gate') + ) AS water_barriers_line + advanced: {} + properties: + minzoom: 13 + - id: "water-barriers-poly" + name: "water-barriers-poly" + class: "" + geometry: "polygon" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + waterway, + name + FROM planet_osm_polygon + WHERE waterway IN ('dam', 'weir', 'lock_gate') + ) AS water_barriers_poly + advanced: {} + properties: + minzoom: 13 + - id: "marinas-area" + name: "marinas-area" + class: "" + geometry: "polygon" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way + FROM planet_osm_polygon + WHERE leisure = 'marina' + ) AS marinas_area + properties: + minzoom: 14 + advanced: {} + - id: "piers-poly" + name: "piers-poly" + class: "" + geometry: "polygon" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, man_made + FROM planet_osm_polygon + WHERE man_made IN ('pier', 'breakwater', 'groyne') + ) AS piers_poly + properties: + minzoom: 12 + advanced: {} + - id: "piers-line" + name: "piers-line" + class: "" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, man_made + FROM planet_osm_line + WHERE man_made IN ('pier', 'breakwater', 'groyne') + ) AS piers_line + properties: + minzoom: 12 + advanced: {} + - id: "water-barriers-point" + name: "water-barriers-point" + class: "" + geometry: "point" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, waterway + FROM planet_osm_point + WHERE waterway IN ('dam', 'weir', 'lock_gate') + ) AS water_barriers_points + properties: + minzoom: 17 + advanced: {} + - id: "bridge" + name: "bridge" + class: "" + geometry: "polygon" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels, + man_made, + name + FROM planet_osm_polygon + WHERE man_made = 'bridge' + ) AS bridge + properties: + minzoom: 12 + advanced: {} + - id: "buildings" + name: "buildings" + class: "" + geometry: "polygon" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + building + FROM planet_osm_polygon + WHERE building IS NOT NULL + AND building != 'no' + AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real + ORDER BY z_order, way_area DESC + ) AS buildings + properties: + minzoom: 13 + advanced: {} + - id: "buildings-major" + name: "buildings-major" + class: "" + geometry: "polygon" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + building, + amenity, + aeroway + FROM planet_osm_polygon + WHERE building IS NOT NULL + AND building != 'no' + AND (aeroway = 'terminal' OR amenity = 'place_of_worship' OR building = 'train_station') + AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real + ORDER BY z_order, way_area DESC) + AS buildings_major + properties: + minzoom: 13 + advanced: {} + - id: "tunnels" + name: "tunnels" + class: "tunnels-fill tunnels-casing access" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + # This query is quite large, having to deal with both roads, railways and + # runways. To allow for ways that are both railways and roads, a UNION + # ALL is present, and to use an ordering different than current osm2pgsql + # an order is generated in SQL. + table: |- + (SELECT + way, + (CASE WHEN substr(feature, length(feature)-3, 4) = 'link' THEN substr(feature, 0, length(feature)-4) ELSE feature END) AS feature, + horse, + foot, + bicycle, + tracktype, + int_surface, + access, + construction, + service, + link, + layernotnull + FROM ( -- subselect that contains both roads and rail/aero + SELECT + way, + ('highway_' || highway) AS feature, --only motorway to tertiary links are accepted later on + horse, + foot, + bicycle, + tracktype, + CASE WHEN surface IN ('unpaved', 'compacted', 'dirt', 'earth', 'fine_gravel', 'grass', 'grass_paver', 'gravel', 'ground', + 'mud', 'pebblestone', 'salt', 'sand', 'woodchips', 'clay') THEN 'unpaved' + WHEN surface IN ('paved', 'asphalt', 'cobblestone', 'cobblestone:flattened', 'sett', 'concrete', 'concrete:lanes', + 'concrete:plates', 'paving_stones', 'metal', 'wood') THEN 'paved' + ELSE NULL + END AS int_surface, + CASE WHEN access IN ('destination') THEN 'destination'::text + WHEN access IN ('no', 'private') THEN 'no'::text + ELSE NULL + END AS access, + construction, + CASE + WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text + ELSE 'INT-normal'::text + END AS service, + CASE + WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes' + ELSE 'no' + END AS link, + CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull + FROM planet_osm_line + WHERE (tunnel = 'yes' OR tunnel = 'building_passage' OR covered = 'yes') + AND highway IS NOT NULL -- end of road select + UNION ALL + SELECT + way, + COALESCE( + ('railway_' || (CASE WHEN railway = 'preserved' AND service IN ('spur', 'siding', 'yard') THEN 'INT-preserved-ssy'::text + WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' + WHEN (railway = 'tram' AND service IN ('spur', 'siding', 'yard')) THEN 'tram-service' ELSE railway END)), + ('aeroway_' || aeroway) + ) AS feature, + horse, + foot, + bicycle, + tracktype, + 'null', + CASE + WHEN access IN ('destination') THEN 'destination'::text + WHEN access IN ('no', 'private') THEN 'no'::text + ELSE NULL + END AS access, + construction, + CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service, + 'no' AS link, + CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull + FROM planet_osm_line + WHERE (tunnel = 'yes' OR tunnel = 'building_passage' OR covered = 'yes') + AND (railway IS NOT NULL OR aeroway IS NOT NULL) -- end of rail/aero select + ) AS features + JOIN (VALUES -- this join is also putting a condition on what is selected. features not matching it do not make it into the results. + ('railway_rail', 440), + ('railway_INT-preserved-ssy', 430), + ('railway_INT-spur-siding-yard', 430), + ('railway_subway', 420), + ('railway_narrow_gauge', 420), + ('railway_light_rail', 420), + ('railway_preserved', 420), + ('railway_funicular', 420), + ('railway_monorail', 420), + ('railway_miniature', 420), + ('railway_turntable', 420), + ('railway_tram', 410), + ('railway_tram-service', 405), + ('railway_disused', 400), + ('railway_construction', 400), + ('highway_motorway', 380), + ('highway_trunk', 370), + ('highway_primary', 360), + ('highway_secondary', 350), + ('highway_tertiary', 340), + ('highway_residential', 330), + ('highway_unclassified', 330), + ('highway_road', 330), + ('highway_living_street', 320), + ('highway_pedestrian', 310), + ('highway_raceway', 300), + ('highway_motorway_link', 240), + ('highway_trunk_link', 230), + ('highway_primary_link', 220), + ('highway_secondary_link', 210), + ('highway_tertiary_link', 200), + ('highway_service', 150), + ('highway_track', 110), + ('highway_path', 100), + ('highway_footway', 100), + ('highway_bridleway', 100), + ('highway_cycleway', 100), + ('highway_steps', 100), + ('highway_platform', 90), + ('railway_platform', 90), + ('aeroway_runway', 60), + ('aeroway_taxiway', 50), + ('highway_construction', 10) + ) AS ordertable (feature, prio) + USING (feature) + ORDER BY + layernotnull, + prio, + CASE WHEN access IN ('no', 'private') THEN 0 WHEN access IN ('destination') THEN 1 ELSE 2 END, + CASE WHEN int_surface IN ('unpaved') THEN 0 ELSE 2 END + ) AS tunnels + properties: + group-by: "layernotnull" + minzoom: 9 + advanced: {} + - id: "landuse-overlay" + name: "landuse-overlay" + class: "" + geometry: "polygon" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + landuse, + way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels + FROM planet_osm_polygon + WHERE landuse = 'military' + AND building IS NULL + ) AS landuse_overlay + properties: + minzoom: 7 + advanced: {} + - id: "line-barriers" + name: "line-barriers" + class: "barriers" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, COALESCE(historic, barrier) AS feature + FROM (SELECT way, + ('barrier_' || (CASE WHEN barrier IN ('chain', 'city_wall', 'embankment', 'ditch', 'fence', 'guard_rail', + 'handrail', 'hedge', 'kerb', 'retaining_wall', 'wall') THEN barrier ELSE NULL END)) AS barrier, + ('historic_' || (CASE WHEN historic = 'citywalls' THEN historic ELSE NULL END)) AS historic + FROM planet_osm_line + WHERE barrier IN ('chain', 'city_wall', 'embankment', 'ditch', 'fence', 'guard_rail', + 'handrail', 'hedge', 'kerb', 'retaining_wall', 'wall') + OR historic = 'citywalls' + AND (waterway IS NULL OR waterway NOT IN ('river', 'canal', 'derelict_canal', 'stream', 'drain', 'ditch', 'wadi')) + ) AS features + ) AS line_barriers + properties: + minzoom: 14 + advanced: {} + - id: "cliffs" + name: "cliffs" + class: "" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, "natural", man_made + FROM planet_osm_line + WHERE "natural" = 'cliff' OR man_made = 'embankment' + ) AS cliffs + properties: + minzoom: 13 + advanced: {} + - id: "area-barriers" + name: "area-barriers" + class: "barriers" + geometry: "polygon" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, barrier AS feature + FROM (SELECT way, + ('barrier_' || barrier) AS barrier + FROM planet_osm_polygon + WHERE barrier IS NOT NULL + ) AS features + ) AS area_barriers + properties: + minzoom: 16 + advanced: {} + - id: "ferry-routes" + name: "ferry-routes" + class: "" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way + FROM planet_osm_line + WHERE route = 'ferry' + ) AS ferry_routes + properties: + minzoom: 7 + advanced: {} + - id: "turning-circle-casing" + name: "turning-circle-casing" + class: "" + geometry: "point" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT DISTINCT ON (p.way) + p.way AS way, l.highway AS int_tc_type, + CASE WHEN l.service IN ('parking_aisle', 'drive-through', 'driveway') + THEN 'INT-minor'::text + ELSE 'INT-normal'::text + END AS int_tc_service + FROM planet_osm_point p + JOIN planet_osm_line l ON ST_DWithin(p.way, l.way, 0.1) -- Assumes Mercator + JOIN (VALUES + ('tertiary', 1), + ('unclassified', 2), + ('residential', 3), + ('living_street', 4), + ('service', 5) + ) AS v (highway, prio) + ON v.highway=l.highway + WHERE p.highway = 'turning_circle' + OR p.highway = 'turning_loop' + ORDER BY p.way, v.prio + ) AS turning_circle_casing + properties: + minzoom: 15 + advanced: {} + - id: "highway-area-casing" + name: "highway-area-casing" + class: "" + geometry: "polygon" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + COALESCE(( + 'highway_' || (CASE WHEN highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'cycleway', 'track', 'path', 'platform') THEN highway ELSE NULL END)), + ('railway_' || (CASE WHEN railway IN ('platform') THEN railway ELSE NULL END)) + ) AS feature + FROM planet_osm_polygon + WHERE highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'track', 'path', 'platform') + OR railway IN ('platform') + ORDER BY z_order, way_area DESC + ) AS highway_area_casing + properties: + minzoom: 14 + advanced: {} + - name: "roads-casing" + id: "roads-casing" + class: "roads-casing" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + (CASE WHEN substr(feature, length(feature)-3, 4) = 'link' THEN substr(feature, 0, length(feature)-4) ELSE feature END) AS feature, + horse, + foot, + bicycle, + tracktype, + int_surface, + access, + construction, + service, + link, + layernotnull + FROM ( -- subselect that contains both roads and rail/aero + SELECT + way, + ('highway_' || highway) AS feature, --only motorway to tertiary links are accepted later on + horse, + foot, + bicycle, + tracktype, + CASE WHEN surface IN ('unpaved', 'compacted', 'dirt', 'earth', 'fine_gravel', 'grass', 'grass_paver', 'gravel', 'ground', + 'mud', 'pebblestone', 'salt', 'sand', 'woodchips', 'clay') THEN 'unpaved' + WHEN surface IN ('paved', 'asphalt', 'cobblestone', 'cobblestone:flattened', 'sett', 'concrete', 'concrete:lanes', + 'concrete:plates', 'paving_stones', 'metal', 'wood') THEN 'paved' + ELSE NULL + END AS int_surface, + CASE WHEN access IN ('destination') THEN 'destination'::text + WHEN access IN ('no', 'private') THEN 'no'::text + ELSE NULL + END AS access, + construction, + CASE + WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text + ELSE 'INT-normal'::text + END AS service, + CASE + WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes' + ELSE 'no' + END AS link, + CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull + FROM planet_osm_line + WHERE (tunnel IS NULL OR NOT tunnel IN ('yes', 'building_passage')) + AND (covered IS NULL OR NOT covered = 'yes') + AND (bridge IS NULL OR NOT bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct')) + AND highway IS NOT NULL -- end of road select + UNION ALL + SELECT + way, + COALESCE( + ('railway_' || (CASE WHEN railway = 'preserved' AND service IN ('spur', 'siding', 'yard') THEN 'INT-preserved-ssy'::text + WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' + WHEN (railway = 'tram' AND service IN ('spur', 'siding', 'yard')) THEN 'tram-service' ELSE railway END)), + ('aeroway_' || aeroway) + ) AS feature, + horse, + foot, + bicycle, + tracktype, + 'null', + CASE + WHEN access IN ('destination') THEN 'destination'::text + WHEN access IN ('no', 'private') THEN 'no'::text + ELSE NULL + END AS access, + construction, + CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service, + 'no' AS link, + CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull + FROM planet_osm_line + WHERE (tunnel IS NULL OR NOT tunnel IN ('yes', 'building_passage')) + AND (covered IS NULL OR NOT covered = 'yes') + AND (bridge IS NULL OR NOT bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct')) + AND (railway IS NOT NULL OR aeroway IS NOT NULL) -- end of rail/aero select + ) AS features + JOIN (VALUES -- this join is also putting a condition on what is selected. features not matching it do not make it into the results. + ('railway_rail', 440), + ('railway_INT-preserved-ssy', 430), + ('railway_INT-spur-siding-yard', 430), + ('railway_subway', 420), + ('railway_narrow_gauge', 420), + ('railway_light_rail', 420), + ('railway_preserved', 420), + ('railway_funicular', 420), + ('railway_monorail', 420), + ('railway_miniature', 420), + ('railway_turntable', 420), + ('railway_tram', 410), + ('railway_tram-service', 405), + ('railway_disused', 400), + ('railway_construction', 400), + ('highway_motorway', 380), + ('highway_trunk', 370), + ('highway_primary', 360), + ('highway_secondary', 350), + ('highway_tertiary', 340), + ('highway_residential', 330), + ('highway_unclassified', 330), + ('highway_road', 330), + ('highway_living_street', 320), + ('highway_pedestrian', 310), + ('highway_raceway', 300), + ('highway_motorway_link', 240), + ('highway_trunk_link', 230), + ('highway_primary_link', 220), + ('highway_secondary_link', 210), + ('highway_tertiary_link', 200), + ('highway_service', 150), + ('highway_track', 110), + ('highway_path', 100), + ('highway_footway', 100), + ('highway_bridleway', 100), + ('highway_cycleway', 100), + ('highway_steps', 100), + ('highway_platform', 90), + ('railway_platform', 90), + ('aeroway_runway', 60), + ('aeroway_taxiway', 50), + ('highway_construction', 10) + ) AS ordertable (feature, prio) + USING (feature) + ORDER BY + layernotnull, + prio, + CASE WHEN access IN ('no', 'private') THEN 0 WHEN access IN ('destination') THEN 1 ELSE 2 END, + CASE WHEN int_surface IN ('unpaved') THEN 0 ELSE 2 END + ) AS roads_casing + properties: + minzoom: 9 + advanced: {} + - id: "highway-area-fill" + name: "highway-area-fill" + class: "" + # FIXME: No geometry? + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + COALESCE( + ('highway_' || (CASE WHEN highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'cycleway', 'living_street', + 'track', 'path', 'platform', 'services') THEN highway ELSE NULL END)), + ('railway_' || (CASE WHEN railway IN ('platform') THEN railway ELSE NULL END)), + (('aeroway_' || CASE WHEN aeroway IN ('runway', 'taxiway', 'helipad') THEN aeroway ELSE NULL END)) + ) AS feature + FROM planet_osm_polygon + WHERE highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'living_street', 'track', 'path', 'platform', 'services') + OR railway IN ('platform') + OR aeroway IN ('runway', 'taxiway', 'helipad') + ORDER BY z_order, way_area desc + ) AS highway_area_fill + properties: + minzoom: 14 + advanced: {} + - id: "roads-fill" + name: "roads-fill" + class: "roads-fill access" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + # This is one of the most complex layers, so it bears explaining in some detail + # It is necessary to + # - Have roads and railways in the same layer to get ordering right + # - Return two linestrings for ways which are both a road and railway + # - Compute z_order here, rather than rely on osm2pgsql z_order + table: |- + (SELECT + way, + (CASE WHEN substr(feature, length(feature)-3, 4) = 'link' THEN substr(feature, 0, length(feature)-4) ELSE feature END) AS feature, + horse, + foot, + bicycle, + tracktype, + int_surface, + access, + construction, + service, + link, + layernotnull + FROM ( -- begin "features" subselect that contains both roads and rail/aero + SELECT + way, + ('highway_' || highway) AS feature, -- only motorway to tertiary links are accepted later on + horse, + foot, + bicycle, + tracktype, + CASE WHEN surface IN ('unpaved', 'compacted', 'dirt', 'earth', 'fine_gravel', 'grass', 'grass_paver', 'gravel', 'ground', + 'mud', 'pebblestone', 'salt', 'sand', 'woodchips', 'clay') THEN 'unpaved' + WHEN surface IN ('paved', 'asphalt', 'cobblestone', 'cobblestone:flattened', 'sett', 'concrete', 'concrete:lanes', + 'concrete:plates', 'paving_stones', 'metal', 'wood') THEN 'paved' + ELSE NULL + END AS int_surface, + CASE WHEN access IN ('destination') THEN 'destination'::text + WHEN access IN ('no', 'private') THEN 'no'::text + ELSE NULL + END AS access, + construction, + CASE + WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text + ELSE 'INT-normal'::text + END AS service, + CASE + WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes' + ELSE 'no' + END AS link, + CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull + FROM planet_osm_line + WHERE (tunnel IS NULL OR NOT tunnel IN ('yes', 'building_passage')) + AND (covered IS NULL OR NOT covered = 'yes') + AND (bridge IS NULL OR NOT bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct')) + AND highway IS NOT NULL -- end of road select + UNION ALL + SELECT + way, + COALESCE( + ('railway_' || (CASE WHEN railway = 'preserved' AND service IN ('spur', 'siding', 'yard') THEN 'INT-preserved-ssy'::text + WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' + WHEN (railway = 'tram' AND service IN ('spur', 'siding', 'yard')) THEN 'tram-service' ELSE railway END)), + ('aeroway_' || aeroway) + ) AS feature, + horse, + foot, + bicycle, + tracktype, + 'null' AS surface, -- Should be a SQL NULL? + CASE + WHEN access IN ('destination') THEN 'destination'::text + WHEN access IN ('no', 'private') THEN 'no'::text + ELSE NULL + END AS access, + construction, + CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service, + 'no' AS link, + CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull + FROM planet_osm_line + WHERE (tunnel IS NULL OR NOT tunnel IN ('yes', 'building_passage')) + AND (covered IS NULL OR NOT covered = 'yes') + AND (bridge IS NULL OR NOT bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct')) + AND (railway IS NOT NULL OR aeroway IS NOT NULL) -- end of rail/aero select + ) AS features + JOIN (VALUES -- this join is also putting a condition on what is selected. features not matching it do not make it into the results. + ('railway_rail', 440), + ('railway_INT-preserved-ssy', 430), + ('railway_INT-spur-siding-yard', 430), + ('railway_subway', 420), + ('railway_narrow_gauge', 420), + ('railway_light_rail', 420), + ('railway_preserved', 420), + ('railway_funicular', 420), + ('railway_monorail', 420), + ('railway_miniature', 420), + ('railway_turntable', 420), + ('railway_tram', 410), + ('railway_tram-service', 405), + ('railway_disused', 400), + ('railway_construction', 400), + ('highway_motorway', 380), + ('highway_trunk', 370), + ('highway_primary', 360), + ('highway_secondary', 350), + ('highway_tertiary', 340), + ('highway_residential', 330), + ('highway_unclassified', 330), + ('highway_road', 330), + ('highway_living_street', 320), + ('highway_pedestrian', 310), + ('highway_raceway', 300), + ('highway_motorway_link', 240), + ('highway_trunk_link', 230), + ('highway_primary_link', 220), + ('highway_secondary_link', 210), + ('highway_tertiary_link', 200), + ('highway_service', 150), + ('highway_track', 110), + ('highway_path', 100), + ('highway_footway', 100), + ('highway_bridleway', 100), + ('highway_cycleway', 100), + ('highway_steps', 100), + ('highway_platform', 90), + ('railway_platform', 90), + ('aeroway_runway', 60), + ('aeroway_taxiway', 50), + ('highway_construction', 10) + ) AS ordertable (feature, prio) + USING (feature) + ORDER BY + layernotnull, + prio, + CASE WHEN access IN ('no', 'private') THEN 0 WHEN access IN ('destination') THEN 1 ELSE 2 END, + CASE WHEN int_surface IN ('unpaved') THEN 0 ELSE 2 END + ) AS roads_fill + properties: + minzoom: 10 + advanced: {} + - id: "turning-circle-fill" + name: "turning-circle-fill" + class: "" + geometry: "point" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + DISTINCT on (p.way) + p.way AS way, l.highway AS int_tc_type, + CASE WHEN l.service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text + ELSE 'INT-normal'::text END AS int_tc_service + FROM planet_osm_point p + JOIN planet_osm_line l + ON ST_DWithin(p.way, l.way, 0.1) + JOIN (VALUES + ('tertiary', 1), + ('unclassified', 2), + ('residential', 3), + ('living_street', 4), + ('service', 5), + ('track', 6) + ) AS v (highway, prio) + ON v.highway=l.highway + WHERE p.highway = 'turning_circle' OR p.highway = 'turning_loop' + ORDER BY p.way, v.prio + ) AS turning_circle_fill + properties: + minzoom: 15 + advanced: {} + - id: "aerialways" + name: "aerialways" + class: "" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + aerialway + FROM planet_osm_line + WHERE aerialway IS NOT NULL + ) AS aerialways + properties: + minzoom: 12 + advanced: {} + - id: "roads-low-zoom" + name: "roads-low-zoom" + class: "" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + COALESCE( + ('highway_' || (CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN substr(highway, 0, length(highway)-4) ELSE highway end)), + ('railway_' || (CASE WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' + WHEN railway IN ('rail', 'tram', 'light_rail', 'funicular', 'narrow_gauge') THEN railway ELSE NULL END)) + ) AS feature, + CASE WHEN tunnel = 'yes' OR tunnel = 'building_passage' OR covered = 'yes' THEN 'yes' ELSE 'no' END AS int_tunnel, + CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes' ELSE 'no' END AS link, + CASE WHEN surface IN ('unpaved', 'compacted', 'dirt', 'earth', 'fine_gravel', 'grass', 'grass_paver', 'gravel', 'ground', + 'mud', 'pebblestone', 'salt', 'sand', 'woodchips', 'clay') THEN 'unpaved' + WHEN surface IN ('paved', 'asphalt', 'cobblestone', 'cobblestone:flattened', 'sett', 'concrete', 'concrete:lanes', + 'concrete:plates', 'paving_stones', 'metal', 'wood') THEN 'paved' + ELSE NULL + END AS int_surface + FROM planet_osm_roads + WHERE highway IS NOT NULL + OR (railway IS NOT NULL AND railway != 'preserved' + AND (service IS NULL OR service NOT IN ('spur', 'siding', 'yard'))) + ORDER BY z_order + ) AS roads_low_zoom + properties: + minzoom: 5 + maxzoom: 9 + advanced: {} + - id: "waterway-bridges" + name: "waterway-bridges" + class: "water-lines" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + waterway, + name, + intermittent, + CASE WHEN tunnel IN ('yes', 'culvert') THEN 'yes' ELSE 'no' END AS int_tunnel, + 'yes' AS bridge + FROM planet_osm_line + WHERE waterway IN ('river', 'canal', 'derelict_canal', 'stream', 'drain', 'ditch', 'wadi') + AND bridge IN ('yes', 'aqueduct') + ORDER BY z_order + ) AS waterway_bridges + properties: + minzoom: 15 + advanced: {} + - id: "bridges" + name: "bridges" + class: "bridges-fill bridges-casing access" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + (CASE WHEN substr(feature, length(feature)-3, 4) = 'link' THEN substr(feature, 0, length(feature)-4) ELSE feature END) AS feature, + horse, + foot, + bicycle, + tracktype, + int_surface, + access, + construction, + service, + link, + layernotnull + FROM ( -- subselect that contains both roads and rail/aero + SELECT + way, + ('highway_' || highway) AS feature, --only motorway to tertiary links are accepted later on + horse, + foot, + bicycle, + tracktype, + CASE WHEN surface IN ('unpaved', 'compacted', 'dirt', 'earth', 'fine_gravel', 'grass', 'grass_paver', 'gravel', 'ground', + 'mud', 'pebblestone', 'salt', 'sand', 'woodchips', 'clay') THEN 'unpaved' + WHEN surface IN ('paved', 'asphalt', 'cobblestone', 'cobblestone:flattened', 'sett', 'concrete', 'concrete:lanes', + 'concrete:plates', 'paving_stones', 'metal', 'wood') THEN 'paved' + ELSE NULL + END AS int_surface, + CASE WHEN access IN ('destination') THEN 'destination'::text + WHEN access IN ('no', 'private') THEN 'no'::text + ELSE NULL + END AS access, + construction, + CASE + WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text + ELSE 'INT-normal'::text + END AS service, + CASE + WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes' + ELSE 'no' + END AS link, + CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull + FROM planet_osm_line + WHERE bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct') + AND highway IS NOT NULL -- end of road select + UNION ALL + SELECT + way, + COALESCE( + ('railway_' || (CASE WHEN railway = 'preserved' AND service IN ('spur', 'siding', 'yard') THEN 'INT-preserved-ssy'::text + WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' + WHEN (railway = 'tram' AND service IN ('spur', 'siding', 'yard')) THEN 'tram-service' ELSE railway END)), + ('aeroway_' || aeroway) + ) AS feature, + horse, + foot, + bicycle, + tracktype, + 'null', + CASE + WHEN access IN ('destination') THEN 'destination'::text + WHEN access IN ('no', 'private') THEN 'no'::text + ELSE NULL + END AS access, + construction, + CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service, + 'no' AS link, + CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull + FROM planet_osm_line + WHERE bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct') + AND (railway IS NOT NULL OR aeroway IS NOT NULL) -- end of rail/aero select + ) AS features + JOIN (VALUES -- this join is also putting a condition on what is selected. features not matching it do not make it into the results. + ('railway_rail', 440), + ('railway_INT-preserved-ssy', 430), + ('railway_INT-spur-siding-yard', 430), + ('railway_subway', 420), + ('railway_narrow_gauge', 420), + ('railway_light_rail', 420), + ('railway_preserved', 420), + ('railway_funicular', 420), + ('railway_monorail', 420), + ('railway_miniature', 420), + ('railway_turntable', 420), + ('railway_tram', 410), + ('railway_tram-service', 405), + ('railway_disused', 400), + ('railway_construction', 400), + ('highway_motorway', 380), + ('highway_trunk', 370), + ('highway_primary', 360), + ('highway_secondary', 350), + ('highway_tertiary', 340), + ('highway_residential', 330), + ('highway_unclassified', 330), + ('highway_road', 330), + ('highway_living_street', 320), + ('highway_pedestrian', 310), + ('highway_raceway', 300), + ('highway_motorway_link', 240), + ('highway_trunk_link', 230), + ('highway_primary_link', 220), + ('highway_secondary_link', 210), + ('highway_tertiary_link', 200), + ('highway_service', 150), + ('highway_track', 110), + ('highway_path', 100), + ('highway_footway', 100), + ('highway_bridleway', 100), + ('highway_cycleway', 100), + ('highway_steps', 100), + ('highway_platform', 90), + ('railway_platform', 90), + ('aeroway_runway', 60), + ('aeroway_taxiway', 50), + ('highway_construction', 10) + ) AS ordertable (feature, prio) + USING (feature) + ORDER BY + layernotnull, + prio, + CASE WHEN access IN ('no', 'private') THEN 0 WHEN access IN ('destination') THEN 1 ELSE 2 END, + CASE WHEN int_surface IN ('unpaved') THEN 0 ELSE 2 END + ) AS bridges + properties: + group-by: "layernotnull" + minzoom: 9 + advanced: {} + - id: "guideways" + name: "guideways" + class: "" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way + FROM planet_osm_line + WHERE highway = 'bus_guideway' + ) AS guideways + properties: + minzoom: 13 + advanced: {} + - name: "admin-low-zoom" + id: "admin-low-zoom" + class: "" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + admin_level + FROM planet_osm_roads + WHERE boundary = 'administrative' + AND admin_level IN ('0', '1', '2', '3', '4') + AND osm_id < 0 + ORDER BY admin_level DESC + ) AS admin_low_zoom + properties: + minzoom: 4 + maxzoom: 10 + advanced: {} + - id: "admin-mid-zoom" + name: "admin-mid-zoom" + class: "" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + admin_level + FROM planet_osm_roads + WHERE boundary = 'administrative' + AND admin_level IN ('0', '1', '2', '3', '4', '5', '6', '7', '8') + AND osm_id < 0 + ORDER BY admin_level DESC + ) AS admin_mid_zoom + properties: + minzoom: 11 + maxzoom: 12 + advanced: {} + - id: "admin-high-zoom" + name: "admin-high-zoom" + class: "" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + admin_level + FROM planet_osm_roads + WHERE boundary = 'administrative' + AND admin_level IN ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10') + AND osm_id < 0 + ORDER BY admin_level::integer DESC -- With 10 as a valid value, we need to do a numeric ordering, not a text ordering + ) AS admin_high_zoom + properties: + minzoom: 13 + advanced: {} + - id: "power-minorline" + name: "power-minorline" + class: "" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way + FROM planet_osm_line + WHERE power = 'minor_line' + ) AS power_minorline + properties: + minzoom: 16 + advanced: {} + - id: "power-line" + name: "power-line" + class: "" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way + FROM planet_osm_line + WHERE power = 'line' + ) AS power_line + properties: + minzoom: 14 + advanced: {} + - id: "nature-reserve-boundaries" + name: "nature-reserve-boundaries" + class: "" + geometry: "polygon" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + name, + boundary, + way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels + FROM planet_osm_polygon + WHERE (boundary = 'national_park' OR leisure = 'nature_reserve') + AND building IS NULL + AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real + ) AS national_park_boundaries + properties: + minzoom: 7 + advanced: {} + - id: "tourism-boundary" + name: "tourism-boundary" + class: "" + geometry: "polygon" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels, + name, + tourism + FROM planet_osm_polygon + WHERE tourism = 'theme_park' + OR tourism = 'zoo' + ) AS tourism_boundary + properties: + minzoom: 10 + advanced: {} + - id: "trees" + name: "trees" + class: "" + geometry: "polygon" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, "natural" + FROM planet_osm_point + WHERE "natural" = 'tree' + UNION ALL + SELECT + way, "natural" + FROM planet_osm_line + WHERE "natural" = 'tree_row' + ) AS trees + properties: + minzoom: 16 + advanced: {} + - id: "country-names" + name: "country-names" + class: "country" + geometry: "point" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels, + name + FROM planet_osm_polygon + WHERE boundary = 'administrative' + AND admin_level = '2' + AND name IS NOT NULL + AND way_area > 100*!pixel_width!::real*!pixel_height!::real + ORDER BY way_area DESC + ) AS country_names + properties: + minzoom: 2 + - id: "capital-names" + name: "capital-names" + class: "" + geometry: "point" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + name, + CASE + WHEN (population ~ '^[0-9]{1,8}$') THEN population::INTEGER ELSE 0 + END as population, + round(ascii(md5(osm_id::text)) / 55) AS dir -- base direction factor on geometry to be consistent across metatiles + FROM planet_osm_point + WHERE place IN ('city', 'town') + AND name IS NOT NULL + AND capital = 'yes' + AND admin_level = '2' + ORDER BY population DESC + ) AS capital_names + properties: + minzoom: 3 + maxzoom: 15 + advanced: {} + - id: "state-names" + name: "state-names" + class: "state" + geometry: "point" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels, + name, + ref + FROM planet_osm_polygon + WHERE boundary = 'administrative' + AND admin_level = '4' + AND name IS NOT NULL + AND way_area > 100*!pixel_width!::real*!pixel_height!::real + ORDER BY way_area DESC + ) AS state_names + properties: + minzoom: 4 + advanced: {} + - id: "placenames-medium" + name: "placenames-medium" + class: "" + geometry: "point" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + name, + score, + CASE + WHEN (place = 'city') THEN 1 + ELSE 2 + END as category, + round(ascii(md5(osm_id::text)) / 55) AS dir -- base direction factor on geometry to be consistent across metatiles + FROM + (SELECT + osm_id, + way, + place, + name, + ( + (CASE + WHEN (population ~ '^[0-9]{1,8}$') THEN population::INTEGER + WHEN (place = 'city') THEN 100000 + WHEN (place = 'town') THEN 1000 + ELSE 1 + END) + * + (CASE + WHEN (capital = '4' OR (capital = 'yes' AND admin_level = '4')) THEN 2 + ELSE 1 + END) + ) AS score + FROM planet_osm_point + WHERE place IN ('city', 'town') + AND name IS NOT NULL + AND (capital IS NULL OR capital != 'yes' OR (capital = 'yes' AND (admin_level IS NULL OR admin_level != '2'))) + ) as p + ORDER BY score DESC, length(name) DESC, name + ) AS placenames_medium + properties: + minzoom: 4 + maxzoom: 15 + advanced: {} + - id: "placenames-small" + name: "placenames-small" + class: "" + geometry: "point" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + place, + name + FROM planet_osm_point + WHERE place IN ('suburb', 'village', 'hamlet', 'neighbourhood', 'locality', 'isolated_dwelling', 'farm') + AND name IS NOT NULL + ORDER BY CASE + WHEN place = 'suburb' THEN 3 + WHEN place = 'village' THEN 4 + WHEN place = 'hamlet' THEN 5 + WHEN place = 'neighbourhood' THEN 6 + WHEN place = 'locality' THEN 7 + WHEN place = 'isolated_dwelling' THEN 8 + WHEN place = 'farm' THEN 9 + END ASC, length(name) DESC, name + ) AS placenames_small + properties: + minzoom: 12 + advanced: {} + - id: "stations" + class: "stations" + name: "stations" + geometry: "point" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + name, + ref, + railway, + aerialway, + CASE railway + WHEN 'station' THEN 1 + WHEN 'subway_entrance' THEN 3 + ELSE 2 + END + AS prio + FROM planet_osm_point + WHERE railway IN ('station', 'halt', 'tram_stop', 'subway_entrance') + OR aerialway = 'station' + ORDER BY prio + ) AS stations + properties: + minzoom: 12 + advanced: {} + - id: "stations-poly" + name: "stations-poly" + class: "stations" + geometry: "polygon" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + name, + ref, + railway, + aerialway + FROM planet_osm_polygon + WHERE railway IN ('station', 'halt', 'tram_stop') + OR aerialway = 'station' + ) AS stations_poly + properties: + minzoom: 12 + advanced: {} + - id: "amenity-points-poly" + name: "amenity-points-poly" + class: "points" + geometry: "polygon" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + COALESCE( + 'aeroway_' || CASE WHEN aeroway IN ('helipad', 'aerodrome') THEN aeroway ELSE NULL END, + 'tourism_' || CASE WHEN tourism IN ('artwork', 'alpine_hut', 'camp_site', 'caravan_site', 'chalet', 'wilderness_hut', 'guest_house', + 'hostel', 'hotel', 'motel', 'information', 'museum', 'picnic_site') THEN tourism ELSE NULL END, + 'amenity_' || CASE WHEN amenity IN ('shelter', 'atm', 'bank', 'bar', 'bicycle_rental', 'bus_station', 'cafe', + 'car_rental', 'car_wash', 'cinema', 'clinic', 'community_centre', 'fire_station', 'fountain', + 'fuel', 'hospital', 'ice_cream', 'embassy', 'library', 'courthouse', 'townhall', 'parking', + 'bicycle_parking', 'motorcycle_parking', 'pharmacy', 'doctors', 'dentist', 'place_of_worship', + 'police', 'post_box', 'post_office', 'pub', 'biergarten', 'recycling', 'restaurant', 'food_court', + 'fast_food', 'telephone', 'emergency_phone', 'taxi', 'theatre', 'toilets', 'drinking_water', + 'prison', 'hunting_stand', 'nightclub', 'veterinary', 'social_facility', + 'charging_station') THEN amenity ELSE NULL END, + 'shop_' || CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer', + 'confectionery', 'fashion', 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', + 'garden_centre', 'hairdresser', 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', + 'photo', 'photo_studio', 'photography', 'seafood', 'shoes', 'alcohol', 'gift', 'furniture', 'kiosk', + 'mobile_phone', 'motorcycle', 'musical_instrument', 'newsagent', 'optician', 'jewelry', 'jewellery', + 'electronics', 'chemist', 'toys', 'travel_agency', 'car_parts', 'greengrocer', 'farm', 'stationery', + 'laundry', 'dry_cleaning', 'beverages', 'perfumery', 'cosmetics', 'variety_store', 'wine', 'outdoor', + 'copyshop', 'sports', 'deli', 'tobacco', 'art', 'tea') THEN shop + WHEN shop IN ('no', 'vacant', 'closed', 'disused', 'empty') OR shop IS NULL THEN NULL ELSE 'other' END, + 'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table') THEN leisure ELSE NULL END, + 'man_made_' || CASE WHEN man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk') THEN man_made ELSE NULL END, + 'natural_' || CASE WHEN "natural" IN ('spring') THEN "natural" ELSE NULL END, + 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END, + 'highway_'|| CASE WHEN highway IN ('bus_stop', 'elevator', 'traffic_signals') THEN highway ELSE NULL END, + 'power_' || CASE WHEN power IN ('generator') THEN power ELSE NULL END, + 'tourism_' || CASE WHEN tourism IN ('viewpoint') THEN tourism ELSE NULL END + ) AS feature, + access, + religion, + denomination, + "generator:source", + power_source, + way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels + FROM planet_osm_polygon + -- The upcoming where clause is needed for performance only, as the CASE statements would end up doing the equivalent filtering + WHERE aeroway IN ('helipad', 'aerodrome') + OR tourism IN ('artwork', 'alpine_hut', 'camp_site', 'caravan_site', 'chalet', 'wilderness_hut', 'guest_house', 'hostel', + 'hotel', 'motel', 'information', 'museum', 'viewpoint', 'picnic_site') + OR amenity IN ('shelter', 'atm', 'bank', 'bar', 'bicycle_rental', 'bus_station', 'cafe', + 'car_rental', 'car_wash', 'cinema', 'clinic', 'community_centre', + 'fire_station', 'fountain', 'fuel', 'hospital', 'ice_cream', 'embassy', 'library', 'courthouse', + 'townhall', 'parking', 'bicycle_parking', 'motorcycle_parking', 'pharmacy', 'doctors', + 'dentist', 'place_of_worship', 'police', 'post_box', 'post_office', 'pub', 'biergarten', + 'recycling', 'restaurant', 'food_court', 'fast_food', 'telephone', 'emergency_phone', 'taxi', + 'theatre', 'toilets', 'drinking_water', 'prison', 'hunting_stand', 'nightclub', 'veterinary', + 'social_facility', 'charging_station') + OR shop IS NOT NULL -- skip checking a huge list and use a null check + OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table') + OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk') + OR "natural" IN ('spring') + OR historic IN ('memorial', 'monument', 'archaeological_site') + OR highway IN ('bus_stop', 'elevator', 'traffic_signals') + OR (power = 'generator' AND ("generator:source" = 'wind' OR power_source = 'wind')) + ORDER BY way_area desc + ) AS amenity_points_poly + properties: + minzoom: 10 + advanced: {} + - id: "amenity-points" + name: "amenity-points" + class: "points" + geometry: "point" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + COALESCE( + 'aeroway_' || CASE WHEN aeroway IN ('helipad', 'aerodrome') THEN aeroway ELSE NULL END, + 'tourism_' || CASE WHEN tourism IN ('artwork', 'alpine_hut', 'camp_site', 'caravan_site', 'chalet', 'wilderness_hut', 'guest_house', 'hostel', + 'hotel', 'motel', 'information', 'museum', 'picnic_site') THEN tourism ELSE NULL END, + 'amenity_' || CASE WHEN amenity IN ('shelter', 'atm', 'bank', 'bar', 'bicycle_rental', 'bus_station', 'cafe', + 'car_rental', 'car_wash', 'cinema', 'clinic', 'community_centre', 'fire_station', 'fountain', + 'fuel', 'hospital', 'ice_cream', 'embassy', 'library', 'courthouse', 'townhall', 'parking', + 'bicycle_parking', 'motorcycle_parking', 'pharmacy', 'doctors', 'dentist', 'place_of_worship', + 'police', 'post_box', 'post_office', 'pub', 'biergarten', 'recycling', 'restaurant', 'food_court', + 'fast_food', 'telephone', 'emergency_phone', 'taxi', 'theatre', 'toilets', 'drinking_water', + 'prison', 'hunting_stand', 'nightclub', 'veterinary', 'social_facility', + 'charging_station') THEN amenity ELSE NULL END, + 'shop_' || CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer', 'confectionery', + 'fashion', 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', 'garden_centre', + 'hairdresser', 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', 'photo', 'photo_studio', + 'photography', 'seafood', 'shoes', 'alcohol', 'gift', 'furniture', 'kiosk', 'mobile_phone', 'motorcycle', + 'musical_instrument', 'newsagent', 'optician', 'jewelry', 'jewellery', 'electronics', 'chemist', 'toys', + 'travel_agency', 'car_parts', 'greengrocer', 'farm', 'stationery', 'laundry', 'dry_cleaning', 'beverages', + 'perfumery', 'cosmetics', 'variety_store', 'wine', 'outdoor', 'copyshop', 'sports', 'deli', 'tobacco', 'art', 'tea') THEN shop + WHEN shop IN ('no', 'vacant', 'closed', 'disused', 'empty') OR shop IS NULL THEN NULL ELSE 'other' END, + 'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway', + 'dog_park') THEN leisure ELSE NULL END, + 'man_made_' || CASE WHEN man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk') THEN man_made ELSE NULL END, + 'natural_' || CASE WHEN "natural" IN ('peak', 'volcano', 'saddle', 'spring', 'cave_entrance') THEN "natural" ELSE NULL END, + 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END, + 'highway_'|| CASE WHEN highway IN ('bus_stop', 'elevator', 'traffic_signals', 'ford') THEN highway ELSE NULL END, + 'power_' || CASE WHEN power IN ('generator') THEN power ELSE NULL END, + 'tourism_' || CASE WHEN tourism IN ('viewpoint') THEN tourism ELSE NULL END, + 'man_made_' || CASE WHEN man_made IN ('cross') THEN man_made ELSE NULL END, + 'historic_' || CASE WHEN historic IN ('wayside_cross') THEN historic ELSE NULL END + ) AS feature, + access, + CASE + WHEN "natural" IN ('peak', 'volcano', 'saddle') THEN + CASE + WHEN ele ~ '^-?\d{1,4}(\.\d+)?$' THEN ele::NUMERIC + ELSE NULL + END + ELSE NULL + END AS score, + religion, + denomination, + "generator:source", + power_source, + NULL AS way_pixels + FROM planet_osm_point + -- The upcoming where clause is needed for performance only, as the CASE statements would end up doing the equivalent filtering + WHERE aeroway IN ('helipad', 'aerodrome') + OR tourism IN ('artwork', 'alpine_hut', 'camp_site', 'caravan_site', 'chalet', 'wilderness_hut', 'guest_house', 'hostel', + 'hotel', 'motel', 'information', 'museum', 'viewpoint', 'picnic_site') + OR amenity IN ('shelter', 'atm', 'bank', 'bar', 'bicycle_rental', 'bus_station', 'cafe', + 'car_rental', 'car_wash', 'cinema', 'clinic', 'community_centre', + 'fire_station', 'fountain', 'fuel', 'hospital', 'ice_cream', 'embassy', 'library', 'courthouse', + 'townhall', 'parking', 'bicycle_parking', 'motorcycle_parking', 'pharmacy', 'doctors', + 'dentist', 'place_of_worship', 'police', 'post_box', 'post_office', 'pub', 'biergarten', + 'recycling', 'restaurant', 'food_court', 'fast_food', 'telephone', 'emergency_phone', + 'taxi', 'theatre', 'toilets', 'drinking_water', 'prison', 'hunting_stand', 'nightclub', + 'veterinary', 'social_facility', 'charging_station') + OR shop IS NOT NULL -- skip checking a huge list and use a null check + OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway', + 'dog_park') + OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'cross', 'obelisk') + OR "natural" IN ('peak', 'volcano', 'saddle', 'spring', 'cave_entrance') + OR historic IN ('memorial', 'monument', 'archaeological_site', 'wayside_cross') + OR highway IN ('bus_stop', 'elevator', 'traffic_signals', 'ford') + OR (power = 'generator' AND ("generator:source" = 'wind' OR power_source = 'wind')) + ORDER BY score DESC NULLS LAST + ) AS amenity_points + properties: + minzoom: 10 + advanced: {} + - id: "power-towers" + name: "power-towers" + class: "" + geometry: "point" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way + FROM planet_osm_point + WHERE power = 'tower' + ) AS power_towers + properties: + minzoom: 14 + advanced: {} + - id: "power-poles" + name: "power-poles" + class: "" + geometry: "point" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way + FROM planet_osm_point + WHERE power = 'pole' + ) AS power_poles + properties: + minzoom: 16 + advanced: {} + - id: "roads-text-ref-low-zoom" + name: "roads-text-ref-low-zoom" + class: "" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + highway, + height, + width, + refs + FROM ( + SELECT + way, highway, + array_length(refs,1) AS height, + (SELECT MAX(char_length(ref)) FROM unnest(refs) AS u(ref)) AS width, + array_to_string(refs, E'\n') AS refs + FROM ( + SELECT + way, + highway, + string_to_array(ref, ';') AS refs + FROM planet_osm_roads + WHERE highway IN ('motorway', 'trunk', 'primary', 'secondary') + AND ref IS NOT NULL + ) AS p) AS q + WHERE height <= 4 AND width <= 11) AS roads_text_ref_low_zoom + properties: + minzoom: 10 + maxzoom: 12 + advanced: {} + - id: "junctions" + name: "junctions" + class: "" + geometry: "point" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + highway, + junction, + ref, + name + FROM planet_osm_point + WHERE highway = 'motorway_junction' OR highway = 'traffic_signals' OR junction = 'yes' + ) AS junctions + properties: + minzoom: 11 + advanced: {} + - id: "bridge-text" + name: "bridge-text" + class: "" + geometry: "polygon" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels, + man_made, + name + FROM planet_osm_polygon + WHERE man_made = 'bridge' + ) AS bridge_text + properties: + minzoom: 11 + advanced: {} + - id: "roads-text-ref" + name: "roads-text-ref" + class: "" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + highway, + height, + width, + refs + FROM ( + SELECT + way, highway, + array_length(refs,1) AS height, + (SELECT MAX(char_length(ref)) FROM unnest(refs) AS u(ref)) AS width, + array_to_string(refs, E'\n') AS refs + FROM ( + SELECT + way, + COALESCE( + CASE WHEN highway IN ('motorway', 'trunk', 'primary', 'secondary', 'tertiary', 'unclassified', 'residential') THEN highway ELSE NULL END, + CASE WHEN aeroway IN ('runway', 'taxiway') THEN aeroway ELSE NULL END + ) AS highway, + string_to_array(ref, ';') AS refs + FROM planet_osm_line + WHERE (highway IN ('motorway', 'trunk', 'primary', 'secondary', 'tertiary', 'unclassified', 'residential') OR aeroway IN ('runway', 'taxiway')) + AND ref IS NOT NULL + ) AS p) AS q + WHERE height <= 4 AND width <= 11) AS roads_text_ref + properties: + minzoom: 13 + advanced: {} + - id: "roads-area-text-name" + name: "roads-area-text-name" + class: "" + geometry: "polygon" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels, + highway, + name + FROM planet_osm_polygon + WHERE highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'cycleway', 'living_street', 'track', 'path', 'platform') + OR railway IN ('platform') + AND name IS NOT NULL + ) AS roads_area_text_name + properties: + minzoom: 15 + advanced: {} + - id: "roads-text-name" + name: "roads-text-name" + class: "directions" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN substr(highway, 0, length(highway)-4) ELSE highway END, + CASE WHEN (tunnel = 'yes' OR tunnel = 'building_passage' OR covered = 'yes') THEN 'yes' ELSE 'no' END AS tunnel, + CASE WHEN construction IN ('service', 'footway', 'cycleway', 'bridleway', 'path', 'track') THEN 'yes' ELSE 'no' END AS int_construction_minor, + name, + CASE + WHEN oneway IN ('yes', '-1') THEN oneway + WHEN junction IN ('roundabout') AND (oneway IS NULL OR NOT oneway IN ('no', 'reversible')) THEN 'yes' + ELSE NULL + END AS oneway, + horse, bicycle + FROM planet_osm_line + WHERE highway IN ('motorway', 'motorway_link', 'trunk', 'trunk_link', 'primary', 'primary_link', 'secondary', 'secondary_link', 'tertiary', + 'tertiary_link', 'residential', 'unclassified', 'road', 'service', 'pedestrian', 'raceway', 'living_street', 'construction') + AND (name IS NOT NULL + OR oneway IN ('yes', '-1') + OR junction IN ('roundabout')) + ) AS roads_text_name + properties: + minzoom: 13 + advanced: {} + - id: "paths-text-name" + name: "paths-text-name" + class: "" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + highway, + name + FROM planet_osm_line + WHERE highway IN ('bridleway', 'footway', 'cycleway', 'path', 'track', 'steps') + AND name IS NOT NULL + ) AS paths_text_name + properties: + minzoom: 15 + advanced: {} + - id: "text-poly-low-zoom" + name: "text-poly-low-zoom" + class: "text-low-zoom" + geometry: "polygon" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels, + COALESCE( + 'landuse_' || CASE WHEN landuse IN ('forest', 'military') THEN landuse ELSE NULL END, + 'natural_' || CASE WHEN "natural" IN ('wood', 'glacier', 'sand', 'scree', 'shingle', 'bare_rock') THEN "natural" ELSE NULL END, + 'place_' || CASE WHEN place IN ('island') THEN place ELSE NULL END, + 'boundary_' || CASE WHEN boundary IN ('national_park') THEN boundary ELSE NULL END, + 'leisure_' || CASE WHEN leisure IN ('nature_reserve') THEN leisure ELSE NULL END + ) AS feature, + name, + CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building -- always no with the where conditions + FROM planet_osm_polygon + WHERE (landuse IN ('forest', 'military') + OR "natural" IN ('wood', 'glacier', 'sand', 'scree', 'shingle', 'bare_rock') + OR "place" IN ('island') + OR boundary IN ('national_park') + OR leisure IN ('nature_reserve')) + AND building IS NULL + AND name IS NOT NULL + ORDER BY way_area DESC + ) AS text_poly_low_zoom + properties: + minzoom: 7 + maxzoom: 9 + advanced: {} + - id: "text-poly" + name: "text-poly" + class: "text" + geometry: "polygon" + <<: *extents + Datasource: + <<: *osm2pgsql + # Include values that are rendered as icon without label to prevent mismatch between icons and labels, + # see https://github.com/gravitystorm/openstreetmap-carto/pull/1349#issuecomment-77805678 + table: |- + (SELECT + way, + way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels, + COALESCE( + 'aeroway_' || CASE WHEN aeroway IN ('gate', 'apron', 'helipad', 'aerodrome') THEN aeroway ELSE NULL END, + 'tourism_' || CASE WHEN tourism IN ('artwork', 'alpine_hut', 'hotel', 'motel', 'hostel', 'chalet', 'wilderness_hut', 'guest_house', 'camp_site', 'caravan_site', + 'theme_park', 'museum', 'zoo', 'information', 'picnic_site') THEN tourism ELSE NULL END, + 'amenity_' || CASE WHEN amenity IN ('pub', 'restaurant', 'food_court', 'cafe', 'fast_food', 'biergarten', 'bar', 'library', + 'theatre', 'courthouse', 'townhall', 'cinema', 'clinic', 'community_centre', 'parking', + 'bicycle_parking', 'motorcycle_parking', 'police', 'fire_station', 'fountain', 'place_of_worship', + 'grave_yard', 'shelter', 'bank', 'embassy', 'fuel', 'bus_station', 'prison', 'university', + 'school', 'college', 'kindergarten', 'hospital', 'ice_cream', 'pharmacy', 'doctors', 'dentist', + 'atm', 'bicycle_rental', 'car_rental', 'car_wash', 'post_box', 'post_office', + 'recycling', 'telephone', 'emergency_phone', 'toilets', 'taxi', 'drinking_water', 'hunting_stand', + 'nightclub', 'veterinary', 'social_facility', 'charging_station') THEN amenity ELSE NULL END, + 'shop_' || CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer', 'confectionery', + 'fashion', 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', 'garden_centre', + 'hairdresser', 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', 'photo', 'photo_studio', + 'photography', 'seafood', 'shoes', 'alcohol', 'gift', 'furniture', 'kiosk', 'mobile_phone', 'motorcycle', + 'musical_instrument', 'newsagent', 'optician', 'jewelry', 'jewellery', 'electronics', 'chemist', 'toys', + 'travel_agency', 'car_parts', 'greengrocer', 'farm', 'stationery', 'laundry', 'dry_cleaning', 'beverages', + 'perfumery', 'cosmetics', 'variety_store', 'wine', 'outdoor', 'copyshop', 'sports', 'deli', 'tobacco', 'art', 'tea') THEN shop + WHEN shop IN ('no', 'vacant', 'closed', 'disused', 'empty') OR shop IS NULL THEN NULL ELSE 'other' END, + 'leisure_' || CASE WHEN leisure IN ('swimming_pool', 'water_park', 'miniature_golf', 'golf_course', 'sports_centre', 'stadium', 'track', + 'pitch', 'playground', 'park', 'recreation_ground', 'common', 'garden', 'nature_reserve', 'marina', + 'picnic_table', 'dog_park') THEN leisure ELSE NULL END, + 'power_' || CASE WHEN power IN ('plant', 'station', 'generator', 'sub_station', 'substation') THEN power ELSE NULL END, + 'landuse_' || CASE WHEN landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery', + 'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', + 'greenhouse_horticulture', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', + 'construction', 'military') THEN landuse ELSE NULL END, + 'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk') THEN man_made ELSE NULL END, + 'natural_' || CASE WHEN "natural" IN ('wood', 'water', 'mud', 'wetland', 'marsh', 'bay', 'spring', 'scree', 'shingle', 'bare_rock', 'sand', 'heath', + 'grassland', 'scrub', 'beach', 'shoal', 'reef', 'glacier') THEN "natural" ELSE NULL END, + 'place_' || CASE WHEN place IN ('island', 'islet') THEN place ELSE NULL END, + 'military_' || CASE WHEN military IN ('danger_area') THEN military ELSE NULL END, + 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END, + 'highway_' || CASE WHEN highway IN ('services', 'rest_area', 'bus_stop', 'elevator', 'ford') THEN highway ELSE NULL END, + 'boundary_' || CASE WHEN boundary IN ('national_park') THEN boundary ELSE NULL END, + 'waterway_' || CASE WHEN waterway IN ('dam') THEN waterway ELSE NULL END, + 'tourism_' || CASE WHEN tourism IN ('viewpoint', 'attraction') THEN tourism ELSE NULL END + ) AS feature, + access, + name, + operator, + ref, + way_area, + CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building + FROM planet_osm_polygon + -- The upcoming where clause is needed for performance only, as the CASE statements would end up doing the equivalent filtering + WHERE (aeroway IN ('gate', 'apron', 'helipad', 'aerodrome') + OR tourism IN ('artwork', 'alpine_hut', 'hotel', 'motel', 'hostel', 'chalet', 'wilderness_hut', 'guest_house', 'camp_site', 'caravan_site', 'theme_park', + 'museum', 'viewpoint', 'attraction', 'zoo', 'information', 'picnic_site') + OR amenity IS NOT NULL -- skip checking a huge list and use a null check + OR shop IS NOT NULL + OR leisure IS NOT NULL + OR landuse IS NOT NULL + OR man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk') + OR "natural" IS NOT NULL + OR place IN ('island', 'islet') + OR military IN ('danger_area') + OR historic IN ('memorial', 'monument', 'archaeological_site') + OR highway IN ('services', 'rest_area', 'bus_stop', 'elevator', 'ford') + OR power IN ('plant', 'station', 'generator', 'sub_station', 'substation') + OR boundary IN ('national_park') + OR waterway = 'dam') + AND (name IS NOT NULL + OR (ref IS NOT NULL AND aeroway IN ('gate')) + ) + ORDER BY way_area DESC + ) AS text_poly + properties: + minzoom: 10 + advanced: {} + - id: "text-line" + name: "text-line" + class: "" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + NULL as way_pixels, + COALESCE('man_made_' || man_made, 'waterway_' || waterway, 'natural_' || "natural") AS feature, + access, + name, + operator, + ref, + NULL AS way_area, + CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building + FROM planet_osm_line + WHERE (man_made IN ('pier', 'breakwater', 'groyne', 'embankment') + OR waterway IN ('dam', 'weir') + OR "natural" IN ('cliff')) + AND name IS NOT NULL + ) AS text_line + advanced: {} + properties: + minzoom: 10 + - id: "text-point" + name: "text-point" + class: "text" + geometry: "point" + <<: *extents + Datasource: + <<: *osm2pgsql + # Include values that are rendered as icon without label to prevent mismatch between icons and labels, + # see https://github.com/gravitystorm/openstreetmap-carto/pull/1349#issuecomment-77805678 + table: |- + (SELECT + way, + way_pixels, + feature, + access, + CONCAT( + name, + CASE WHEN name IS NOT NULL AND elevation IS NOT NULL THEN E'\n' ELSE NULL END, + CASE WHEN elevation IS NOT NULL THEN CONCAT(REPLACE(ROUND(elevation)::TEXT, '-', U&'\2212'), U&'\00A0', 'm') ELSE NULL END + ) AS name, + CASE + WHEN "natural" IN ('peak', 'volcano', 'saddle') THEN elevation + ELSE NULL + END AS score, + operator, + ref, + way_area, + is_building + FROM + (SELECT + way, + NULL AS way_pixels, + COALESCE( + 'aeroway_' || CASE WHEN aeroway IN ('gate', 'apron', 'helipad', 'aerodrome') THEN aeroway ELSE NULL END, + 'tourism_' || CASE WHEN tourism IN ('artwork', 'alpine_hut', 'hotel', 'motel', 'hostel', 'chalet', 'wilderness_hut', 'guest_house', 'camp_site', 'caravan_site', + 'theme_park', 'museum', 'zoo', 'information', 'picnic_site') THEN tourism ELSE NULL END, + 'amenity_' || CASE WHEN amenity IN ('pub', 'restaurant', 'food_court', 'cafe', 'fast_food', 'biergarten', 'bar', 'library', 'theatre', + 'courthouse', 'townhall', 'cinema', 'clinic', 'community_centre', 'parking', 'bicycle_parking', + 'motorcycle_parking', 'police', 'fire_station', 'fountain', 'place_of_worship', 'grave_yard', 'shelter', 'bank', + 'embassy', 'fuel', 'bus_station', 'prison', 'university', 'school', 'college', 'kindergarten', 'hospital', + 'ice_cream', 'pharmacy', 'doctors', 'dentist', 'atm', 'bicycle_rental', 'car_rental', + 'car_wash', 'post_box', 'post_office', 'recycling', 'telephone', 'emergency_phone', 'toilets', 'taxi', + 'drinking_water', 'hunting_stand', 'nightclub', 'veterinary', 'social_facility', + 'charging_station') THEN amenity ELSE NULL END, + 'shop_' || CASE WHEN shop IN ('supermarket', 'bag','bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer', 'confectionery', 'fashion', + 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', 'garden_centre', 'hairdresser', + 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', 'photo', 'photo_studio', 'photography', + 'seafood', 'shoes', 'alcohol', 'gift', 'furniture', 'kiosk', 'mobile_phone', 'motorcycle', 'musical_instrument', + 'newsagent', 'optician', 'jewelry', 'jewellery', 'electronics', 'chemist', 'toys', 'travel_agency', 'car_parts', + 'greengrocer', 'farm', 'stationery', 'laundry', 'dry_cleaning', 'beverages', 'perfumery', 'cosmetics', + 'variety_store', 'wine', 'outdoor', 'copyshop', 'sports', 'deli', 'tobacco', 'art', 'tea') THEN shop + WHEN shop IN ('no', 'vacant', 'closed', 'disused', 'empty') OR shop IS NULL THEN NULL ELSE 'other' END, + 'leisure_' || CASE WHEN leisure IN ('swimming_pool', 'water_park', 'miniature_golf', 'golf_course', 'sports_centre', 'stadium', 'track', + 'pitch','playground', 'park', 'recreation_ground', 'common', 'garden', 'nature_reserve', 'marina', + 'slipway', 'picnic_table', 'dog_park') THEN leisure ELSE NULL END, + 'power_' || CASE WHEN power IN ('plant', 'station', 'generator', 'sub_station', 'substation') THEN power ELSE NULL END, + 'landuse_' || CASE WHEN landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery', + 'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', + 'greenhouse_horticulture', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', + 'construction', 'military') THEN landuse ELSE NULL END, + 'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'obelisk') THEN man_made ELSE NULL END, + 'natural_' || CASE WHEN "natural" IN ('wood', 'peak', 'volcano', 'saddle', 'cave_entrance', 'water', 'mud', 'wetland', 'marsh', 'bay', 'spring', + 'scree', 'shingle', 'bare_rock', 'sand', 'heath', 'grassland', 'scrub', 'beach', 'glacier', 'tree') + THEN "natural" ELSE NULL END, + 'place_' || CASE WHEN place IN ('island', 'islet') THEN place ELSE NULL END, + 'military_' || CASE WHEN military IN ('danger_area') THEN military ELSE NULL END, + 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END, + 'highway_' || CASE WHEN highway IN ('services', 'rest_area', 'bus_stop', 'elevator', 'ford') THEN highway ELSE NULL END, + 'boundary_' || CASE WHEN boundary IN ('national_park') THEN boundary ELSE NULL END, + 'waterway_' || CASE WHEN waterway IN ('dam', 'weir') THEN waterway ELSE NULL END, + 'tourism_' || CASE WHEN tourism IN ('viewpoint', 'attraction') THEN tourism ELSE NULL END, + 'man_made_' || CASE WHEN man_made IN ('cross') THEN man_made ELSE NULL END, + 'historic_' || CASE WHEN historic IN ('wayside_cross') THEN historic ELSE NULL END + ) AS feature, + access, + name, + CASE + WHEN "natural" IN ('peak', 'volcano', 'saddle') OR tourism = 'alpine_hut' OR amenity = 'shelter' THEN + CASE + WHEN ele ~ '^-?\d{1,4}(\.\d+)?$' THEN ele::NUMERIC + ELSE NULL + END + ELSE NULL + END AS elevation, + "natural", + operator, + ref, + NULL AS way_area, + CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building + FROM planet_osm_point + -- The upcoming where clause is needed for performance only, as the CASE statements would end up doing the equivalent filtering + WHERE (aeroway IN ('gate', 'apron', 'helipad', 'aerodrome') + OR tourism IN ('artwork', 'alpine_hut', 'hotel', 'motel', 'hostel', 'chalet', 'wilderness_hut', 'guest_house', 'camp_site', 'caravan_site', 'theme_park', + 'museum', 'viewpoint', 'attraction', 'zoo', 'information', 'picnic_site') + OR amenity IS NOT NULL -- skip checking a huge list and use a null check + OR shop IS NOT NULL + OR leisure IS NOT NULL + OR landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery', 'residential', + 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'greenhouse_horticulture', + 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction', 'military') + OR man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'cross', 'obelisk') + OR "natural" IS NOT NULL + OR place IN ('island', 'islet') + OR military IN ('danger_area') + OR historic IN ('memorial', 'monument', 'archaeological_site', 'wayside_cross') + OR highway IN ('bus_stop', 'services', 'rest_area', 'elevator', 'ford') + OR power IN ('plant', 'station', 'generator', 'sub_station', 'substation') + OR boundary IN ('national_park') + OR waterway IN ('dam', 'weir')) + AND (name IS NOT NULL + OR (ele IS NOT NULL AND ("natural" IN ('peak', 'volcano', 'saddle') OR tourism = 'alpine_hut' OR amenity = 'shelter')) + OR (ref IS NOT NULL AND aeroway IN ('gate')) + ) + ) AS p + ORDER BY score DESC NULLS LAST + ) AS text + properties: + minzoom: 10 + advanced: {} + - id: "building-text" + name: "building-text" + class: "" + geometry: "polygon" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + name, + way, + way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels + FROM planet_osm_polygon + WHERE building IS NOT NULL + AND building NOT IN ('no') + AND name IS NOT NULL + ORDER BY way_area DESC + ) AS building_text + properties: + minzoom: 14 + advanced: {} + - id: "interpolation" + name: "interpolation" + class: "" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way + FROM planet_osm_line + WHERE "addr:interpolation" IS NOT NULL + ) AS interpolation + properties: + minzoom: 17 + advanced: {} + - id: "addresses" + name: "addresses" + class: "" + geometry: "point" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + "addr:housenumber" AS addr_housenumber, + "addr:housename" AS addr_housename, + way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels + FROM planet_osm_polygon + WHERE (("addr:housenumber" IS NOT NULL) OR ("addr:housename" IS NOT NULL)) + AND building IS NOT NULL + UNION ALL + SELECT + way, + "addr:housenumber" AS addr_housenumber, + "addr:housename" AS addr_housename, + NULL AS way_pixels + FROM planet_osm_point + WHERE ("addr:housenumber" IS NOT NULL) OR ("addr:housename" IS NOT NULL) + ORDER BY way_pixels DESC NULLS LAST + ) AS addresses + properties: + minzoom: 17 + advanced: {} + - id: "water-lines-text" + name: "water-lines-text" + class: "" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + waterway, + lock, + name, + intermittent, + CASE WHEN tunnel IN ('yes', 'culvert') THEN 'yes' ELSE 'no' END AS int_tunnel + FROM planet_osm_line + WHERE waterway IN ('river', 'canal', 'derelict_canal', 'stream', 'drain', 'ditch', 'wadi') + AND (tunnel IS NULL or tunnel != 'culvert') + AND name IS NOT NULL + ORDER BY z_order + ) AS water_lines_text + properties: + minzoom: 13 + advanced: {} + - id: "ferry-routes-text" + name: "ferry-routes-text" + class: "" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + name + FROM planet_osm_line + WHERE route = 'ferry' + AND name IS NOT NULL + ) AS ferry_routes_text + properties: + minzoom: 13 + advanced: {} + - id: "admin-text" + name: "admin-text" + class: "" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + name, + admin_level + FROM planet_osm_polygon + WHERE boundary = 'administrative' + AND admin_level IN ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10') + AND name IS NOT NULL + ORDER BY admin_level::integer ASC, way_area DESC + ) AS admin_text + properties: + minzoom: 16 + advanced: {} + - id: "nature-reserve-text" + name: "nature-reserve-text" + class: "" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + name, + way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels + FROM planet_osm_polygon + WHERE (boundary = 'national_park' OR leisure = 'nature_reserve') + AND name IS NOT NULL + ) AS nature_reserve_text + properties: + minzoom: 13 + advanced: {} + - id: "amenity-low-priority" + name: "amenity-low-priority" + class: "amenity-low-priority" + geometry: "point" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + COALESCE( + 'highway_' || CASE WHEN highway IN ('mini_roundabout') THEN highway ELSE NULL END, + 'railway_' || CASE WHEN railway IN ('level_crossing', 'crossing') THEN railway ELSE NULL END, + 'amenity_' || CASE WHEN amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking', 'bench', 'waste_basket') THEN amenity ELSE NULL END, + 'historic_' || CASE WHEN historic IN ('wayside_cross') THEN historic ELSE NULL END, + 'man_made_' || CASE WHEN man_made IN ('cross') THEN man_made ELSE NULL END, + 'barrier_' || CASE WHEN barrier IN ('bollard', 'gate', 'lift_gate', 'swing_gate', 'block') THEN barrier ELSE NULL END + ) AS feature, + access, + CASE WHEN amenity='waste_basket' THEN 2 ELSE 1 END AS prio + FROM planet_osm_point p + WHERE highway IN ('mini_roundabout') + OR railway IN ('level_crossing', 'crossing') + OR amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking', 'bench', 'waste_basket') + OR historic IN ('wayside_cross') + OR man_made IN ('cross') + OR barrier IN ('bollard', 'gate', 'lift_gate', 'swing_gate', 'block') + ORDER BY prio + ) AS amenity_low_priority + properties: + minzoom: 14 + advanced: {} + - id: "amenity-low-priority-poly" + name: "amenity-low-priority-poly" + class: "amenity-low-priority" + geometry: "polygon" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + COALESCE( + 'amenity_' || CASE WHEN amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking') THEN amenity ELSE NULL END, + 'barrier_' || CASE WHEN barrier IN ('bollard', 'gate', 'lift_gate', 'swing_gate', 'block') THEN barrier ELSE NULL END + ) AS feature, + access + FROM planet_osm_polygon p + WHERE amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking') + OR barrier IN ('bollard', 'gate', 'lift_gate', 'swing_gate', 'block') + ) AS amenity_low_priority_poly + properties: + minzoom: 14 + advanced: {} diff --git a/project.yaml b/project.yaml deleted file mode 100644 index 29aa170535..0000000000 --- a/project.yaml +++ /dev/null @@ -1,2565 +0,0 @@ -scale: 1 -metatile: 2 -name: "OpenStreetMap Carto" -description: "A general-purpose OpenStreetMap mapnik style, in CartoCSS" -bounds: &world - - -180 - - -85.05112877980659 - - 180 - - 85.05112877980659 -center: - - 0 - - 0 - - 4 -format: "png" -interactivity: false -minzoom: 0 -maxzoom: 22 -srs: "+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" - -# Various parts to be included later on -_parts: - # Extents are used for tilemill, and don't actually make it to the generated XML - extents: &extents - extent: *world - srs-name: "900913" - srs: "+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" - extents84: &extents84 - extent: *world - srs-name: "WGS84" - srs: "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs" - osm2pgsql: &osm2pgsql - type: "postgis" - dbname: "gis" - key_field: "" - geometry_field: "way" - extent: "-20037508,-20037508,20037508,20037508" - -Stylesheet: - - "style.mss" - - "shapefiles.mss" - - "landcover.mss" - - "water.mss" - - "water-features.mss" - - "road-colors-generated.mss" - - "roads.mss" - - "power.mss" - - "placenames.mss" - - "buildings.mss" - - "stations.mss" - - "amenity-points.mss" - - "ferry-routes.mss" - - "aerialways.mss" - - "admin.mss" - - "addressing.mss" -Layer: - - id: "world" - name: "world" - class: "" - geometry: "polygon" - <<: *extents - Datasource: - file: "data/simplified-land-polygons-complete-3857/simplified_land_polygons.shp" - type: "shape" - advanced: {} - properties: - maxzoom: 9 - - id: "coast-poly" - name: "coast-poly" - class: "" - geometry: "polygon" - <<: *extents - Datasource: - file: "data/land-polygons-split-3857/land_polygons.shp" - type: "shape" - properties: - minzoom: 10 - advanced: {} - - id: "builtup" - name: "builtup" - geometry: "polygon" - class: "" - extent: *world - srs-name: "mercator" - srs: "+proj=merc +datum=WGS84 +over" - Datasource: - file: "data/world_boundaries/builtup_area.shp" - type: "shape" - properties: - minzoom: 8 - maxzoom: 9 - advanced: {} - - id: "necountries" - name: "necountries" - class: "" - geometry: "linestring" - <<: *extents84 - Datasource: - file: "data/ne_110m_admin_0_boundary_lines_land/ne_110m_admin_0_boundary_lines_land.shp" - type: "shape" - properties: - minzoom: 1 - maxzoom: 3 - advanced: {} - - id: "landcover-low-zoom" - name: "landcover-low-zoom" - class: "" - geometry: "polygon" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, name, way_pixels, - COALESCE(wetland, landuse, "natural") AS feature - FROM (SELECT - way, COALESCE(name, '') AS name, - ('landuse_' || (CASE WHEN landuse IN ('forest', 'military') THEN landuse ELSE NULL END)) AS landuse, - ('natural_' || (CASE WHEN "natural" IN ('wood', 'sand', 'scree', 'shingle', 'bare_rock') THEN "natural" ELSE NULL END)) AS "natural", - ('wetland_' || (CASE WHEN "natural" IN ('wetland', 'mud') THEN (CASE WHEN "natural" IN ('mud') THEN "natural" ELSE wetland END) ELSE NULL END)) AS wetland, - way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels - FROM planet_osm_polygon - WHERE (landuse IN ('forest', 'military') - OR "natural" IN ('wood', 'wetland', 'mud', 'sand', 'scree', 'shingle', 'bare_rock')) - AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real - AND building IS NULL - ORDER BY CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END, way_area DESC - ) AS features - ) AS landcover_low_zoom - properties: - minzoom: 7 - maxzoom: 9 - advanced: {} - - id: "landcover" - name: "landcover" - class: "" - geometry: "polygon" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, name, religion, way_pixels, - COALESCE(aeroway, amenity, wetland, power, landuse, leisure, military, "natural", tourism, highway, railway) AS feature - FROM (SELECT - way, COALESCE(name, '') AS name, - ('aeroway_' || (CASE WHEN aeroway IN ('apron', 'aerodrome') THEN aeroway ELSE NULL END)) AS aeroway, - ('amenity_' || (CASE WHEN amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking', 'university', 'college', 'school', - 'hospital', 'kindergarten', 'grave_yard', 'prison', 'place_of_worship', 'clinic') - THEN amenity ELSE NULL END)) AS amenity, - ('landuse_' || (CASE WHEN landuse IN ('quarry', 'vineyard', 'orchard', 'cemetery', 'residential', 'garages', 'meadow', 'grass', - 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'greenhouse_horticulture', - 'recreation_ground', 'village_green', 'retail', 'industrial', 'railway', 'commercial', - 'brownfield', 'landfill', 'construction') THEN landuse ELSE NULL END)) AS landuse, - ('leisure_' || (CASE WHEN leisure IN ('swimming_pool', 'playground', 'park', 'recreation_ground', 'common', 'garden', - 'golf_course', 'miniature_golf', 'picnic_table', 'sports_centre', 'stadium', 'pitch', - 'track', 'dog_park') THEN leisure ELSE NULL END)) AS leisure, - ('military_' || (CASE WHEN military IN ('danger_area') THEN military ELSE NULL END)) AS military, - ('natural_' || (CASE WHEN "natural" IN ('beach', 'shoal', 'heath', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub') THEN "natural" ELSE NULL END)) AS "natural", - ('wetland_' || (CASE WHEN "natural" IN ('wetland', 'marsh', 'mud') THEN (CASE WHEN "natural" IN ('marsh', 'mud') THEN "natural" ELSE wetland END) ELSE NULL END)) AS wetland, - ('power_' || (CASE WHEN power IN ('station', 'sub_station', 'substation', 'generator') THEN power ELSE NULL END)) AS power, - ('tourism_' || (CASE WHEN tourism IN ('attraction', 'camp_site', 'caravan_site', 'picnic_site') THEN tourism ELSE NULL END)) AS tourism, - ('highway_' || (CASE WHEN highway IN ('services', 'rest_area') THEN highway ELSE NULL END)) AS highway, - ('railway_' || (CASE WHEN railway = 'station' THEN railway ELSE NULL END)) AS railway, - CASE WHEN religion IN ('christian', 'jewish') THEN religion ELSE 'INT-generic'::text END AS religion, - way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels - FROM planet_osm_polygon - WHERE (landuse IS NOT NULL - OR leisure IS NOT NULL - OR aeroway IN ('apron', 'aerodrome') - OR amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking', 'university', 'college', 'school', 'hospital', 'kindergarten', - 'grave_yard', 'place_of_worship', 'prison', 'clinic') - OR military IN ('danger_area') - OR "natural" IN ('beach', 'shoal', 'heath', 'mud', 'marsh', 'wetland', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub') - OR power IN ('station', 'sub_station', 'substation', 'generator') - OR tourism IN ('attraction', 'camp_site', 'caravan_site', 'picnic_site') - OR highway IN ('services', 'rest_area') - OR railway = 'station') - AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real - ORDER BY CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END, way_area DESC - ) AS landcover - ) AS features - properties: - minzoom: 10 - advanced: {} - - id: "landcover-line" - name: "landcover-line" - class: "" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way - FROM planet_osm_line - WHERE man_made = 'cutline' - ) AS landcover_line - advanced: {} - properties: - minzoom: 14 - - id: "water-lines-casing" - name: "water-lines-casing" - class: "" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, waterway, intermittent, - CASE WHEN tunnel IN ('yes', 'culvert') THEN 'yes' ELSE 'no' END AS int_tunnel - FROM planet_osm_line - WHERE waterway IN ('stream', 'drain', 'ditch') - ) AS water_lines_casing - properties: - minzoom: 13 - advanced: {} - - id: "water-lines-low-zoom" - name: "water-lines-low-zoom" - class: "" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - waterway, - intermittent - FROM planet_osm_line - WHERE waterway = 'river' - ) AS water_lines_low_zoom - properties: - minzoom: 8 - maxzoom: 11 - advanced: {} - - id: "icesheet-poly" - name: "icesheet-poly" - class: "" - geometry: "polygon" - <<: *extents - Datasource: - file: "data/antarctica-icesheet-polygons-3857/icesheet_polygons.shp" - type: "shape" - properties: - minzoom: 4 - advanced: {} - - id: "water-areas" - name: "water-areas" - class: "" - geometry: "polygon" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - "natural", - waterway, - landuse, - name, - way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels - FROM planet_osm_polygon - WHERE - (waterway IN ('dock', 'riverbank', 'canal') - OR landuse IN ('reservoir', 'basin') - OR "natural" IN ('water', 'glacier')) - AND building IS NULL - AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real - ORDER BY z_order, way_area DESC - ) AS water_areas - properties: - minzoom: 4 - advanced: {} - - id: "landcover-area-symbols" - name: "landcover-area-symbols" - class: "" - geometry: "polygon" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, surface, - COALESCE(CASE WHEN landuse = 'forest' THEN 'wood' ELSE NULL END, "natural") AS "natural", - CASE WHEN "natural" IN ('marsh', 'mud') - THEN "natural" - ELSE CASE WHEN ("natural" = 'wetland' AND wetland IS NULL) - THEN 'wetland' - ELSE CASE WHEN ("natural" = 'wetland') - THEN wetland - ELSE NULL - END - END - END AS int_wetland - FROM planet_osm_polygon - WHERE ("natural" IN ('marsh', 'mud', 'wetland', 'wood', 'beach', 'shoal', 'reef') OR landuse = 'forest') - AND building IS NULL - AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real - ORDER BY z_order, way_area DESC - ) AS landcover_area_symbols - properties: - minzoom: 10 - advanced: {} - - id: "icesheet-outlines" - name: "icesheet-outlines" - class: "" - geometry: "linestring" - <<: *extents - Datasource: - file: "data/antarctica-icesheet-outlines-3857/icesheet_outlines.shp" - type: "shape" - properties: - minzoom: 4 - advanced: {} - - id: "water-lines" - name: "water-lines" - class: "water-lines" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, waterway, name, intermittent, - CASE WHEN tunnel IN ('yes', 'culvert') THEN 'yes' ELSE 'no' END AS int_tunnel, - 'no' AS bridge - FROM planet_osm_line - WHERE waterway IN ('river', 'canal', 'derelict_canal', 'stream', 'drain', 'ditch', 'wadi') - AND (bridge IS NULL OR bridge NOT IN ('yes', 'aqueduct')) - ORDER BY z_order - ) AS water_lines - properties: - minzoom: 12 - advanced: {} - - id: "water-barriers-line" - name: "water-barriers-line" - class: "" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - waterway, - name - FROM planet_osm_line - WHERE waterway IN ('dam', 'weir', 'lock_gate') - ) AS water_barriers_line - advanced: {} - properties: - minzoom: 13 - - id: "water-barriers-poly" - name: "water-barriers-poly" - class: "" - geometry: "polygon" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - waterway, - name - FROM planet_osm_polygon - WHERE waterway IN ('dam', 'weir', 'lock_gate') - ) AS water_barriers_poly - advanced: {} - properties: - minzoom: 13 - - id: "marinas-area" - name: "marinas-area" - class: "" - geometry: "polygon" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way - FROM planet_osm_polygon - WHERE leisure = 'marina' - ) AS marinas_area - properties: - minzoom: 14 - advanced: {} - - id: "piers-poly" - name: "piers-poly" - class: "" - geometry: "polygon" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, man_made - FROM planet_osm_polygon - WHERE man_made IN ('pier', 'breakwater', 'groyne') - ) AS piers_poly - properties: - minzoom: 12 - advanced: {} - - id: "piers-line" - name: "piers-line" - class: "" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, man_made - FROM planet_osm_line - WHERE man_made IN ('pier', 'breakwater', 'groyne') - ) AS piers_line - properties: - minzoom: 12 - advanced: {} - - id: "water-barriers-point" - name: "water-barriers-point" - class: "" - geometry: "point" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, waterway - FROM planet_osm_point - WHERE waterway IN ('dam', 'weir', 'lock_gate') - ) AS water_barriers_points - properties: - minzoom: 17 - advanced: {} - - id: "bridge" - name: "bridge" - class: "" - geometry: "polygon" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels, - man_made, - name - FROM planet_osm_polygon - WHERE man_made = 'bridge' - ) AS bridge - properties: - minzoom: 12 - advanced: {} - - id: "buildings" - name: "buildings" - class: "" - geometry: "polygon" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - building - FROM planet_osm_polygon - WHERE building IS NOT NULL - AND building != 'no' - AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real - ORDER BY z_order, way_area DESC - ) AS buildings - properties: - minzoom: 13 - advanced: {} - - id: "buildings-major" - name: "buildings-major" - class: "" - geometry: "polygon" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - building, - amenity, - aeroway - FROM planet_osm_polygon - WHERE building IS NOT NULL - AND building != 'no' - AND (aeroway = 'terminal' OR amenity = 'place_of_worship') - AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real - ORDER BY z_order, way_area DESC) - AS buildings_major - properties: - minzoom: 13 - advanced: {} - - id: "tunnels" - name: "tunnels" - class: "tunnels-fill tunnels-casing access" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - # This query is quite large, having to deal with both roads, railways and - # runways. To allow for ways that are both railways and roads, a UNION - # ALL is present, and to use an ordering different than current osm2pgsql - # an order is generated in SQL. - table: |- - (SELECT - way, - (CASE WHEN substr(feature, length(feature)-3, 4) = 'link' THEN substr(feature, 0, length(feature)-4) ELSE feature END) AS feature, - horse, - foot, - bicycle, - tracktype, - int_surface, - access, - construction, - service, - link, - layernotnull - FROM ( -- subselect that contains both roads and rail/aero - SELECT - way, - ('highway_' || highway) AS feature, --only motorway to tertiary links are accepted later on - horse, - foot, - bicycle, - tracktype, - CASE WHEN surface IN ('unpaved', 'compacted', 'dirt', 'earth', 'fine_gravel', 'grass', 'grass_paver', 'gravel', 'ground', - 'mud', 'pebblestone', 'salt', 'sand', 'woodchips', 'clay') THEN 'unpaved' - WHEN surface IN ('paved', 'asphalt', 'cobblestone', 'cobblestone:flattened', 'sett', 'concrete', 'concrete:lanes', - 'concrete:plates', 'paving_stones', 'metal', 'wood') THEN 'paved' - ELSE NULL - END AS int_surface, - CASE WHEN access IN ('destination') THEN 'destination'::text - WHEN access IN ('no', 'private') THEN 'no'::text - ELSE NULL - END AS access, - construction, - CASE - WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text - ELSE 'INT-normal'::text - END AS service, - CASE - WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes' - ELSE 'no' - END AS link, - CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull - FROM planet_osm_line - WHERE (tunnel = 'yes' OR tunnel = 'building_passage' OR covered = 'yes') - AND highway IS NOT NULL -- end of road select - UNION ALL - SELECT - way, - COALESCE( - ('railway_' || (CASE WHEN railway = 'preserved' AND service IN ('spur', 'siding', 'yard') THEN 'INT-preserved-ssy'::text - WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' - WHEN (railway = 'tram' AND service IN ('spur', 'siding', 'yard')) THEN 'tram-service' ELSE railway END)), - ('aeroway_' || aeroway) - ) AS feature, - horse, - foot, - bicycle, - tracktype, - 'null', - CASE - WHEN access IN ('destination') THEN 'destination'::text - WHEN access IN ('no', 'private') THEN 'no'::text - ELSE NULL - END AS access, - construction, - CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service, - 'no' AS link, - CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull - FROM planet_osm_line - WHERE (tunnel = 'yes' OR tunnel = 'building_passage' OR covered = 'yes') - AND (railway IS NOT NULL OR aeroway IS NOT NULL) -- end of rail/aero select - ) AS features - JOIN (VALUES -- this join is also putting a condition on what is selected. features not matching it do not make it into the results. - ('railway_rail', 440), - ('railway_INT-preserved-ssy', 430), - ('railway_INT-spur-siding-yard', 430), - ('railway_subway', 420), - ('railway_narrow_gauge', 420), - ('railway_light_rail', 420), - ('railway_preserved', 420), - ('railway_funicular', 420), - ('railway_monorail', 420), - ('railway_miniature', 420), - ('railway_turntable', 420), - ('railway_tram', 410), - ('railway_tram-service', 405), - ('railway_disused', 400), - ('railway_construction', 400), - ('highway_motorway', 380), - ('highway_trunk', 370), - ('highway_primary', 360), - ('highway_secondary', 350), - ('highway_tertiary', 340), - ('highway_residential', 330), - ('highway_unclassified', 330), - ('highway_road', 330), - ('highway_living_street', 320), - ('highway_pedestrian', 310), - ('highway_raceway', 300), - ('highway_motorway_link', 240), - ('highway_trunk_link', 230), - ('highway_primary_link', 220), - ('highway_secondary_link', 210), - ('highway_tertiary_link', 200), - ('highway_service', 150), - ('highway_track', 110), - ('highway_path', 100), - ('highway_footway', 100), - ('highway_bridleway', 100), - ('highway_cycleway', 100), - ('highway_steps', 100), - ('highway_platform', 90), - ('railway_platform', 90), - ('aeroway_runway', 60), - ('aeroway_taxiway', 50), - ('highway_construction', 10) - ) AS ordertable (feature, prio) - USING (feature) - ORDER BY - layernotnull, - prio, - CASE WHEN access IN ('no', 'private') THEN 0 WHEN access IN ('destination') THEN 1 ELSE 2 END, - CASE WHEN int_surface IN ('unpaved') THEN 0 ELSE 2 END - ) AS tunnels - properties: - group-by: "layernotnull" - minzoom: 9 - advanced: {} - - id: "landuse-overlay" - name: "landuse-overlay" - class: "" - geometry: "polygon" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - landuse, - way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels - FROM planet_osm_polygon - WHERE landuse = 'military' - AND building IS NULL - ) AS landuse_overlay - properties: - minzoom: 7 - advanced: {} - - id: "line-barriers" - name: "line-barriers" - class: "barriers" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, COALESCE(historic, barrier) AS feature - FROM (SELECT way, - ('barrier_' || (CASE WHEN barrier IN ('chain', 'city_wall', 'embankment', 'ditch', 'fence', 'guard_rail', - 'handrail', 'hedge', 'kerb', 'retaining_wall', 'wall') THEN barrier ELSE NULL END)) AS barrier, - ('historic_' || (CASE WHEN historic = 'citywalls' THEN historic ELSE NULL END)) AS historic - FROM planet_osm_line - WHERE barrier IN ('chain', 'city_wall', 'embankment', 'ditch', 'fence', 'guard_rail', - 'handrail', 'hedge', 'kerb', 'retaining_wall', 'wall') - OR historic = 'city_wall' - AND (waterway IS NULL OR waterway NOT IN ('river', 'canal', 'derelict_canal', 'stream', 'drain', 'ditch', 'wadi')) - ) AS features - ) AS line_barriers - properties: - minzoom: 14 - advanced: {} - - id: "cliffs" - name: "cliffs" - class: "" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, "natural", man_made - FROM planet_osm_line - WHERE "natural" = 'cliff' OR man_made = 'embankment' - ) AS cliffs - properties: - minzoom: 13 - advanced: {} - - id: "area-barriers" - name: "area-barriers" - class: "barriers" - geometry: "polygon" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, barrier AS feature - FROM (SELECT way, - ('barrier_' || barrier) AS barrier - FROM planet_osm_polygon - WHERE barrier IS NOT NULL - ) AS features - ) AS area_barriers - properties: - minzoom: 16 - advanced: {} - - id: "ferry-routes" - name: "ferry-routes" - class: "" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way - FROM planet_osm_line - WHERE route = 'ferry' - ) AS ferry_routes - properties: - minzoom: 7 - advanced: {} - - id: "turning-circle-casing" - name: "turning-circle-casing" - class: "" - geometry: "point" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT DISTINCT ON (p.way) - p.way AS way, l.highway AS int_tc_type, - CASE WHEN l.service IN ('parking_aisle', 'drive-through', 'driveway') - THEN 'INT-minor'::text - ELSE 'INT-normal'::text - END AS int_tc_service - FROM planet_osm_point p - JOIN planet_osm_line l ON ST_DWithin(p.way, l.way, 0.1) -- Assumes Mercator - JOIN (VALUES - ('tertiary', 1), - ('unclassified', 2), - ('residential', 3), - ('living_street', 4), - ('service', 5) - ) AS v (highway, prio) - ON v.highway=l.highway - WHERE p.highway = 'turning_circle' - OR p.highway = 'turning_loop' - ORDER BY p.way, v.prio - ) AS turning_circle_casing - properties: - minzoom: 15 - advanced: {} - - id: "highway-area-casing" - name: "highway-area-casing" - class: "" - geometry: "polygon" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - COALESCE(( - 'highway_' || (CASE WHEN highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'cycleway', 'track', 'path', 'platform') THEN highway ELSE NULL END)), - ('railway_' || (CASE WHEN railway IN ('platform') THEN railway ELSE NULL END)) - ) AS feature - FROM planet_osm_polygon - WHERE highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'track', 'path', 'platform') - OR railway IN ('platform') - ORDER BY z_order, way_area DESC - ) AS highway_area_casing - properties: - minzoom: 14 - advanced: {} - - name: "roads-casing" - id: "roads-casing" - class: "roads-casing" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - (CASE WHEN substr(feature, length(feature)-3, 4) = 'link' THEN substr(feature, 0, length(feature)-4) ELSE feature END) AS feature, - horse, - foot, - bicycle, - tracktype, - int_surface, - access, - construction, - service, - link, - layernotnull - FROM ( -- subselect that contains both roads and rail/aero - SELECT - way, - ('highway_' || highway) AS feature, --only motorway to tertiary links are accepted later on - horse, - foot, - bicycle, - tracktype, - CASE WHEN surface IN ('unpaved', 'compacted', 'dirt', 'earth', 'fine_gravel', 'grass', 'grass_paver', 'gravel', 'ground', - 'mud', 'pebblestone', 'salt', 'sand', 'woodchips', 'clay') THEN 'unpaved' - WHEN surface IN ('paved', 'asphalt', 'cobblestone', 'cobblestone:flattened', 'sett', 'concrete', 'concrete:lanes', - 'concrete:plates', 'paving_stones', 'metal', 'wood') THEN 'paved' - ELSE NULL - END AS int_surface, - CASE WHEN access IN ('destination') THEN 'destination'::text - WHEN access IN ('no', 'private') THEN 'no'::text - ELSE NULL - END AS access, - construction, - CASE - WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text - ELSE 'INT-normal'::text - END AS service, - CASE - WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes' - ELSE 'no' - END AS link, - CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull - FROM planet_osm_line - WHERE (tunnel IS NULL OR NOT tunnel IN ('yes', 'building_passage')) - AND (covered IS NULL OR NOT covered = 'yes') - AND (bridge IS NULL OR NOT bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct')) - AND highway IS NOT NULL -- end of road select - UNION ALL - SELECT - way, - COALESCE( - ('railway_' || (CASE WHEN railway = 'preserved' AND service IN ('spur', 'siding', 'yard') THEN 'INT-preserved-ssy'::text - WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' - WHEN (railway = 'tram' AND service IN ('spur', 'siding', 'yard')) THEN 'tram-service' ELSE railway END)), - ('aeroway_' || aeroway) - ) AS feature, - horse, - foot, - bicycle, - tracktype, - 'null', - CASE - WHEN access IN ('destination') THEN 'destination'::text - WHEN access IN ('no', 'private') THEN 'no'::text - ELSE NULL - END AS access, - construction, - CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service, - 'no' AS link, - CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull - FROM planet_osm_line - WHERE (tunnel IS NULL OR NOT tunnel IN ('yes', 'building_passage')) - AND (covered IS NULL OR NOT covered = 'yes') - AND (bridge IS NULL OR NOT bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct')) - AND (railway IS NOT NULL OR aeroway IS NOT NULL) -- end of rail/aero select - ) AS features - JOIN (VALUES -- this join is also putting a condition on what is selected. features not matching it do not make it into the results. - ('railway_rail', 440), - ('railway_INT-preserved-ssy', 430), - ('railway_INT-spur-siding-yard', 430), - ('railway_subway', 420), - ('railway_narrow_gauge', 420), - ('railway_light_rail', 420), - ('railway_preserved', 420), - ('railway_funicular', 420), - ('railway_monorail', 420), - ('railway_miniature', 420), - ('railway_turntable', 420), - ('railway_tram', 410), - ('railway_tram-service', 405), - ('railway_disused', 400), - ('railway_construction', 400), - ('highway_motorway', 380), - ('highway_trunk', 370), - ('highway_primary', 360), - ('highway_secondary', 350), - ('highway_tertiary', 340), - ('highway_residential', 330), - ('highway_unclassified', 330), - ('highway_road', 330), - ('highway_living_street', 320), - ('highway_pedestrian', 310), - ('highway_raceway', 300), - ('highway_motorway_link', 240), - ('highway_trunk_link', 230), - ('highway_primary_link', 220), - ('highway_secondary_link', 210), - ('highway_tertiary_link', 200), - ('highway_service', 150), - ('highway_track', 110), - ('highway_path', 100), - ('highway_footway', 100), - ('highway_bridleway', 100), - ('highway_cycleway', 100), - ('highway_steps', 100), - ('highway_platform', 90), - ('railway_platform', 90), - ('aeroway_runway', 60), - ('aeroway_taxiway', 50), - ('highway_construction', 10) - ) AS ordertable (feature, prio) - USING (feature) - ORDER BY - layernotnull, - prio, - CASE WHEN access IN ('no', 'private') THEN 0 WHEN access IN ('destination') THEN 1 ELSE 2 END, - CASE WHEN int_surface IN ('unpaved') THEN 0 ELSE 2 END - ) AS roads_casing - properties: - minzoom: 9 - advanced: {} - - id: "highway-area-fill" - name: "highway-area-fill" - class: "" - # FIXME: No geometry? - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - COALESCE( - ('highway_' || (CASE WHEN highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'cycleway', 'living_street', - 'track', 'path', 'platform', 'services') THEN highway ELSE NULL END)), - ('railway_' || (CASE WHEN railway IN ('platform') THEN railway ELSE NULL END)), - (('aeroway_' || CASE WHEN aeroway IN ('runway', 'taxiway', 'helipad') THEN aeroway ELSE NULL END)) - ) AS feature - FROM planet_osm_polygon - WHERE highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'living_street', 'track', 'path', 'platform', 'services') - OR railway IN ('platform') - OR aeroway IN ('runway', 'taxiway', 'helipad') - ORDER BY z_order, way_area desc - ) AS highway_area_fill - properties: - minzoom: 14 - advanced: {} - - id: "roads-fill" - name: "roads-fill" - class: "roads-fill access" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - # This is one of the most complex layers, so it bears explaining in some detail - # It is necessary to - # - Have roads and railways in the same layer to get ordering right - # - Return two linestrings for ways which are both a road and railway - # - Compute z_order here, rather than rely on osm2pgsql z_order - table: |- - (SELECT - way, - (CASE WHEN substr(feature, length(feature)-3, 4) = 'link' THEN substr(feature, 0, length(feature)-4) ELSE feature END) AS feature, - horse, - foot, - bicycle, - tracktype, - int_surface, - access, - construction, - service, - link, - layernotnull - FROM ( -- begin "features" subselect that contains both roads and rail/aero - SELECT - way, - ('highway_' || highway) AS feature, -- only motorway to tertiary links are accepted later on - horse, - foot, - bicycle, - tracktype, - CASE WHEN surface IN ('unpaved', 'compacted', 'dirt', 'earth', 'fine_gravel', 'grass', 'grass_paver', 'gravel', 'ground', - 'mud', 'pebblestone', 'salt', 'sand', 'woodchips', 'clay') THEN 'unpaved' - WHEN surface IN ('paved', 'asphalt', 'cobblestone', 'cobblestone:flattened', 'sett', 'concrete', 'concrete:lanes', - 'concrete:plates', 'paving_stones', 'metal', 'wood') THEN 'paved' - ELSE NULL - END AS int_surface, - CASE WHEN access IN ('destination') THEN 'destination'::text - WHEN access IN ('no', 'private') THEN 'no'::text - ELSE NULL - END AS access, - construction, - CASE - WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text - ELSE 'INT-normal'::text - END AS service, - CASE - WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes' - ELSE 'no' - END AS link, - CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull - FROM planet_osm_line - WHERE (tunnel IS NULL OR NOT tunnel IN ('yes', 'building_passage')) - AND (covered IS NULL OR NOT covered = 'yes') - AND (bridge IS NULL OR NOT bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct')) - AND highway IS NOT NULL -- end of road select - UNION ALL - SELECT - way, - COALESCE( - ('railway_' || (CASE WHEN railway = 'preserved' AND service IN ('spur', 'siding', 'yard') THEN 'INT-preserved-ssy'::text - WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' - WHEN (railway = 'tram' AND service IN ('spur', 'siding', 'yard')) THEN 'tram-service' ELSE railway END)), - ('aeroway_' || aeroway) - ) AS feature, - horse, - foot, - bicycle, - tracktype, - 'null' AS surface, -- Should be a SQL NULL? - CASE - WHEN access IN ('destination') THEN 'destination'::text - WHEN access IN ('no', 'private') THEN 'no'::text - ELSE NULL - END AS access, - construction, - CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service, - 'no' AS link, - CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull - FROM planet_osm_line - WHERE (tunnel IS NULL OR NOT tunnel IN ('yes', 'building_passage')) - AND (covered IS NULL OR NOT covered = 'yes') - AND (bridge IS NULL OR NOT bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct')) - AND (railway IS NOT NULL OR aeroway IS NOT NULL) -- end of rail/aero select - ) AS features - JOIN (VALUES -- this join is also putting a condition on what is selected. features not matching it do not make it into the results. - ('railway_rail', 440), - ('railway_INT-preserved-ssy', 430), - ('railway_INT-spur-siding-yard', 430), - ('railway_subway', 420), - ('railway_narrow_gauge', 420), - ('railway_light_rail', 420), - ('railway_preserved', 420), - ('railway_funicular', 420), - ('railway_monorail', 420), - ('railway_miniature', 420), - ('railway_turntable', 420), - ('railway_tram', 410), - ('railway_tram-service', 405), - ('railway_disused', 400), - ('railway_construction', 400), - ('highway_motorway', 380), - ('highway_trunk', 370), - ('highway_primary', 360), - ('highway_secondary', 350), - ('highway_tertiary', 340), - ('highway_residential', 330), - ('highway_unclassified', 330), - ('highway_road', 330), - ('highway_living_street', 320), - ('highway_pedestrian', 310), - ('highway_raceway', 300), - ('highway_motorway_link', 240), - ('highway_trunk_link', 230), - ('highway_primary_link', 220), - ('highway_secondary_link', 210), - ('highway_tertiary_link', 200), - ('highway_service', 150), - ('highway_track', 110), - ('highway_path', 100), - ('highway_footway', 100), - ('highway_bridleway', 100), - ('highway_cycleway', 100), - ('highway_steps', 100), - ('highway_platform', 90), - ('railway_platform', 90), - ('aeroway_runway', 60), - ('aeroway_taxiway', 50), - ('highway_construction', 10) - ) AS ordertable (feature, prio) - USING (feature) - ORDER BY - layernotnull, - prio, - CASE WHEN access IN ('no', 'private') THEN 0 WHEN access IN ('destination') THEN 1 ELSE 2 END, - CASE WHEN int_surface IN ('unpaved') THEN 0 ELSE 2 END - ) AS roads_fill - properties: - minzoom: 10 - advanced: {} - - id: "turning-circle-fill" - name: "turning-circle-fill" - class: "" - geometry: "point" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - DISTINCT on (p.way) - p.way AS way, l.highway AS int_tc_type, - CASE WHEN l.service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text - ELSE 'INT-normal'::text END AS int_tc_service - FROM planet_osm_point p - JOIN planet_osm_line l - ON ST_DWithin(p.way, l.way, 0.1) - JOIN (VALUES - ('tertiary', 1), - ('unclassified', 2), - ('residential', 3), - ('living_street', 4), - ('service', 5), - ('track', 6) - ) AS v (highway, prio) - ON v.highway=l.highway - WHERE p.highway = 'turning_circle' OR p.highway = 'turning_loop' - ORDER BY p.way, v.prio - ) AS turning_circle_fill - properties: - minzoom: 15 - advanced: {} - - id: "aerialways" - name: "aerialways" - class: "" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - aerialway - FROM planet_osm_line - WHERE aerialway IS NOT NULL - ) AS aerialways - properties: - minzoom: 12 - advanced: {} - - id: "roads-low-zoom" - name: "roads-low-zoom" - class: "" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - COALESCE( - ('highway_' || (CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN substr(highway, 0, length(highway)-4) ELSE highway end)), - ('railway_' || (CASE WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' - WHEN railway IN ('rail', 'tram', 'light_rail', 'funicular', 'narrow_gauge') THEN railway ELSE NULL END)) - ) AS feature, - CASE WHEN tunnel = 'yes' OR tunnel = 'building_passage' OR covered = 'yes' THEN 'yes' ELSE 'no' END AS int_tunnel, - CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes' ELSE 'no' END AS link, - CASE WHEN surface IN ('unpaved', 'compacted', 'dirt', 'earth', 'fine_gravel', 'grass', 'grass_paver', 'gravel', 'ground', - 'mud', 'pebblestone', 'salt', 'sand', 'woodchips', 'clay') THEN 'unpaved' - WHEN surface IN ('paved', 'asphalt', 'cobblestone', 'cobblestone:flattened', 'sett', 'concrete', 'concrete:lanes', - 'concrete:plates', 'paving_stones', 'metal', 'wood') THEN 'paved' - ELSE NULL - END AS int_surface - FROM planet_osm_roads - WHERE highway IS NOT NULL - OR (railway IS NOT NULL AND railway != 'preserved' - AND (service IS NULL OR service NOT IN ('spur', 'siding', 'yard'))) - ORDER BY z_order - ) AS roads_low_zoom - properties: - minzoom: 5 - maxzoom: 9 - advanced: {} - - id: "waterway-bridges" - name: "waterway-bridges" - class: "water-lines" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - waterway, - name, - intermittent, - CASE WHEN tunnel IN ('yes', 'culvert') THEN 'yes' ELSE 'no' END AS int_tunnel, - 'yes' AS bridge - FROM planet_osm_line - WHERE waterway IN ('river', 'canal', 'derelict_canal', 'stream', 'drain', 'ditch', 'wadi') - AND bridge IN ('yes', 'aqueduct') - ORDER BY z_order - ) AS waterway_bridges - properties: - minzoom: 15 - advanced: {} - - id: "bridges" - name: "bridges" - class: "bridges-fill bridges-casing access" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - (CASE WHEN substr(feature, length(feature)-3, 4) = 'link' THEN substr(feature, 0, length(feature)-4) ELSE feature END) AS feature, - horse, - foot, - bicycle, - tracktype, - int_surface, - access, - construction, - service, - link, - layernotnull - FROM ( -- subselect that contains both roads and rail/aero - SELECT - way, - ('highway_' || highway) AS feature, --only motorway to tertiary links are accepted later on - horse, - foot, - bicycle, - tracktype, - CASE WHEN surface IN ('unpaved', 'compacted', 'dirt', 'earth', 'fine_gravel', 'grass', 'grass_paver', 'gravel', 'ground', - 'mud', 'pebblestone', 'salt', 'sand', 'woodchips', 'clay') THEN 'unpaved' - WHEN surface IN ('paved', 'asphalt', 'cobblestone', 'cobblestone:flattened', 'sett', 'concrete', 'concrete:lanes', - 'concrete:plates', 'paving_stones', 'metal', 'wood') THEN 'paved' - ELSE NULL - END AS int_surface, - CASE WHEN access IN ('destination') THEN 'destination'::text - WHEN access IN ('no', 'private') THEN 'no'::text - ELSE NULL - END AS access, - construction, - CASE - WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text - ELSE 'INT-normal'::text - END AS service, - CASE - WHEN substr(highway, length(highway)-3, 4) = 'link' THEN 'yes' - ELSE 'no' - END AS link, - CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull - FROM planet_osm_line - WHERE bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct') - AND highway IS NOT NULL -- end of road select - UNION ALL - SELECT - way, - COALESCE( - ('railway_' || (CASE WHEN railway = 'preserved' AND service IN ('spur', 'siding', 'yard') THEN 'INT-preserved-ssy'::text - WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard' - WHEN (railway = 'tram' AND service IN ('spur', 'siding', 'yard')) THEN 'tram-service' ELSE railway END)), - ('aeroway_' || aeroway) - ) AS feature, - horse, - foot, - bicycle, - tracktype, - 'null', - CASE - WHEN access IN ('destination') THEN 'destination'::text - WHEN access IN ('no', 'private') THEN 'no'::text - ELSE NULL - END AS access, - construction, - CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service, - 'no' AS link, - CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END AS layernotnull - FROM planet_osm_line - WHERE bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct') - AND (railway IS NOT NULL OR aeroway IS NOT NULL) -- end of rail/aero select - ) AS features - JOIN (VALUES -- this join is also putting a condition on what is selected. features not matching it do not make it into the results. - ('railway_rail', 440), - ('railway_INT-preserved-ssy', 430), - ('railway_INT-spur-siding-yard', 430), - ('railway_subway', 420), - ('railway_narrow_gauge', 420), - ('railway_light_rail', 420), - ('railway_preserved', 420), - ('railway_funicular', 420), - ('railway_monorail', 420), - ('railway_miniature', 420), - ('railway_turntable', 420), - ('railway_tram', 410), - ('railway_tram-service', 405), - ('railway_disused', 400), - ('railway_construction', 400), - ('highway_motorway', 380), - ('highway_trunk', 370), - ('highway_primary', 360), - ('highway_secondary', 350), - ('highway_tertiary', 340), - ('highway_residential', 330), - ('highway_unclassified', 330), - ('highway_road', 330), - ('highway_living_street', 320), - ('highway_pedestrian', 310), - ('highway_raceway', 300), - ('highway_motorway_link', 240), - ('highway_trunk_link', 230), - ('highway_primary_link', 220), - ('highway_secondary_link', 210), - ('highway_tertiary_link', 200), - ('highway_service', 150), - ('highway_track', 110), - ('highway_path', 100), - ('highway_footway', 100), - ('highway_bridleway', 100), - ('highway_cycleway', 100), - ('highway_steps', 100), - ('highway_platform', 90), - ('railway_platform', 90), - ('aeroway_runway', 60), - ('aeroway_taxiway', 50), - ('highway_construction', 10) - ) AS ordertable (feature, prio) - USING (feature) - ORDER BY - layernotnull, - prio, - CASE WHEN access IN ('no', 'private') THEN 0 WHEN access IN ('destination') THEN 1 ELSE 2 END, - CASE WHEN int_surface IN ('unpaved') THEN 0 ELSE 2 END - ) AS bridges - properties: - group-by: "layernotnull" - minzoom: 9 - advanced: {} - - id: "guideways" - name: "guideways" - class: "" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way - FROM planet_osm_line - WHERE highway = 'bus_guideway' - ) AS guideways - properties: - minzoom: 13 - advanced: {} - - name: "admin-low-zoom" - id: "admin-low-zoom" - class: "" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - admin_level - FROM planet_osm_roads - WHERE boundary = 'administrative' - AND admin_level IN ('0', '1', '2', '3', '4') - AND osm_id < 0 - ORDER BY admin_level DESC - ) AS admin_low_zoom - properties: - minzoom: 4 - maxzoom: 10 - advanced: {} - - id: "admin-mid-zoom" - name: "admin-mid-zoom" - class: "" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - admin_level - FROM planet_osm_roads - WHERE boundary = 'administrative' - AND admin_level IN ('0', '1', '2', '3', '4', '5', '6', '7', '8') - AND osm_id < 0 - ORDER BY admin_level DESC - ) AS admin_mid_zoom - properties: - minzoom: 11 - maxzoom: 12 - advanced: {} - - id: "admin-high-zoom" - name: "admin-high-zoom" - class: "" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - admin_level - FROM planet_osm_roads - WHERE boundary = 'administrative' - AND admin_level IN ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10') - AND osm_id < 0 - ORDER BY admin_level::integer DESC -- With 10 as a valid value, we need to do a numeric ordering, not a text ordering - ) AS admin_high_zoom - properties: - minzoom: 13 - advanced: {} - - id: "power-minorline" - name: "power-minorline" - class: "" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way - FROM planet_osm_line - WHERE power = 'minor_line' - ) AS power_minorline - properties: - minzoom: 16 - advanced: {} - - id: "power-line" - name: "power-line" - class: "" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way - FROM planet_osm_line - WHERE power = 'line' - ) AS power_line - properties: - minzoom: 14 - advanced: {} - - id: "nature-reserve-boundaries" - name: "nature-reserve-boundaries" - class: "" - geometry: "polygon" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - name, - boundary, - way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels - FROM planet_osm_polygon - WHERE (boundary = 'national_park' OR leisure = 'nature_reserve') - AND building IS NULL - AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real - ) AS national_park_boundaries - properties: - minzoom: 7 - advanced: {} - - id: "tourism-boundary" - name: "tourism-boundary" - class: "" - geometry: "polygon" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels, - name, - tourism - FROM planet_osm_polygon - WHERE tourism = 'theme_park' - OR tourism = 'zoo' - ) AS tourism_boundary - properties: - minzoom: 10 - advanced: {} - - id: "trees" - name: "trees" - class: "" - geometry: "polygon" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, "natural" - FROM planet_osm_point - WHERE "natural" = 'tree' - UNION ALL - SELECT - way, "natural" - FROM planet_osm_line - WHERE "natural" = 'tree_row' - ) AS trees - properties: - minzoom: 16 - advanced: {} - - id: "country-names" - name: "country-names" - class: "country" - geometry: "point" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels, - name - FROM planet_osm_polygon - WHERE boundary = 'administrative' - AND admin_level = '2' - AND name IS NOT NULL - AND way_area > 100*!pixel_width!::real*!pixel_height!::real - ORDER BY way_area DESC - ) AS country_names - properties: - minzoom: 2 - - id: "capital-names" - name: "capital-names" - class: "" - geometry: "point" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - name, - CASE - WHEN (population ~ '^[0-9]{1,8}$') THEN population::INTEGER ELSE 0 - END as population, - round(random()) AS dir - FROM planet_osm_point - WHERE capital = 'yes' - AND admin_level = '2' - ORDER BY population DESC - ) AS capital_names - properties: - minzoom: 3 - maxzoom: 15 - advanced: {} - - id: "state-names" - name: "state-names" - class: "state" - geometry: "point" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels, - name, - ref - FROM planet_osm_polygon - WHERE boundary = 'administrative' - AND admin_level = '4' - AND name IS NOT NULL - AND way_area > 100*!pixel_width!::real*!pixel_height!::real - ORDER BY way_area DESC - ) AS state_names - properties: - minzoom: 4 - advanced: {} - - id: "placenames-medium" - name: "placenames-medium" - class: "" - geometry: "point" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - name, - score, - CASE - WHEN (place = 'city') THEN 1 - ELSE 2 - END as category, - round(random()) AS dir - FROM - (SELECT - way, - place, - name, - ( - (CASE - WHEN (population ~ '^[0-9]{1,8}$') THEN population::INTEGER - WHEN (place = 'city') THEN 100000 - WHEN (place = 'town') THEN 1000 - ELSE 1 - END) - * - (CASE - WHEN (capital = '4' OR (capital = 'yes' AND admin_level = '4')) THEN 2 - ELSE 1 - END) - ) AS score - FROM planet_osm_point - WHERE place IN ('city', 'town') - AND name IS NOT NULL - AND capital IS NULL OR capital != 'yes' OR (capital = 'yes' AND admin_level != '2') - ) as p - ORDER BY score DESC, length(name) DESC, name - ) AS placenames_medium - properties: - minzoom: 4 - maxzoom: 15 - advanced: {} - - id: "placenames-small" - name: "placenames-small" - class: "" - geometry: "point" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - place, - name - FROM planet_osm_point - WHERE place IN ('suburb', 'village', 'hamlet', 'neighbourhood', 'locality', 'isolated_dwelling', 'farm') - AND name IS NOT NULL - ORDER BY CASE - WHEN place = 'suburb' THEN 3 - WHEN place = 'village' THEN 4 - WHEN place = 'hamlet' THEN 5 - WHEN place = 'neighbourhood' THEN 6 - WHEN place = 'locality' THEN 7 - WHEN place = 'isolated_dwelling' THEN 8 - WHEN place = 'farm' THEN 9 - END ASC, length(name) DESC, name - ) AS placenames_small - properties: - minzoom: 12 - advanced: {} - - id: "stations" - class: "stations" - name: "stations" - geometry: "point" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - name, - railway, - aerialway, - CASE railway - WHEN 'station' THEN 1 - WHEN 'subway_entrance' THEN 3 - ELSE 2 - END - AS prio - FROM planet_osm_point - WHERE railway IN ('station', 'halt', 'tram_stop', 'subway_entrance') - OR aerialway = 'station' - ORDER BY prio - ) AS stations - properties: - minzoom: 12 - advanced: {} - - id: "stations-poly" - name: "stations-poly" - class: "stations" - geometry: "polygon" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - name, - railway, - aerialway - FROM planet_osm_polygon - WHERE railway IN ('station', 'halt', 'tram_stop') - OR aerialway = 'station' - ) AS stations_poly - properties: - minzoom: 12 - advanced: {} - - id: "amenity-points-poly" - name: "amenity-points-poly" - class: "points" - geometry: "polygon" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - COALESCE( - 'aeroway_' || CASE WHEN aeroway IN ('helipad', 'aerodrome') THEN aeroway ELSE NULL END, - 'tourism_' || CASE WHEN tourism IN ('artwork', 'alpine_hut', 'camp_site', 'caravan_site', 'chalet', 'guest_house', - 'hostel', 'hotel', 'motel', 'information', 'museum', 'picnic_site') THEN tourism ELSE NULL END, - 'amenity_' || CASE WHEN amenity IN ('shelter', 'atm', 'bank', 'bar', 'bicycle_rental', 'bus_station', 'cafe', - 'car_rental', 'car_wash', 'cinema', 'clinic', 'community_centre', 'fire_station', 'fountain', - 'fuel', 'hospital', 'ice_cream', 'embassy', 'library', 'courthouse', 'townhall', 'parking', - 'bicycle_parking', 'motorcycle_parking', 'pharmacy', 'doctors', 'dentist', 'place_of_worship', - 'police', 'post_box', 'post_office', 'pub', 'biergarten', 'recycling', 'restaurant', 'food_court', - 'fast_food', 'telephone', 'emergency_phone', 'taxi', 'theatre', 'toilets', 'drinking_water', - 'prison', 'hunting_stand', 'nightclub', 'veterinary', 'social_facility', - 'charging_station') THEN amenity ELSE NULL END, - 'shop_' || CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer', - 'confectionery', 'fashion', 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', - 'garden_centre', 'hairdresser', 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', - 'photo', 'photo_studio', 'photography', 'seafood', 'shoes', 'alcohol', 'gift', 'furniture', 'kiosk', - 'mobile_phone', 'motorcycle', 'musical_instrument', 'newsagent', 'optician', 'jewelry', 'jewellery', - 'electronics', 'chemist', 'toys', 'travel_agency', 'car_parts', 'greengrocer', 'farm', 'stationery', - 'laundry', 'dry_cleaning', 'beverages', 'perfumery', 'cosmetics', 'variety_store', 'wine', 'outdoor', - 'copyshop', 'sports', 'deli', 'tobacco', 'art', 'tea') THEN shop - WHEN shop IN ('accessories', 'antiques', 'appliance', 'baby_goods', 'bathroom_furnishing', - 'bed', 'boat', 'bookmaker', 'boutique', 'builder', 'building_materials', 'camera', 'car_service', - 'carpet', 'charity', 'cheese', 'chocolate', 'coffee', 'communication', 'craft', 'curtain', 'dairy', - 'discount', 'e-cigarette', 'electrical', 'energy', 'erotic', 'estate_agent', - 'fabric', 'fishing', 'flooring', 'food', 'frame', 'frozen_food', 'funeral_directors', 'furnace', - 'gallery', 'games', 'gas', 'general', 'glaziery', 'grocery', 'health', 'health_food', 'hearing_aids', - 'herbalist', 'hobby', 'household', 'houseware', 'hunting', 'interior_decoration', 'kitchen', - 'leather', 'lighting', 'locksmith', 'lottery', 'market', 'massage', 'medical', 'medical_supply', 'money_lender', - 'motorcycle_repair', 'music', 'office_supplies', 'organic', 'paint', 'pastry', 'pawnbroker', - 'phone', 'pottery', 'printing', 'radiotechnics', 'real_estate', 'religion', 'rental', 'salon', - 'scuba_diving', 'second_hand', 'sewing', 'shoe_repair', 'shopping_centre', 'solarium', 'souvenir', - 'tailor', 'tanning', 'tattoo', 'ticket', 'tiles', 'trade', 'tyres', 'vacuum_cleaner', 'video', - 'video_games', 'watches', 'wholesale', 'yes') THEN 'other' ELSE NULL END, - 'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table') THEN leisure ELSE NULL END, - 'man_made_' || CASE WHEN man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk') THEN man_made ELSE NULL END, - 'natural_' || CASE WHEN "natural" IN ('spring') THEN "natural" ELSE NULL END, - 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END, - 'highway_'|| CASE WHEN highway IN ('bus_stop', 'elevator', 'traffic_signals') THEN highway ELSE NULL END, - 'power_' || CASE WHEN power IN ('generator') THEN power ELSE NULL END, - 'tourism_' || CASE WHEN tourism IN ('viewpoint') THEN tourism ELSE NULL END - ) AS feature, - access, - religion, - denomination, - "generator:source", - power_source, - way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels - FROM planet_osm_polygon - -- The upcoming where clause is needed for performance only, as the CASE statements would end up doing the equivalent filtering - WHERE aeroway IN ('helipad', 'aerodrome') - OR tourism IN ('artwork', 'alpine_hut', 'camp_site', 'caravan_site', 'chalet', 'guest_house', 'hostel', - 'hotel', 'motel', 'information', 'museum', 'viewpoint', 'picnic_site') - OR amenity IN ('shelter', 'atm', 'bank', 'bar', 'bicycle_rental', 'bus_station', 'cafe', - 'car_rental', 'car_wash', 'cinema', 'clinic', 'community_centre', - 'fire_station', 'fountain', 'fuel', 'hospital', 'ice_cream', 'embassy', 'library', 'courthouse', - 'townhall', 'parking', 'bicycle_parking', 'motorcycle_parking', 'pharmacy', 'doctors', - 'dentist', 'place_of_worship', 'police', 'post_box', 'post_office', 'pub', 'biergarten', - 'recycling', 'restaurant', 'food_court', 'fast_food', 'telephone', 'emergency_phone', 'taxi', - 'theatre', 'toilets', 'drinking_water', 'prison', 'hunting_stand', 'nightclub', 'veterinary', - 'social_facility', 'charging_station') - OR shop IS NOT NULL -- skip checking a huge list and use a null check - OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table') - OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk') - OR "natural" IN ('spring') - OR historic IN ('memorial', 'monument', 'archaeological_site') - OR highway IN ('bus_stop', 'elevator', 'traffic_signals') - OR (power = 'generator' AND ("generator:source" = 'wind' OR power_source = 'wind')) - ORDER BY way_area desc - ) AS amenity_points_poly - properties: - minzoom: 10 - advanced: {} - - id: "amenity-points" - name: "amenity-points" - class: "points" - geometry: "point" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - COALESCE( - 'aeroway_' || CASE WHEN aeroway IN ('helipad', 'aerodrome') THEN aeroway ELSE NULL END, - 'tourism_' || CASE WHEN tourism IN ('artwork', 'alpine_hut', 'camp_site', 'caravan_site', 'chalet', 'guest_house', 'hostel', - 'hotel', 'motel', 'information', 'museum', 'picnic_site') THEN tourism ELSE NULL END, - 'amenity_' || CASE WHEN amenity IN ('shelter', 'atm', 'bank', 'bar', 'bicycle_rental', 'bus_station', 'cafe', - 'car_rental', 'car_wash', 'cinema', 'clinic', 'community_centre', 'fire_station', 'fountain', - 'fuel', 'hospital', 'ice_cream', 'embassy', 'library', 'courthouse', 'townhall', 'parking', - 'bicycle_parking', 'motorcycle_parking', 'pharmacy', 'doctors', 'dentist', 'place_of_worship', - 'police', 'post_box', 'post_office', 'pub', 'biergarten', 'recycling', 'restaurant', 'food_court', - 'fast_food', 'telephone', 'emergency_phone', 'taxi', 'theatre', 'toilets', 'drinking_water', - 'prison', 'hunting_stand', 'nightclub', 'veterinary', 'social_facility', - 'charging_station') THEN amenity ELSE NULL END, - 'shop_' || CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer', 'confectionery', - 'fashion', 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', 'garden_centre', - 'hairdresser', 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', 'photo', 'photo_studio', - 'photography', 'seafood', 'shoes', 'alcohol', 'gift', 'furniture', 'kiosk', 'mobile_phone', 'motorcycle', - 'musical_instrument', 'newsagent', 'optician', 'jewelry', 'jewellery', 'electronics', 'chemist', 'toys', - 'travel_agency', 'car_parts', 'greengrocer', 'farm', 'stationery', 'laundry', 'dry_cleaning', 'beverages', - 'perfumery', 'cosmetics', 'variety_store', 'wine', 'outdoor', 'copyshop', 'sports', 'deli', 'tobacco', 'art', 'tea') THEN shop - WHEN shop IN ('accessories', 'antiques', 'appliance', 'baby_goods', 'bathroom_furnishing', 'bed', - 'boat', 'bookmaker', 'boutique', 'builder', 'building_materials', 'camera', 'car_service', 'carpet', 'charity', - 'cheese', 'chocolate', 'coffee', 'communication', 'craft', 'curtain', 'dairy', - 'discount', 'e-cigarette', 'electrical', 'energy', 'erotic', 'estate_agent', 'fabric', 'fishing', - 'flooring', 'food', 'frame', 'frozen_food', 'funeral_directors', 'furnace', 'gallery', 'games', 'gas', - 'general', 'glaziery', 'grocery', 'health', 'health_food', 'hearing_aids', 'herbalist', 'hobby', 'household', - 'houseware', 'hunting', 'interior_decoration', 'kitchen', 'leather', 'lighting', 'locksmith', 'lottery', - 'market', 'massage', 'medical', 'medical_supply', 'money_lender', 'motorcycle_repair', 'music', 'office_supplies', - 'organic', 'paint', 'pastry', 'pawnbroker', 'phone', 'pottery', 'printing', 'radiotechnics', - 'real_estate', 'religion', 'rental', 'salon', 'scuba_diving', 'second_hand', 'sewing', 'shoe_repair', 'shopping_centre', - 'solarium', 'souvenir', 'tailor', 'tanning', 'tattoo', 'ticket', 'tiles', 'trade', 'tyres', - 'vacuum_cleaner', 'video', 'video_games', 'watches', 'wholesale', 'yes') THEN 'other' ELSE NULL END, - 'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway', - 'dog_park') THEN leisure ELSE NULL END, - 'man_made_' || CASE WHEN man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk') THEN man_made ELSE NULL END, - 'natural_' || CASE WHEN "natural" IN ('peak', 'volcano', 'saddle', 'spring', 'cave_entrance') THEN "natural" ELSE NULL END, - 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END, - 'highway_'|| CASE WHEN highway IN ('bus_stop', 'elevator', 'traffic_signals', 'ford') THEN highway ELSE NULL END, - 'power_' || CASE WHEN power IN ('generator') THEN power ELSE NULL END, - 'tourism_' || CASE WHEN tourism IN ('viewpoint') THEN tourism ELSE NULL END, - 'man_made_' || CASE WHEN man_made IN ('cross') THEN man_made ELSE NULL END, - 'historic_' || CASE WHEN historic IN ('wayside_cross') THEN historic ELSE NULL END - ) AS feature, - access, - CASE - WHEN "natural" IN ('peak', 'volcano', 'saddle') THEN - CASE - WHEN ele ~ '^-?\d{1,4}(\.\d+)?$' THEN ele::NUMERIC - ELSE NULL - END - ELSE NULL - END AS score, - religion, - denomination, - "generator:source", - power_source, - NULL AS way_pixels - FROM planet_osm_point - -- The upcoming where clause is needed for performance only, as the CASE statements would end up doing the equivalent filtering - WHERE aeroway IN ('helipad', 'aerodrome') - OR tourism IN ('artwork', 'alpine_hut', 'camp_site', 'caravan_site', 'chalet', 'guest_house', 'hostel', - 'hotel', 'motel', 'information', 'museum', 'viewpoint', 'picnic_site') - OR amenity IN ('shelter', 'atm', 'bank', 'bar', 'bicycle_rental', 'bus_station', 'cafe', - 'car_rental', 'car_wash', 'cinema', 'clinic', 'community_centre', - 'fire_station', 'fountain', 'fuel', 'hospital', 'ice_cream', 'embassy', 'library', 'courthouse', - 'townhall', 'parking', 'bicycle_parking', 'motorcycle_parking', 'pharmacy', 'doctors', - 'dentist', 'place_of_worship', 'police', 'post_box', 'post_office', 'pub', 'biergarten', - 'recycling', 'restaurant', 'food_court', 'fast_food', 'telephone', 'emergency_phone', - 'taxi', 'theatre', 'toilets', 'drinking_water', 'prison', 'hunting_stand', 'nightclub', - 'veterinary', 'social_facility', 'charging_station') - OR shop IS NOT NULL -- skip checking a huge list and use a null check - OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway', - 'dog_park') - OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'cross', 'obelisk') - OR "natural" IN ('peak', 'volcano', 'saddle', 'spring', 'cave_entrance') - OR historic IN ('memorial', 'monument', 'archaeological_site', 'wayside_cross') - OR highway IN ('bus_stop', 'elevator', 'traffic_signals', 'ford') - OR (power = 'generator' AND ("generator:source" = 'wind' OR power_source = 'wind')) - ORDER BY score DESC NULLS LAST - ) AS amenity_points - properties: - minzoom: 10 - advanced: {} - - id: "power-towers" - name: "power-towers" - class: "" - geometry: "point" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way - FROM planet_osm_point - WHERE power = 'tower' - ) AS power_towers - properties: - minzoom: 14 - advanced: {} - - id: "power-poles" - name: "power-poles" - class: "" - geometry: "point" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way - FROM planet_osm_point - WHERE power = 'pole' - ) AS power_poles - properties: - minzoom: 16 - advanced: {} - - id: "roads-text-ref-low-zoom" - name: "roads-text-ref-low-zoom" - class: "" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - highway, - height, - width, - refs - FROM ( - SELECT - way, highway, - array_length(refs,1) AS height, - (SELECT MAX(char_length(ref)) FROM unnest(refs) AS u(ref)) AS width, - array_to_string(refs, E'\n') AS refs - FROM ( - SELECT - way, - highway, - string_to_array(ref, ';') AS refs - FROM planet_osm_roads - WHERE highway IN ('motorway', 'trunk', 'primary', 'secondary') - AND ref IS NOT NULL - ) AS p) AS q - WHERE height <= 4 AND width <= 11) AS roads_text_ref_low_zoom - properties: - minzoom: 10 - maxzoom: 12 - advanced: {} - - id: "junctions" - name: "junctions" - class: "" - geometry: "point" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - highway, - junction, - ref, - name - FROM planet_osm_point - WHERE highway = 'motorway_junction' OR highway = 'traffic_signals' OR junction = 'yes' - ) AS junctions - properties: - minzoom: 11 - advanced: {} - - id: "bridge-text" - name: "bridge-text" - class: "" - geometry: "polygon" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels, - man_made, - name - FROM planet_osm_polygon - WHERE man_made = 'bridge' - ) AS bridge_text - properties: - minzoom: 11 - advanced: {} - - id: "roads-text-ref" - name: "roads-text-ref" - class: "" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - highway, - height, - width, - refs - FROM ( - SELECT - way, highway, - array_length(refs,1) AS height, - (SELECT MAX(char_length(ref)) FROM unnest(refs) AS u(ref)) AS width, - array_to_string(refs, E'\n') AS refs - FROM ( - SELECT - way, - COALESCE( - CASE WHEN highway IN ('motorway', 'trunk', 'primary', 'secondary', 'tertiary', 'unclassified', 'residential') THEN highway ELSE NULL END, - CASE WHEN aeroway IN ('runway', 'taxiway') THEN aeroway ELSE NULL END - ) AS highway, - string_to_array(ref, ';') AS refs - FROM planet_osm_line - WHERE (highway IN ('motorway', 'trunk', 'primary', 'secondary', 'tertiary', 'unclassified', 'residential') OR aeroway IN ('runway', 'taxiway')) - AND ref IS NOT NULL - ) AS p) AS q - WHERE height <= 4 AND width <= 11) AS roads_text_ref - properties: - minzoom: 13 - advanced: {} - - id: "roads-area-text-name" - name: "roads-area-text-name" - class: "" - geometry: "polygon" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels, - highway, - name - FROM planet_osm_polygon - WHERE highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'cycleway', 'living_street', 'track', 'path', 'platform') - OR railway IN ('platform') - AND name IS NOT NULL - ) AS roads_area_text_name - properties: - minzoom: 15 - advanced: {} - - id: "roads-text-name" - name: "roads-text-name" - class: "directions" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN substr(highway, 0, length(highway)-4) ELSE highway END, - CASE WHEN (tunnel = 'yes' OR tunnel = 'building_passage' OR covered = 'yes') THEN 'yes' ELSE 'no' END AS tunnel, - CASE WHEN construction IN ('service', 'footway', 'cycleway', 'bridleway', 'path', 'track') THEN 'yes' ELSE 'no' END AS int_construction_minor, - name, - CASE - WHEN oneway IN ('yes', '-1') THEN oneway - WHEN junction IN ('roundabout') AND (oneway IS NULL OR NOT oneway IN ('no', 'reversible')) THEN 'yes' - ELSE NULL - END AS oneway, - horse, bicycle - FROM planet_osm_line - WHERE highway IN ('motorway', 'motorway_link', 'trunk', 'trunk_link', 'primary', 'primary_link', 'secondary', 'secondary_link', 'tertiary', - 'tertiary_link', 'residential', 'unclassified', 'road', 'service', 'pedestrian', 'raceway', 'living_street', 'construction') - AND (name IS NOT NULL - OR oneway IN ('yes', '-1') - OR junction IN ('roundabout')) - ) AS roads_text_name - properties: - minzoom: 13 - advanced: {} - - id: "paths-text-name" - name: "paths-text-name" - class: "" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - highway, - name - FROM planet_osm_line - WHERE highway IN ('bridleway', 'footway', 'cycleway', 'path', 'track', 'steps') - AND name IS NOT NULL - ) AS paths_text_name - properties: - minzoom: 15 - advanced: {} - - id: "text-poly-low-zoom" - name: "text-poly-low-zoom" - class: "text-low-zoom" - geometry: "polygon" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels, - COALESCE( - 'landuse_' || CASE WHEN landuse IN ('forest', 'military') THEN landuse ELSE NULL END, - 'natural_' || CASE WHEN "natural" IN ('wood', 'glacier', 'sand', 'scree', 'shingle', 'bare_rock') THEN "natural" ELSE NULL END, - 'place_' || CASE WHEN place IN ('island') THEN place ELSE NULL END, - 'boundary_' || CASE WHEN boundary IN ('national_park') THEN boundary ELSE NULL END, - 'leisure_' || CASE WHEN leisure IN ('nature_reserve') THEN leisure ELSE NULL END - ) AS feature, - name, - CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building -- always no with the where conditions - FROM planet_osm_polygon - WHERE (landuse IN ('forest', 'military') - OR "natural" IN ('wood', 'glacier', 'sand', 'scree', 'shingle', 'bare_rock') - OR "place" IN ('island') - OR boundary IN ('national_park') - OR leisure IN ('nature_reserve')) - AND building IS NULL - AND name IS NOT NULL - ORDER BY way_area DESC - ) AS text_poly_low_zoom - properties: - minzoom: 7 - maxzoom: 9 - advanced: {} - - id: "text-poly" - name: "text-poly" - class: "text" - geometry: "polygon" - <<: *extents - Datasource: - <<: *osm2pgsql - # Include values that are rendered as icon without label to prevent mismatch between icons and labels, - # see https://github.com/gravitystorm/openstreetmap-carto/pull/1349#issuecomment-77805678 - table: |- - (SELECT - way, - way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels, - COALESCE( - 'aeroway_' || CASE WHEN aeroway IN ('gate', 'apron', 'helipad', 'aerodrome') THEN aeroway ELSE NULL END, - 'tourism_' || CASE WHEN tourism IN ('artwork', 'alpine_hut', 'hotel', 'motel', 'hostel', 'chalet', 'guest_house', 'camp_site', 'caravan_site', - 'theme_park', 'museum', 'zoo', 'information', 'picnic_site') THEN tourism ELSE NULL END, - 'amenity_' || CASE WHEN amenity IN ('pub', 'restaurant', 'food_court', 'cafe', 'fast_food', 'biergarten', 'bar', 'library', - 'theatre', 'courthouse', 'townhall', 'cinema', 'clinic', 'community_centre', 'parking', - 'bicycle_parking', 'motorcycle_parking', 'police', 'fire_station', 'fountain', 'place_of_worship', - 'grave_yard', 'shelter', 'bank', 'embassy', 'fuel', 'bus_station', 'prison', 'university', - 'school', 'college', 'kindergarten', 'hospital', 'ice_cream', 'pharmacy', 'doctors', 'dentist', - 'atm', 'bicycle_rental', 'car_rental', 'car_wash', 'post_box', 'post_office', - 'recycling', 'telephone', 'emergency_phone', 'toilets', 'taxi', 'drinking_water', 'hunting_stand', - 'nightclub', 'veterinary', 'social_facility', 'charging_station') THEN amenity ELSE NULL END, - 'shop_' || CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer', 'confectionery', - 'fashion', 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', 'garden_centre', - 'hairdresser', 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', 'photo', 'photo_studio', - 'photography', 'seafood', 'shoes', 'alcohol', 'gift', 'furniture', 'kiosk', 'mobile_phone', 'motorcycle', - 'musical_instrument', 'newsagent', 'optician', 'jewelry', 'jewellery', 'electronics', 'chemist', 'toys', - 'travel_agency', 'car_parts', 'greengrocer', 'farm', 'stationery', 'laundry', 'dry_cleaning', 'beverages', - 'perfumery', 'cosmetics', 'variety_store', 'wine', 'outdoor', 'copyshop', 'sports', 'deli', 'tobacco', 'art', 'tea') THEN shop - WHEN shop IN ('accessories', 'antiques', 'appliance', 'baby_goods', 'bathroom_furnishing', 'bed', - 'boat', 'bookmaker', 'boutique', 'builder', 'building_materials', 'camera', 'car_service', 'carpet', 'charity', - 'cheese', 'chocolate', 'coffee', 'communication', 'craft', 'curtain', 'dairy', - 'discount', 'e-cigarette', 'electrical', 'energy', 'erotic', 'estate_agent', 'fabric', 'fishing', - 'flooring', 'food', 'frame', 'frozen_food', 'funeral_directors', 'furnace', 'gallery', 'games', 'gas', - 'general', 'glaziery', 'grocery', 'health', 'health_food', 'hearing_aids', 'herbalist', 'hobby', 'household', - 'houseware', 'hunting', 'interior_decoration', 'kitchen', 'leather', 'lighting', 'locksmith', - 'lottery', 'market', 'massage', 'medical', 'medical_supply', 'money_lender', 'motorcycle_repair', 'music', - 'office_supplies', 'organic', 'paint', 'pastry', 'pawnbroker', 'phone', 'pottery', - 'printing', 'radiotechnics', 'real_estate', 'religion', 'rental', 'salon', 'scuba_diving', 'second_hand', - 'sewing', 'shoe_repair', 'shopping_centre', 'solarium', 'souvenir', 'tailor', 'tanning', 'tattoo', - 'ticket', 'tiles', 'trade', 'tyres', 'vacuum_cleaner', 'video', 'video_games', 'watches', 'wholesale', - 'yes') THEN 'other' ELSE NULL END, - 'leisure_' || CASE WHEN leisure IN ('swimming_pool', 'water_park', 'miniature_golf', 'golf_course', 'sports_centre', 'stadium', 'track', - 'pitch', 'playground', 'park', 'recreation_ground', 'common', 'garden', 'nature_reserve', 'marina', - 'picnic_table', 'dog_park') THEN leisure ELSE NULL END, - 'power_' || CASE WHEN power IN ('plant', 'station', 'generator', 'sub_station', 'substation') THEN power ELSE NULL END, - 'landuse_' || CASE WHEN landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery', - 'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', - 'greenhouse_horticulture', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', - 'construction', 'military') THEN landuse ELSE NULL END, - 'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk') THEN man_made ELSE NULL END, - 'natural_' || CASE WHEN "natural" IN ('wood', 'water', 'mud', 'wetland', 'marsh', 'bay', 'spring', 'scree', 'shingle', 'bare_rock', 'sand', 'heath', - 'grassland', 'scrub', 'beach', 'shoal', 'reef', 'glacier') THEN "natural" ELSE NULL END, - 'place_' || CASE WHEN place IN ('island', 'islet') THEN place ELSE NULL END, - 'military_' || CASE WHEN military IN ('danger_area') THEN military ELSE NULL END, - 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END, - 'highway_' || CASE WHEN highway IN ('services', 'rest_area', 'bus_stop', 'elevator', 'ford') THEN highway ELSE NULL END, - 'boundary_' || CASE WHEN boundary IN ('national_park') THEN boundary ELSE NULL END, - 'waterway_' || CASE WHEN waterway IN ('dam') THEN waterway ELSE NULL END, - 'tourism_' || CASE WHEN tourism IN ('viewpoint', 'attraction') THEN tourism ELSE NULL END - ) AS feature, - access, - name, - operator, - ref, - way_area, - CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building - FROM planet_osm_polygon - -- The upcoming where clause is needed for performance only, as the CASE statements would end up doing the equivalent filtering - WHERE (aeroway IN ('gate', 'apron', 'helipad', 'aerodrome') - OR tourism IN ('artwork', 'alpine_hut', 'hotel', 'motel', 'hostel', 'chalet', 'guest_house', 'camp_site', 'caravan_site', 'theme_park', - 'museum', 'viewpoint', 'attraction', 'zoo', 'information', 'picnic_site') - OR amenity IS NOT NULL -- skip checking a huge list and use a null check - OR shop IS NOT NULL - OR leisure IS NOT NULL - OR landuse IS NOT NULL - OR man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk') - OR "natural" IS NOT NULL - OR place IN ('island', 'islet') - OR military IN ('danger_area') - OR historic IN ('memorial', 'monument', 'archaeological_site') - OR highway IN ('services', 'rest_area', 'bus_stop', 'elevator', 'ford') - OR power IN ('plant', 'station', 'generator', 'sub_station', 'substation') - OR boundary IN ('national_park') - OR waterway = 'dam') - AND (name IS NOT NULL - OR (ref IS NOT NULL AND aeroway IN ('gate')) - ) - ORDER BY way_area DESC - ) AS text_poly - properties: - minzoom: 10 - advanced: {} - - id: "text-line" - name: "text-line" - class: "" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - NULL as way_pixels, - COALESCE('man_made_' || man_made, 'waterway_' || waterway, 'natural_' || "natural") AS feature, - access, - name, - operator, - ref, - NULL AS way_area, - CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building - FROM planet_osm_line - WHERE (man_made IN ('pier', 'breakwater', 'groyne', 'embankment') - OR waterway IN ('dam', 'weir') - OR "natural" IN ('cliff')) - AND name IS NOT NULL - ) AS text_line - advanced: {} - properties: - minzoom: 10 - - id: "text-point" - name: "text-point" - class: "text" - geometry: "point" - <<: *extents - Datasource: - <<: *osm2pgsql - # Include values that are rendered as icon without label to prevent mismatch between icons and labels, - # see https://github.com/gravitystorm/openstreetmap-carto/pull/1349#issuecomment-77805678 - table: |- - (SELECT - way, - way_pixels, - feature, - access, - CONCAT( - name, - CASE WHEN name IS NOT NULL AND elevation IS NOT NULL THEN E'\n' ELSE NULL END, - CASE WHEN elevation IS NOT NULL THEN CONCAT(REPLACE(ROUND(elevation)::TEXT, '-', U&'\2212'), U&'\00A0', 'm') ELSE NULL END - ) AS name, - CASE - WHEN "natural" IN ('peak', 'volcano', 'saddle') THEN elevation - ELSE NULL - END AS score, - operator, - ref, - way_area, - is_building - FROM - (SELECT - way, - NULL AS way_pixels, - COALESCE( - 'aeroway_' || CASE WHEN aeroway IN ('gate', 'apron', 'helipad', 'aerodrome') THEN aeroway ELSE NULL END, - 'tourism_' || CASE WHEN tourism IN ('artwork', 'alpine_hut', 'hotel', 'motel', 'hostel', 'chalet', 'guest_house', 'camp_site', 'caravan_site', - 'theme_park', 'museum', 'zoo', 'information', 'picnic_site') THEN tourism ELSE NULL END, - 'amenity_' || CASE WHEN amenity IN ('pub', 'restaurant', 'food_court', 'cafe', 'fast_food', 'biergarten', 'bar', 'library', 'theatre', - 'courthouse', 'townhall', 'cinema', 'clinic', 'community_centre', 'parking', 'bicycle_parking', - 'motorcycle_parking', 'police', 'fire_station', 'fountain', 'place_of_worship', 'grave_yard', 'shelter', 'bank', - 'embassy', 'fuel', 'bus_station', 'prison', 'university', 'school', 'college', 'kindergarten', 'hospital', - 'ice_cream', 'pharmacy', 'doctors', 'dentist', 'atm', 'bicycle_rental', 'car_rental', - 'car_wash', 'post_box', 'post_office', 'recycling', 'telephone', 'emergency_phone', 'toilets', 'taxi', - 'drinking_water', 'hunting_stand', 'nightclub', 'veterinary', 'social_facility', - 'charging_station') THEN amenity ELSE NULL END, - 'shop_' || CASE WHEN shop IN ('supermarket', 'bag','bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer', 'confectionery', 'fashion', - 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', 'garden_centre', 'hairdresser', - 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', 'photo', 'photo_studio', 'photography', - 'seafood', 'shoes', 'alcohol', 'gift', 'furniture', 'kiosk', 'mobile_phone', 'motorcycle', 'musical_instrument', - 'newsagent', 'optician', 'jewelry', 'jewellery', 'electronics', 'chemist', 'toys', 'travel_agency', 'car_parts', - 'greengrocer', 'farm', 'stationery', 'laundry', 'dry_cleaning', 'beverages', 'perfumery', 'cosmetics', - 'variety_store', 'wine', 'outdoor', 'copyshop', 'sports', 'deli', 'tobacco', 'art', 'tea') THEN shop - WHEN shop IN ('accessories', 'antiques', 'appliance', - 'baby_goods', 'bathroom_furnishing', 'bed', 'boat', 'bookmaker', 'boutique', 'builder', - 'building_materials', 'camera', 'car_service', 'carpet', 'charity', 'cheese', 'chocolate', 'coffee', - 'communication', 'craft', 'curtain', 'dairy', 'discount', - 'e-cigarette', 'electrical', 'energy', 'erotic', 'estate_agent', 'fabric', 'fishing', 'flooring', - 'food', 'frame', 'frozen_food', 'funeral_directors', 'furnace', 'gallery', 'games', 'gas', - 'general', 'glaziery', 'grocery', 'health', 'health_food', 'hearing_aids', 'herbalist', 'hobby', 'household', - 'houseware', 'hunting', 'interior_decoration', 'kitchen', 'leather', 'lighting', 'locksmith', - 'lottery', 'market', 'massage', 'medical', 'medical_supply', 'money_lender', 'motorcycle_repair', 'music', - 'office_supplies', 'organic', 'paint', 'pastry', 'pawnbroker', 'phone', 'pottery', - 'printing', 'radiotechnics', 'real_estate', 'religion', 'rental', 'salon', 'scuba_diving', 'second_hand', - 'sewing', 'shoe_repair', 'shopping_centre', 'solarium', 'souvenir', 'tailor', 'tanning', 'tattoo', - 'ticket', 'tiles', 'trade', 'tyres', 'vacuum_cleaner', 'video', 'video_games', 'watches', - 'wholesale', 'yes') THEN 'other' ELSE NULL END, - 'leisure_' || CASE WHEN leisure IN ('swimming_pool', 'water_park', 'miniature_golf', 'golf_course', 'sports_centre', 'stadium', 'track', - 'pitch','playground', 'park', 'recreation_ground', 'common', 'garden', 'nature_reserve', 'marina', - 'slipway', 'picnic_table', 'dog_park') THEN leisure ELSE NULL END, - 'power_' || CASE WHEN power IN ('plant', 'station', 'generator', 'sub_station', 'substation') THEN power ELSE NULL END, - 'landuse_' || CASE WHEN landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery', - 'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', - 'greenhouse_horticulture', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', - 'construction', 'military') THEN landuse ELSE NULL END, - 'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'obelisk') THEN man_made ELSE NULL END, - 'natural_' || CASE WHEN "natural" IN ('wood', 'peak', 'volcano', 'saddle', 'cave_entrance', 'water', 'mud', 'wetland', 'marsh', 'bay', 'spring', - 'scree', 'shingle', 'bare_rock', 'sand', 'heath', 'grassland', 'scrub', 'beach', 'glacier', 'tree') - THEN "natural" ELSE NULL END, - 'place_' || CASE WHEN place IN ('island', 'islet') THEN place ELSE NULL END, - 'military_' || CASE WHEN military IN ('danger_area') THEN military ELSE NULL END, - 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END, - 'highway_' || CASE WHEN highway IN ('services', 'rest_area', 'bus_stop', 'elevator', 'ford') THEN highway ELSE NULL END, - 'boundary_' || CASE WHEN boundary IN ('national_park') THEN boundary ELSE NULL END, - 'waterway_' || CASE WHEN waterway IN ('dam', 'weir') THEN waterway ELSE NULL END, - 'tourism_' || CASE WHEN tourism IN ('viewpoint', 'attraction') THEN tourism ELSE NULL END, - 'man_made_' || CASE WHEN man_made IN ('cross') THEN man_made ELSE NULL END, - 'historic_' || CASE WHEN historic IN ('wayside_cross') THEN historic ELSE NULL END - ) AS feature, - access, - name, - CASE - WHEN "natural" IN ('peak', 'volcano', 'saddle') OR tourism = 'alpine_hut' OR amenity = 'shelter' THEN - CASE - WHEN ele ~ '^-?\d{1,4}(\.\d+)?$' THEN ele::NUMERIC - ELSE NULL - END - ELSE NULL - END AS elevation, - "natural", - operator, - ref, - NULL AS way_area, - CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building - FROM planet_osm_point - -- The upcoming where clause is needed for performance only, as the CASE statements would end up doing the equivalent filtering - WHERE (aeroway IN ('gate', 'apron', 'helipad', 'aerodrome') - OR tourism IN ('artwork', 'alpine_hut', 'hotel', 'motel', 'hostel', 'chalet', 'guest_house', 'camp_site', 'caravan_site', 'theme_park', - 'museum', 'viewpoint', 'attraction', 'zoo', 'information', 'picnic_site') - OR amenity IS NOT NULL -- skip checking a huge list and use a null check - OR shop IS NOT NULL - OR leisure IS NOT NULL - OR landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery', 'residential', - 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'greenhouse_horticulture', - 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction', 'military') - OR man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'cross', 'obelisk') - OR "natural" IS NOT NULL - OR place IN ('island', 'islet') - OR military IN ('danger_area') - OR historic IN ('memorial', 'monument', 'archaeological_site', 'wayside_cross') - OR highway IN ('bus_stop', 'services', 'rest_area', 'elevator', 'ford') - OR power IN ('plant', 'station', 'generator', 'sub_station', 'substation') - OR boundary IN ('national_park') - OR waterway IN ('dam', 'weir')) - AND (name IS NOT NULL - OR (ele IS NOT NULL AND ("natural" IN ('peak', 'volcano', 'saddle') OR tourism = 'alpine_hut' OR amenity = 'shelter')) - OR (ref IS NOT NULL AND aeroway IN ('gate')) - ) - ) AS p - ORDER BY score DESC NULLS LAST - ) AS text - properties: - minzoom: 10 - advanced: {} - - id: "building-text" - name: "building-text" - class: "" - geometry: "polygon" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - name, - way, - way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels - FROM planet_osm_polygon - WHERE building IS NOT NULL - AND building NOT IN ('no') - AND name IS NOT NULL - ORDER BY way_area DESC - ) AS building_text - properties: - minzoom: 14 - advanced: {} - - id: "interpolation" - name: "interpolation" - class: "" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way - FROM planet_osm_line - WHERE "addr:interpolation" IS NOT NULL - ) AS interpolation - properties: - minzoom: 17 - advanced: {} - - id: "addresses" - name: "addresses" - class: "" - geometry: "point" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - "addr:housenumber" AS addr_housenumber, - "addr:housename" AS addr_housename, - way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels - FROM planet_osm_polygon - WHERE (("addr:housenumber" IS NOT NULL) OR ("addr:housename" IS NOT NULL)) - AND building IS NOT NULL - UNION ALL - SELECT - way, - "addr:housenumber" AS addr_housenumber, - "addr:housename" AS addr_housename, - NULL AS way_pixels - FROM planet_osm_point - WHERE ("addr:housenumber" IS NOT NULL) OR ("addr:housename" IS NOT NULL) - ORDER BY way_pixels DESC NULLS LAST - ) AS addresses - properties: - minzoom: 17 - advanced: {} - - id: "water-lines-text" - name: "water-lines-text" - class: "" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - waterway, - lock, - name, - intermittent, - CASE WHEN tunnel IN ('yes', 'culvert') THEN 'yes' ELSE 'no' END AS int_tunnel - FROM planet_osm_line - WHERE waterway IN ('river', 'canal', 'derelict_canal', 'stream', 'drain', 'ditch', 'wadi') - AND (tunnel IS NULL or tunnel != 'culvert') - AND name IS NOT NULL - ORDER BY z_order - ) AS water_lines_text - properties: - minzoom: 13 - advanced: {} - - id: "ferry-routes-text" - name: "ferry-routes-text" - class: "" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - name - FROM planet_osm_line - WHERE route = 'ferry' - AND name IS NOT NULL - ) AS ferry_routes_text - properties: - minzoom: 13 - advanced: {} - - id: "admin-text" - name: "admin-text" - class: "" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - name, - admin_level - FROM planet_osm_polygon - WHERE boundary = 'administrative' - AND admin_level IN ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10') - AND name IS NOT NULL - ORDER BY admin_level::integer ASC, way_area DESC - ) AS admin_text - properties: - minzoom: 16 - advanced: {} - - id: "nature-reserve-text" - name: "nature-reserve-text" - class: "" - geometry: "linestring" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - name, - way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels - FROM planet_osm_polygon - WHERE (boundary = 'national_park' OR leisure = 'nature_reserve') - AND name IS NOT NULL - ) AS nature_reserve_text - properties: - minzoom: 13 - advanced: {} - - id: "amenity-low-priority" - name: "amenity-low-priority" - class: "amenity-low-priority" - geometry: "point" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - COALESCE( - 'highway_' || CASE WHEN highway IN ('mini_roundabout') THEN highway ELSE NULL END, - 'railway_' || CASE WHEN railway IN ('level_crossing', 'crossing') THEN railway ELSE NULL END, - 'amenity_' || CASE WHEN amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking', 'bench', 'waste_basket') THEN amenity ELSE NULL END, - 'historic_' || CASE WHEN historic IN ('wayside_cross') THEN historic ELSE NULL END, - 'man_made_' || CASE WHEN man_made IN ('cross') THEN man_made ELSE NULL END, - 'barrier_' || CASE WHEN barrier IN ('bollard', 'gate', 'lift_gate', 'swing_gate', 'block') THEN barrier ELSE NULL END - ) AS feature, - access, - CASE WHEN amenity='waste_basket' THEN 2 ELSE 1 END AS prio - FROM planet_osm_point p - WHERE highway IN ('mini_roundabout') - OR railway IN ('level_crossing', 'crossing') - OR amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking', 'bench', 'waste_basket') - OR historic IN ('wayside_cross') - OR man_made IN ('cross') - OR barrier IN ('bollard', 'gate', 'lift_gate', 'swing_gate', 'block') - ORDER BY prio - ) AS amenity_low_priority - properties: - minzoom: 14 - advanced: {} - - id: "amenity-low-priority-poly" - name: "amenity-low-priority-poly" - class: "amenity-low-priority" - geometry: "polygon" - <<: *extents - Datasource: - <<: *osm2pgsql - table: |- - (SELECT - way, - COALESCE( - 'amenity_' || CASE WHEN amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking') THEN amenity ELSE NULL END, - 'barrier_' || CASE WHEN barrier IN ('bollard', 'gate', 'lift_gate', 'swing_gate', 'block') THEN barrier ELSE NULL END - ) AS feature, - access - FROM planet_osm_polygon p - WHERE amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking') - OR barrier IN ('bollard', 'gate', 'lift_gate', 'swing_gate', 'block') - ) AS amenity_low_priority_poly - properties: - minzoom: 14 - advanced: {} diff --git a/roads.mss b/roads.mss index da793ec002..6e638beab8 100644 --- a/roads.mss +++ b/roads.mss @@ -2448,6 +2448,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ text-halo-fill: @standard-halo-fill; text-min-distance: 2; text-wrap-width: 30; + text-placement: interior; [way_pixels > 250] { text-size: 9; } diff --git a/scripts/get-shapefiles.py b/scripts/get-shapefiles.py new file mode 100755 index 0000000000..869f0e95c7 --- /dev/null +++ b/scripts/get-shapefiles.py @@ -0,0 +1,387 @@ +#!/usr/bin/env python + +# This script generates and populates the 'data' directory with all needed +# shapefiles. + +from __future__ import ( + division, + absolute_import, + print_function, + unicode_literals) +import os +import errno +import tarfile +import zipfile +import subprocess +import distutils.spawn +import argparse +import sys +import tempfile +import logging +import time +import email.utils + +if sys.version_info >= (3,): + import urllib.request as urllib2 + import urllib.parse as urlparse +else: + import urllib2 + import urlparse + +data_dir = 'data' +settings = { + # Keys 1, 2, 3, ... set the arg short-options and the related process + # ordering. Use > 0 to allow processing. + 1: { + 'directory': 'world_boundaries', + 'url': 'http://planet.openstreetmap.org/historical-shapefiles/world_boundaries-spherical.tgz', # noqa + 'type': 'tgz', + 'index': [ + 'world_bnd_m.shp', + 'builtup_area.shp', + 'places.shp', + 'world_boundaries_m.shp'], + 'long_opt': '--world-boundaries' + }, + + 2: { + 'directory': 'simplified-land-polygons-complete-3857', + 'url': 'http://data.openstreetmapdata.com/simplified-land-polygons-complete-3857.zip', # noqa + 'type': 'zip', + 'index': ['simplified_land_polygons.shp'], + 'long_opt': '--simplified-land' + }, + + 3: { + 'directory': 'ne_110m_admin_0_boundary_lines_land', + 'url': 'http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_boundary_lines_land.zip', # noqa + 'type': 'zip_dir', + 'index': ['ne_110m_admin_0_boundary_lines_land.shp'], + 'long_opt': '--ne-admin' + }, + + 4: { + 'directory': 'land-polygons-split-3857', + 'url': 'http://data.openstreetmapdata.com/land-polygons-split-3857.zip', # noqa + 'type': 'zip', + 'index': ['land_polygons.shp'], + 'long_opt': '--land-polygons' + }, + + 5: { + 'directory': 'antarctica-icesheet-polygons-3857', + 'url': 'http://data.openstreetmapdata.com/antarctica-icesheet-polygons-3857.zip', # noqa + 'type': 'zip', + 'index': ['icesheet_polygons.shp'], + 'long_opt': '--icesheet-polygons' + }, + + 6: { + 'directory': 'antarctica-icesheet-outlines-3857', + 'url': 'http://data.openstreetmapdata.com/antarctica-icesheet-outlines-3857.zip', # noqa + 'type': 'zip', + 'index': ['icesheet_outlines.shp'], + 'long_opt': '--icesheet-outlines' + } +} + +u_prompt = True + + +def download_file( + url, + desc=None, + option_force_update=False, + option_no_curl=False): + global u_prompt + try: + scheme, netloc, path, query, fragment = urlparse.urlsplit(url) + file_name = os.path.basename(path) + if not file_name: + file_name = 'downloaded.file' + if desc: + file_name = os.path.join(desc, file_name) + + curl_used = 0 + if not option_no_curl and distutils.spawn.find_executable("curl"): + curl_used = 1 + sys.stdout.flush() + if os.path.exists(file_name) and not option_force_update: + if subprocess.call( + ["curl", "-z", file_name, "-L", "-o", file_name, url], + stderr=subprocess.STDOUT) != 0: + sys.exit("\n\n 'curl' error: download failed.\n") + curl_used = 2 + else: + if subprocess.call( + ["curl", "-L", "-o", file_name, url], + stderr=subprocess.STDOUT) != 0: + sys.exit("\n\n 'curl' error: download failed.\n") + sys.stdout.flush() + + u = urllib2.urlopen(url) + meta = u.info() + + # Compare dates and sizes + local_file_modified = None + local_file_size = None + if os.path.exists(file_name): + local_file_modified = time.localtime((os.path.getmtime(file_name))) + local_file_size = int(os.path.getsize(file_name)) + meta_func = meta.getheaders if hasattr( + meta, 'getheaders') else meta.get_all + host_file_modified = email.utils.parsedate( + meta_func("last-modified")[0]) + meta_length = meta_func("Content-Length") + host_file_size = None + if meta_length: + host_file_size = int(meta_length[0]) + + # Do a file check control after using curl (which looks like not + # including it internally) + if curl_used == 2 and (host_file_size != local_file_size): + print( + " Warning: file size differs. Downloading the file again.") + curl_used = 0 + if curl_used > 0: + u.close() + return file_name + + if (not option_force_update and os.path.exists(file_name) and + (host_file_modified <= local_file_modified) and + (host_file_size == local_file_size)): + print(" No newer file to download.", end="") + if u_prompt: + print(" (Use -u to force downloading file)", end="") + u_prompt = False + print() + u.close() + return file_name + + with open(file_name, 'wb') as f: + print(" Bytes: {0:10}".format(host_file_size)) + + file_size_dl = 0 + block_sz = 65536 + while True: + buffer = u.read(block_sz) + if not buffer: + if file_size_dl != host_file_size: + sys.exit("\n\n Error: download with invalid size.\n") + break + + file_size_dl += len(buffer) + f.write(buffer) + + status = "{0:18}".format(file_size_dl) + if host_file_size: + status += " [{0:3.0f}%]".format( + file_size_dl * + 100 / + host_file_size) + status += chr(13) + print(status, end="") + f.close() + u.close() + os.utime( + file_name, + (time.mktime(host_file_modified), + time.mktime(host_file_modified))) + print() + + return file_name + except urllib2.HTTPError as e: + sys.exit( + "\n\n Error: download failed. (error code: " + + str(e.code) + + ", error reason: " + e.reason + ")\n") + except Exception as e: + sys.exit("\n\n Error: download failed.\n" + str(e) + "\n") + + +def main(): + + # Option handling + + parser = argparse.ArgumentParser( + epilog="This script generates and populates the '" + data_dir + + "' directory with all needed shapefiles, including indexing " + + " them through shapeindex.") + parser.add_argument( + '-c', "--check", dest='option_check_mode', action='store_true', + help="check whether the '" + data_dir + "' directory already exists") + parser.add_argument( + "-d", "--directory", dest="data_dir", + help="set the name of the data directory (default: '" + + data_dir + "')", + default=data_dir, metavar="") + parser.add_argument( + '-e', "--no-extract", dest='option_no_extract', action='store_true', + help="do not populate target directories with the expansion " + + "of downloaded data") + parser.add_argument( + '-f', "--force", dest='option_force', action='store_true', + help="force continuing even if project.yaml does not exist") + parser.add_argument( + '-l', "--no-curl", dest='option_no_curl', action='store_true', + help="do not use 'curl' even if available") + parser.add_argument( + '-n', "--no-download", dest='option_no_download', action='store_true', + help="do not download archive if already existing locally") + parser.add_argument( + '-p', "--pause", dest='option_pause_mode', action='store_true', + help="pause before starting") + parser.add_argument( + '-r', "--remove", dest='option_remove', action='store_true', + help="remove each downloaded archive after its expansion") + parser.add_argument( + '-s', "--no-shape", dest='option_no_shape', action='store_true', + help="do not run shapeindex") + parser.add_argument( + '-u', "--update", dest='option_force_update', action='store_true', + help="force downloading files even if not newer than the locally " + + "existing ones") + for element in sorted(settings): + parser.add_argument( + settings[element]['long_opt'], + dest='option_filter', action='append_const', const=element, + help="only process " + settings[element]['directory']) + + args = parser.parse_args() + + # Initial checks + + if not args.option_no_shape and ( + not distutils.spawn.find_executable("shapeindex")): + sys.exit( + """\n Error: you need shapeindex (or shapeindex is not in the + PATH). Otherwise, use '-s' option to skip shapeindex + (indexing shapes is suggested for performance improvement).\n""") + + if args.option_force: + os.chdir(os.path.dirname(__file__)) + else: + os.chdir(os.path.join(os.path.dirname(__file__), '..')) + if not os.path.isfile("project.yaml"): + sys.exit( + """\n Error: project.yaml not found. + Are you sure you are in the correct folder? + Otherwise, use '-f' option to go on creating or updating the '""" + + args.data_dir + """' directory + placed in the same path of this script.\n""") + + if args.option_check_mode: + if os.path.isdir("data"): + sys.exit( + """\n A directory named '""" + args.data_dir + + """' already exists. + Please consider renaming it. + Otherwise, remove '-c' option to allow updating.\n""") + + if args.option_pause_mode: + print( + "\nThis script generates and populates the '" + args.data_dir + + "' directory with all needed shapefiles.\n") + try: + input( + "Press Enter to continue " + + "(remove '-p' option to avoid this message)...") + except Exception: + pass + + print() + # Processing + + for element in sorted(settings): + + if (not args.option_filter or + (args.option_filter and + element in args.option_filter)) and element > 0: + + dir_name = settings[element]['directory'] + dir_path = os.path.join(args.data_dir, dir_name) + path_name = os.path.join( + args.data_dir, + settings[element]['url'].rsplit('/', 1)[-1]) + + # Creating directory + if not os.path.exists(dir_path): + os.makedirs(dir_path) + + # Downloading + if not args.option_no_download or not os.path.isfile(path_name): + print(str(element) + "-1. Downloading '" + dir_name + "'...") + file_name = download_file( + settings[element]['url'], args.data_dir, + args.option_force_update, args.option_no_curl) + + # Expanding + if not args.option_no_extract: + sys.stdout.flush() + print() + print( + str(element) + "-2. Expanding '" + dir_name + "'...", + end="") + sys.stdout.flush() + if settings[element]['type'] == 'tgz': + tar = tarfile.open(path_name) + try: + tar.extractall(args.data_dir) + except Exception: + sys.exit(" Failed (try with -u option).\n") + tar.close() + elif settings[element]['type'] == 'zip': + zip = zipfile.ZipFile(path_name) + try: + zip.extractall(args.data_dir) + except Exception: + sys.exit(" Failed (try with -u option).\n") + zip.close() + elif settings[element]['type'] == 'zip_dir': + zip = zipfile.ZipFile(path_name) + try: + zip.extractall(dir_path) + except Exception: + sys.exit(" Failed (try with -u option).\n") + zip.close() + else: + sys.exit( + "\n\nInternal error: unmanaged 'type'='" + + settings[element]['type'] + "'.\n") + sys.stdout.flush() + print(" Done.\n") + + # Removing archive + if args.option_remove: + try: + os.remove(path_name) + except OSError: + pass + + # Indexing + if not args.option_no_shape: + for item, index in enumerate(settings[element]['index']): + if len(settings[element]['index']) == 1: + print(str(element) + "-3" + ". Indexing '" + + index + "'...") + else: + print(str(element) + "-3-" + str( + item + 1) + ". Indexing '" + index + "'...") + sys.stdout.flush() + if (subprocess.call(["shapeindex", "--shape_files", + os.path.join(dir_path, index)], + stderr=subprocess.STDOUT) != 0): + sys.exit("\n Indexing error: shapeindex failed.\n") + sys.stdout.flush() + print() + + # Finishing + print("...script completed.\n") + +if __name__ == '__main__': + try: + main() + except KeyboardInterrupt: + sys.exit("\n\n\nYou pressed Ctrl+C!\n") + except Exception as e: + sys.exit("\n Error. " + str(e) + "\n") diff --git a/scripts/shop_values.rb b/scripts/shop_values.rb deleted file mode 100755 index 5dec9a82ab..0000000000 --- a/scripts/shop_values.rb +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/ruby - -#this script generates list of popular shop values - more than MIN_COUNT occurences in OpenStreetMap database according to taginfo -#it is useful during creating/updating list of shops displayed with generic dot icon - -require 'net/http' -require 'json' -require 'pp' - -MIN_COUNT = 100 -EXCEPTIONS = [ - "no", - "vacant", - "empty", - "disused", - "unknown", - "closed", - "fixme", - "FIXME", - "FixMe", - "other", - "*", - "winery", #see discussion in https://github.com/gravitystorm/openstreetmap-carto/pull/1632 - "antique", #see https://github.com/gravitystorm/openstreetmap-carto/pull/1900 - "betting", #see https://github.com/gravitystorm/openstreetmap-carto/pull/1900 - "delicatessen", #see https://github.com/gravitystorm/openstreetmap-carto/pull/1900 - "dive", #see https://github.com/gravitystorm/openstreetmap-carto/pull/1900 - "fish", #see https://github.com/gravitystorm/openstreetmap-carto/pull/1900 - "gambling", #see https://github.com/gravitystorm/openstreetmap-carto/pull/1900 - "insurance", #see https://github.com/gravitystorm/openstreetmap-carto/pull/1900 - "pharmacy", #see https://github.com/gravitystorm/openstreetmap-carto/pull/1900 - "street_vendor", #see https://github.com/gravitystorm/openstreetmap-carto/issues/2090 - "storage_rental", #see https://github.com/gravitystorm/openstreetmap-carto/issues/2090 -] - - -url = URI.parse('http://taginfo.openstreetmap.org/api/4/key/values?key=shop&sortname=count&sortorder=desc') -req = Net::HTTP::Get.new(url.to_s) -res = Net::HTTP.start(url.host, url.port) {|http| - http.request(req) -} - -data = JSON.parse(res.body)["data"] - - - -# Get an array of values that only includes values with more than MIN_COUNT occurrences -counted = data.select { |h| h["count"] > MIN_COUNT }.map { |h| h["value"] } -# Filter out empty strings -no_empty = counted.reject { |h| h.strip.empty? } -# Filter out exceptions in EXCEPTIONS -filtered = no_empty - EXCEPTIONS - -# Output in SQL style -puts "(" + filtered.map{ |val| "'#{val}'" }.sort.join(", ") + ")" - diff --git a/scripts/travis_check_project_files b/scripts/travis_check_project_files deleted file mode 100755 index ea451dd51c..0000000000 --- a/scripts/travis_check_project_files +++ /dev/null @@ -1,15 +0,0 @@ -#/bin/sh -if json=$(scripts/yaml2mml.py --check); then - echo -n "${json}" | diff -q project.mml - - ret=$? - if [ $ret -ne 0 ]; then - echo "project.yaml and project.mml are not in sync!" >&2 - echo "You should only modify project.yaml, not project.mml and run scripts/yaml2mml.py before committing." >&2 - echo "Read https://github.com/gravitystorm/openstreetmap-carto/blob/master/CONTRIBUTING.md#editing-layers for further information." >&2 - exit $ret - fi -else - echo "error with yaml2mml, is project.yaml valid?" >&2 - exit 1 -fi - diff --git a/scripts/yaml2mml.py b/scripts/yaml2mml.py deleted file mode 100755 index a284bf220e..0000000000 --- a/scripts/yaml2mml.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python - -from __future__ import print_function -import argparse -import json -import os -import sys -import yaml - -parser = argparse.ArgumentParser(description='Keeps project files in sync by converting project.yaml to project.mml.') -parser.add_argument('--check', dest='check', - help='write generated JSON to stdout instead to project.mml', - required=False, action='store_true', default=False) -args = parser.parse_args() - -yaml_path = os.path.join(os.path.dirname(__file__), '../project.yaml') -mml_path = os.path.join(os.path.dirname(__file__), '../project.mml') - -try: - yaml_file = open(yaml_path) - yaml = yaml.safe_load(yaml_file) - yaml_file.close() - - try: - if not args.check: - mml_file = open(mml_path, 'wb') - json.dump(yaml, mml_file, indent=2, separators=(',', ': ')) - mml_file.close() - else: - json.dump(yaml, sys.stdout, indent=2, separators=(',', ': ')) - except IOError: - print('Could not save MML file. Aborting.') - sys.exit(1) -except IOError: - print('Could not read YAML file. Aborting.') - sys.exit(1) diff --git a/stations.mss b/stations.mss index a1cf20f2e8..6b9b22634c 100644 --- a/stations.mss +++ b/stations.mss @@ -7,6 +7,17 @@ marker-placement: interior; marker-fill: @transportation-icon; marker-clip: false; + [zoom >= 19] { + text-name: [ref]; + text-face-name: @book-fonts; + text-size: 10; + text-fill: @transportation-icon; + text-dy: 10; + text-halo-radius: @standard-halo-radius * 1.5; + text-halo-fill: @standard-halo-fill; + text-wrap-width: 0; + text-placement: interior; + } } [railway = 'station'][zoom >= 12] { diff --git a/symbols/aerodrome.svg b/symbols/aerodrome.12.svg similarity index 59% rename from symbols/aerodrome.svg rename to symbols/aerodrome.12.svg index aacb1747b5..3eb6309181 100644 --- a/symbols/aerodrome.svg +++ b/symbols/aerodrome.12.svg @@ -1,4 +1,5 @@ - + + diff --git a/symbols/archaeological_site.16.svg b/symbols/archaeological_site.svg similarity index 90% rename from symbols/archaeological_site.16.svg rename to symbols/archaeological_site.svg index 3431811b8c..19fc272833 100644 --- a/symbols/archaeological_site.16.svg +++ b/symbols/archaeological_site.svg @@ -1,4 +1,4 @@ - + @@ -9,6 +9,6 @@ - - + + diff --git a/symbols/artwork-14.svg b/symbols/artwork.svg similarity index 97% rename from symbols/artwork-14.svg rename to symbols/artwork.svg index b1cec106b1..014348121c 100644 --- a/symbols/artwork-14.svg +++ b/symbols/artwork.svg @@ -27,10 +27,10 @@ + height="14" + width="14" /> - - - - - diff --git a/symbols/atm.svg b/symbols/atm.svg new file mode 100644 index 0000000000..cd9333ecc1 --- /dev/null +++ b/symbols/atm.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/bank.16.svg b/symbols/bank.16.svg deleted file mode 100644 index ea8c60afd5..0000000000 --- a/symbols/bank.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/bank.svg b/symbols/bank.svg new file mode 100644 index 0000000000..0782323406 --- /dev/null +++ b/symbols/bank.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/bar.16.svg b/symbols/bar.16.svg deleted file mode 100644 index 0b361ab557..0000000000 --- a/symbols/bar.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/bar.svg b/symbols/bar.svg new file mode 100644 index 0000000000..a3e42fc877 --- /dev/null +++ b/symbols/bar.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/bench.16.svg b/symbols/bench.svg similarity index 73% rename from symbols/bench.16.svg rename to symbols/bench.svg index 110d30366a..1fea29ee7d 100644 --- a/symbols/bench.16.svg +++ b/symbols/bench.svg @@ -8,9 +8,9 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" - width="100%" - height="100%" - viewBox="0 0 16 16" + width="14" + height="14" + viewBox="0 0 14 14" id="svg2"> @@ -27,14 +27,13 @@ + d="M 1,5 C 0,5 0,6.5 1,6.5 l 12,0 C 14,6.5 14,5 13,5 L 1,5 z m 1,2 0,3 1.5,0 0,-3 L 2,7 z m 8.5,0 0,3 1.5,0 0,-3 -1.5,0 z" + id="bench" /> diff --git a/symbols/beverages-14.svg b/symbols/beverages-14.svg deleted file mode 100644 index 2cedc526bb..0000000000 --- a/symbols/beverages-14.svg +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/symbols/bicycle_parking.16.svg b/symbols/bicycle_parking.16.svg deleted file mode 100644 index 54235d9624..0000000000 --- a/symbols/bicycle_parking.16.svg +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/symbols/bicycle_parking.svg b/symbols/bicycle_parking.svg new file mode 100644 index 0000000000..441187a417 --- /dev/null +++ b/symbols/bicycle_parking.svg @@ -0,0 +1,39 @@ + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/symbols/biergarten.16.svg b/symbols/biergarten.16.svg deleted file mode 100644 index 0fd4973b83..0000000000 --- a/symbols/biergarten.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/biergarten.svg b/symbols/biergarten.svg new file mode 100644 index 0000000000..1a1f4fa830 --- /dev/null +++ b/symbols/biergarten.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/buddhist.16.svg b/symbols/buddhist.16.svg deleted file mode 100644 index e82c2aad0a..0000000000 --- a/symbols/buddhist.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/buddhist.svg b/symbols/buddhist.svg new file mode 100644 index 0000000000..3f1b190806 --- /dev/null +++ b/symbols/buddhist.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/bus_stop.12.svg b/symbols/bus_stop.12.svg index ca49798f6b..f4ade01a24 100644 --- a/symbols/bus_stop.12.svg +++ b/symbols/bus_stop.12.svg @@ -1,4 +1,4 @@ - + diff --git a/symbols/cafe.16.svg b/symbols/cafe.16.svg deleted file mode 100644 index d6060f46d1..0000000000 --- a/symbols/cafe.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/cafe.svg b/symbols/cafe.svg new file mode 100644 index 0000000000..4beaabfab0 --- /dev/null +++ b/symbols/cafe.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/camping.16.svg b/symbols/camping.16.svg deleted file mode 100644 index 12e40a440d..0000000000 --- a/symbols/camping.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/camping.svg b/symbols/camping.svg new file mode 100644 index 0000000000..21bf7c986f --- /dev/null +++ b/symbols/camping.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/car_wash-14.svg b/symbols/car_wash.svg similarity index 89% rename from symbols/car_wash-14.svg rename to symbols/car_wash.svg index 6703e4629a..96ce720d09 100644 --- a/symbols/car_wash-14.svg +++ b/symbols/car_wash.svg @@ -6,7 +6,7 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" id="svg2" - viewBox="-240 0 0 16" + viewBox="0 0 14 14" height="14" width="14" version="1.1"> @@ -24,6 +24,13 @@ + + @@ -9,6 +9,6 @@ - - + + diff --git a/symbols/cave.14.svg b/symbols/cave.svg similarity index 87% rename from symbols/cave.14.svg rename to symbols/cave.svg index d4eabc142d..2082382342 100644 --- a/symbols/cave.14.svg +++ b/symbols/cave.svg @@ -24,6 +24,13 @@ + + id="svg2" + viewBox="0 0 14 14" + height="14" + width="14" + version="1.1"> @@ -25,14 +25,14 @@ + y="0" + x="0" + height="14" + width="14" /> + d="M 2,1 C 0.8344723,1 0,1.7955215 0,3 L 0,14 7,14 7,6.125 C 7,6.125 7.875,6 7.875,7 l 0,4 c 0,2 1.864698,2.125 2.125,2.125 0.275652,0 2.125,-0.124975 2.125,-2.125 l 0,-4 c 0,0 1.387558,0.017377 1.375,-2.96875 l -0.75,0 0,-2 C 12.75,1.4640917 12,1.4675079 12,2 l 0,2 -1,0 0,-2 C 11,1.4538157 10.25,1.4548128 10.25,2 l 0,2 -0.75,0 c 0.01252,2.9863904 1.375,3 1.375,3 l 0,4 c 0,0.874159 -0.767136,0.875 -0.875,0.875 -0.107864,0 -0.875,-0.04279 -0.875,-0.875 l 0,-4 C 9.125,5.7190916 8,4.875 7,4.875 L 7,3 C 7,1.7775442 6.1835046,1 5,1 Z m 0.96875,2 2.75,0 L 4,5.6666667 l 2.0625,0 L 2.28125,11 1.59375,11 2.96875,7 1.25,7 Z" /> diff --git a/symbols/christian.16.svg b/symbols/christian.16.svg deleted file mode 100644 index da6b146ceb..0000000000 --- a/symbols/christian.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/christian.9.svg b/symbols/christian.9.svg index ca1a84f57b..5d33b51bee 100644 --- a/symbols/christian.9.svg +++ b/symbols/christian.9.svg @@ -4,9 +4,16 @@ + diff --git a/symbols/christian.svg b/symbols/christian.svg new file mode 100644 index 0000000000..8461e9c3ea --- /dev/null +++ b/symbols/christian.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/cinema.16.svg b/symbols/cinema.16.svg deleted file mode 100644 index c383d87acc..0000000000 --- a/symbols/cinema.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/cinema.svg b/symbols/cinema.svg new file mode 100644 index 0000000000..2915a007f6 --- /dev/null +++ b/symbols/cinema.svg @@ -0,0 +1,37 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/symbols/communications.16.svg b/symbols/communications.16.svg deleted file mode 100644 index 58f31ebbac..0000000000 --- a/symbols/communications.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/communications.svg b/symbols/communications.svg new file mode 100644 index 0000000000..3a8b10a6b4 --- /dev/null +++ b/symbols/communications.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/community_centre-14.svg b/symbols/community_centre.svg similarity index 97% rename from symbols/community_centre-14.svg rename to symbols/community_centre.svg index bd6e94e2a9..62094f3f85 100644 --- a/symbols/community_centre-14.svg +++ b/symbols/community_centre.svg @@ -7,8 +7,8 @@ xmlns="http://www.w3.org/2000/svg" id="svg2" viewBox="0 0 14 14" - height="100%" - width="100%" + height="14" + width="14" version="1.1"> diff --git a/symbols/computer-14.svg b/symbols/computer-14.svg deleted file mode 100644 index bfb3583045..0000000000 --- a/symbols/computer-14.svg +++ /dev/null @@ -1,30 +0,0 @@ - -image/svg+xml \ No newline at end of file diff --git a/symbols/courthouse.svg b/symbols/courthouse.svg new file mode 100644 index 0000000000..182b2b0964 --- /dev/null +++ b/symbols/courthouse.svg @@ -0,0 +1,39 @@ + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/symbols/dentist.16.svg b/symbols/dentist.16.svg deleted file mode 100644 index 8cae7f50d6..0000000000 --- a/symbols/dentist.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/dentist.svg b/symbols/dentist.svg new file mode 100644 index 0000000000..43cfc3bc50 --- /dev/null +++ b/symbols/dentist.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/department_store.p.16.svg b/symbols/department_store.p.16.svg deleted file mode 100644 index d1cbd475b9..0000000000 --- a/symbols/department_store.p.16.svg +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - diff --git a/symbols/doctors.16.svg b/symbols/doctors.16.svg deleted file mode 100644 index 484b3992f8..0000000000 --- a/symbols/doctors.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/doctors.svg b/symbols/doctors.svg new file mode 100644 index 0000000000..f428f4eba1 --- /dev/null +++ b/symbols/doctors.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/drinking_water.16.svg b/symbols/drinking_water.16.svg deleted file mode 100644 index 7e7b0af052..0000000000 --- a/symbols/drinking_water.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/drinking_water.svg b/symbols/drinking_water.svg new file mode 100644 index 0000000000..702ce54e28 --- /dev/null +++ b/symbols/drinking_water.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/elevator-12.svg b/symbols/elevator.12.svg similarity index 97% rename from symbols/elevator-12.svg rename to symbols/elevator.12.svg index 8f3af943cf..20b4d07435 100644 --- a/symbols/elevator-12.svg +++ b/symbols/elevator.12.svg @@ -8,7 +8,7 @@ version="1.1" width="12" height="12" - viewBox="-110 0 0 10" + viewBox="0 0 12 12" id="svg2"> diff --git a/symbols/embassy.16.svg b/symbols/embassy.16.svg deleted file mode 100644 index 0d2350009c..0000000000 --- a/symbols/embassy.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/embassy.svg b/symbols/embassy.svg new file mode 100644 index 0000000000..4f02ae1f42 --- /dev/null +++ b/symbols/embassy.svg @@ -0,0 +1,21 @@ + + + + + + + diff --git a/symbols/emergency_phone.16.svg b/symbols/emergency_phone.svg similarity index 87% rename from symbols/emergency_phone.16.svg rename to symbols/emergency_phone.svg index 3699f7edfb..5e916df878 100644 --- a/symbols/emergency_phone.16.svg +++ b/symbols/emergency_phone.svg @@ -1,4 +1,4 @@ - + @@ -9,6 +9,6 @@ - - + + diff --git a/symbols/entrance.10.svg b/symbols/entrance.10.svg index 9f5e7b6a1d..e8d3cfb14e 100644 --- a/symbols/entrance.10.svg +++ b/symbols/entrance.10.svg @@ -8,8 +8,8 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" - width="100%" - height="100%" + width="10" + height="10" viewBox="0 0 10 10" id="svg2"> - - - - - diff --git a/symbols/fast_food.svg b/symbols/fast_food.svg new file mode 100644 index 0000000000..46d4ed61ce --- /dev/null +++ b/symbols/fast_food.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/firestation.16.svg b/symbols/firestation.16.svg deleted file mode 100644 index 2b9a6260a3..0000000000 --- a/symbols/firestation.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/firestation.svg b/symbols/firestation.svg new file mode 100644 index 0000000000..68d6ac96f8 --- /dev/null +++ b/symbols/firestation.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/ford.16.svg b/symbols/ford.svg similarity index 82% rename from symbols/ford.16.svg rename to symbols/ford.svg index d86d5bb073..7bc597f2dd 100644 --- a/symbols/ford.16.svg +++ b/symbols/ford.svg @@ -1,4 +1,4 @@ - + @@ -9,6 +9,6 @@ - - + + diff --git a/symbols/fountain-14.svg b/symbols/fountain.svg similarity index 98% rename from symbols/fountain-14.svg rename to symbols/fountain.svg index 3bded4fceb..79f7595543 100644 --- a/symbols/fountain-14.svg +++ b/symbols/fountain.svg @@ -7,8 +7,8 @@ xmlns="http://www.w3.org/2000/svg" id="svg2" viewBox="0 0 14 14" - height="100%" - width="100%" + height="14" + width="14" version="1.1"> diff --git a/symbols/fuel.16.svg b/symbols/fuel.16.svg deleted file mode 100644 index fcacd89d87..0000000000 --- a/symbols/fuel.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/fuel.svg b/symbols/fuel.svg new file mode 100644 index 0000000000..b6125ec027 --- /dev/null +++ b/symbols/fuel.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/generating_patterns/scrub.md b/symbols/generating_patterns/scrub.md new file mode 100644 index 0000000000..9327bdc4bf --- /dev/null +++ b/symbols/generating_patterns/scrub.md @@ -0,0 +1,10 @@ +The scrub pattern is generated by visiting http://www.imagico.de/map/jsdotpattern.php and using the following options: + +- regular snub square ('5' button) +- distance = 45 +- radius = 64 +- radius y = 64 +- metric = 2 +- about 10-20 relax clicks +- 'scrub2' image +- use the "render (px aligned)" option diff --git a/symbols/generating_patterns/scrub.svg b/symbols/generating_patterns/scrub.svg new file mode 100644 index 0000000000..85ea639008 --- /dev/null +++ b/symbols/generating_patterns/scrub.svg @@ -0,0 +1,9 @@ + + + + + + + + + Created with Snap \ No newline at end of file diff --git a/symbols/helipad.svg b/symbols/helipad.16.svg similarity index 71% rename from symbols/helipad.svg rename to symbols/helipad.16.svg index eceb8e9972..97e13e293c 100644 --- a/symbols/helipad.svg +++ b/symbols/helipad.16.svg @@ -1,4 +1,11 @@ - + + diff --git a/symbols/hinduist.16.svg b/symbols/hinduist.16.svg deleted file mode 100644 index 113725bb4f..0000000000 --- a/symbols/hinduist.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/hinduist.svg b/symbols/hinduist.svg new file mode 100644 index 0000000000..fcaf03ca4b --- /dev/null +++ b/symbols/hinduist.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/hospital.16.svg b/symbols/hospital.16.svg deleted file mode 100644 index 21b5e9cbb6..0000000000 --- a/symbols/hospital.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/hospital.svg b/symbols/hospital.svg new file mode 100644 index 0000000000..66e5fc5b5e --- /dev/null +++ b/symbols/hospital.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/hostel.16.svg b/symbols/hostel.16.svg deleted file mode 100644 index 91b70e6056..0000000000 --- a/symbols/hostel.16.svg +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/symbols/hostel.svg b/symbols/hostel.svg new file mode 100644 index 0000000000..f95d467998 --- /dev/null +++ b/symbols/hostel.svg @@ -0,0 +1,39 @@ + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/symbols/hotel.16.svg b/symbols/hotel.16.svg deleted file mode 100644 index ee2361ac22..0000000000 --- a/symbols/hotel.16.svg +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/symbols/hotel.svg b/symbols/hotel.svg new file mode 100644 index 0000000000..471c524898 --- /dev/null +++ b/symbols/hotel.svg @@ -0,0 +1,39 @@ + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/symbols/hunting-stand.16.svg b/symbols/hunting_stand.svg similarity index 72% rename from symbols/hunting-stand.16.svg rename to symbols/hunting_stand.svg index f05bec9825..a5add915c5 100644 --- a/symbols/hunting-stand.16.svg +++ b/symbols/hunting_stand.svg @@ -8,9 +8,9 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" - width="100%" - height="100%" - viewBox="0 0 16 16" + width="14" + height="14" + viewBox="0 0 14 14" id="svg2"> @@ -27,14 +27,13 @@ - \ No newline at end of file + d="m 3,0 0,1.25 8,2 L 11,2 z M 4,2.5 4,7 10,7 10,4 z M 3,8 l 0,1 1,0 -1,5 1.5,0 1,-5 3,0 1.03125,5 1.5,0 L 10,9 11,9 11,8 z" + id="hunting-stand" /> + diff --git a/symbols/information.12.svg b/symbols/information.12.svg index f07bc408da..6dc82e5422 100644 --- a/symbols/information.12.svg +++ b/symbols/information.12.svg @@ -37,10 +37,10 @@ + height="12" + width="12" /> - - - - - diff --git a/symbols/jewish.svg b/symbols/jewish.svg new file mode 100644 index 0000000000..b70d00d5ee --- /dev/null +++ b/symbols/jewish.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/laundry-14.svg b/symbols/laundry-14.svg deleted file mode 100644 index bc7d3ef58b..0000000000 --- a/symbols/laundry-14.svg +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/symbols/library.14.svg b/symbols/library.14.svg deleted file mode 100644 index dba9828053..0000000000 --- a/symbols/library.14.svg +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - diff --git a/symbols/library.svg b/symbols/library.svg new file mode 100644 index 0000000000..ad521d9715 --- /dev/null +++ b/symbols/library.svg @@ -0,0 +1,37 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/symbols/lighthouse.16.svg b/symbols/lighthouse.16.svg deleted file mode 100644 index eb7eae4cf9..0000000000 --- a/symbols/lighthouse.16.svg +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/symbols/lighthouse.svg b/symbols/lighthouse.svg new file mode 100644 index 0000000000..c27d78a157 --- /dev/null +++ b/symbols/lighthouse.svg @@ -0,0 +1,37 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/symbols/tourist_memorial.16.svg b/symbols/memorial.svg similarity index 56% rename from symbols/tourist_memorial.16.svg rename to symbols/memorial.svg index 8cb8b49df2..5307e2e96d 100644 --- a/symbols/tourist_memorial.16.svg +++ b/symbols/memorial.svg @@ -4,9 +4,17 @@ + width="14" + height="14" + viewBox="0 0 14 14"> + + d="M 6,2 C 5,2 4,3 4,4 l 0,8 8,0 0,-8 C 12,3 11,2 10,2 z M 7,4 9,4 9,5 7,5 z m -2,2 6,0 0,1 -6,0 z m 1,2 4,0 0,1 -4,0 z m -3,5 -1,1 0,1 12,0 0,-1 -1,-1 z" + id="memorial" /> diff --git a/symbols/monument.16.svg b/symbols/monument.svg similarity index 75% rename from symbols/monument.16.svg rename to symbols/monument.svg index 059b97bbe3..25890a65a8 100644 --- a/symbols/monument.16.svg +++ b/symbols/monument.svg @@ -1,4 +1,4 @@ - + @@ -9,6 +9,13 @@ + - + diff --git a/symbols/motel.16.svg b/symbols/motel.16.svg deleted file mode 100644 index 63b3872655..0000000000 --- a/symbols/motel.16.svg +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/symbols/motel.svg b/symbols/motel.svg new file mode 100644 index 0000000000..6bcf95eb02 --- /dev/null +++ b/symbols/motel.svg @@ -0,0 +1,39 @@ + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/symbols/motorcycle-14.svg b/symbols/motorcycle.svg similarity index 99% rename from symbols/motorcycle-14.svg rename to symbols/motorcycle.svg index d247992a7b..c1fd0bf139 100644 --- a/symbols/motorcycle-14.svg +++ b/symbols/motorcycle.svg @@ -6,7 +6,7 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" id="svg2" - viewBox="-240 0 0 16" + viewBox="0 0 14 14" height="14" width="14" version="1.1"> diff --git a/symbols/motorcycle_parking.16.svg b/symbols/motorcycle_parking.16.svg deleted file mode 100644 index 98f8ea8705..0000000000 --- a/symbols/motorcycle_parking.16.svg +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - diff --git a/symbols/motorcycle_parking.svg b/symbols/motorcycle_parking.svg new file mode 100644 index 0000000000..2e2b7c4bcf --- /dev/null +++ b/symbols/motorcycle_parking.svg @@ -0,0 +1,38 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/symbols/museum.16.svg b/symbols/museum.16.svg deleted file mode 100644 index e34ba58a5e..0000000000 --- a/symbols/museum.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/museum.svg b/symbols/museum.svg new file mode 100644 index 0000000000..fd19661d91 --- /dev/null +++ b/symbols/museum.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/muslim.16.svg b/symbols/muslim.16.svg deleted file mode 100644 index 5588fe196f..0000000000 --- a/symbols/muslim.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/muslim.svg b/symbols/muslim.svg new file mode 100644 index 0000000000..7bc5aa0aac --- /dev/null +++ b/symbols/muslim.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/newsagent-14.svg b/symbols/newsagent-14.svg deleted file mode 100644 index adb8884914..0000000000 --- a/symbols/newsagent-14.svg +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - diff --git a/symbols/nightclub.14.svg b/symbols/nightclub.svg similarity index 97% rename from symbols/nightclub.14.svg rename to symbols/nightclub.svg index d785725136..aaf9a92b23 100644 --- a/symbols/nightclub.14.svg +++ b/symbols/nightclub.svg @@ -8,8 +8,8 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" - width="100%" - height="100%" + width="14" + height="14" viewBox="0 0 14 14" id="svg2"> - - + + + + + + image/svg+xml + + + + + + + + diff --git a/symbols/peak.svg b/symbols/peak.svg index f63cf5a111..8886875585 100644 --- a/symbols/peak.svg +++ b/symbols/peak.svg @@ -4,5 +4,12 @@ version="1.1" width="8" height="8"> + diff --git a/symbols/pharmacy.16.svg b/symbols/pharmacy.16.svg deleted file mode 100644 index 0f8ffcbe2d..0000000000 --- a/symbols/pharmacy.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/pharmacy.svg b/symbols/pharmacy.svg new file mode 100644 index 0000000000..9be796999d --- /dev/null +++ b/symbols/pharmacy.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/picnic.16.svg b/symbols/picnic.16.svg deleted file mode 100644 index c2b71293d0..0000000000 --- a/symbols/picnic.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/picnic.svg b/symbols/picnic.svg new file mode 100644 index 0000000000..36556d520a --- /dev/null +++ b/symbols/picnic.svg @@ -0,0 +1,21 @@ + + + + + + + diff --git a/symbols/place_of_worship.16.svg b/symbols/place_of_worship.16.svg deleted file mode 100644 index cffa0a0cb5..0000000000 --- a/symbols/place_of_worship.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/place_of_worship.svg b/symbols/place_of_worship.svg new file mode 100644 index 0000000000..69fb57f145 --- /dev/null +++ b/symbols/place_of_worship.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/playground.16.svg b/symbols/playground.16.svg deleted file mode 100644 index e75a973428..0000000000 --- a/symbols/playground.16.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - diff --git a/symbols/playground.svg b/symbols/playground.svg new file mode 100644 index 0000000000..02372854e0 --- /dev/null +++ b/symbols/playground.svg @@ -0,0 +1,25 @@ + + + + + + + diff --git a/symbols/police.16.svg b/symbols/police.16.svg deleted file mode 100644 index f899d8b7f6..0000000000 --- a/symbols/police.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/police.svg b/symbols/police.svg new file mode 100644 index 0000000000..b4adfd17b3 --- /dev/null +++ b/symbols/police.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/post_box-12.svg b/symbols/post_box.12.svg similarity index 97% rename from symbols/post_box-12.svg rename to symbols/post_box.12.svg index f0cdcef38d..43956cb96b 100644 --- a/symbols/post_box-12.svg +++ b/symbols/post_box.12.svg @@ -6,8 +6,8 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" - width="100%" - height="100%" + width="12" + height="12" viewBox="0 0 12 12" id="svg2"> - - - - - - - image/svg+xml - - - - - - - - - diff --git a/symbols/power_wind.svg b/symbols/power_wind.svg new file mode 100644 index 0000000000..bb10f689a8 --- /dev/null +++ b/symbols/power_wind.svg @@ -0,0 +1,40 @@ + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/symbols/prison.16.svg b/symbols/prison.16.svg deleted file mode 100644 index ec7e760b7f..0000000000 --- a/symbols/prison.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/prison.svg b/symbols/prison.svg new file mode 100644 index 0000000000..b3eda17081 --- /dev/null +++ b/symbols/prison.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/pub.16.svg b/symbols/pub.16.svg deleted file mode 100644 index f71a431be1..0000000000 --- a/symbols/pub.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/pub.svg b/symbols/pub.svg new file mode 100644 index 0000000000..477cd14b3a --- /dev/null +++ b/symbols/pub.svg @@ -0,0 +1,21 @@ + + + + + + + diff --git a/symbols/recycling.16.svg b/symbols/recycling.16.svg deleted file mode 100644 index de9cec47e4..0000000000 --- a/symbols/recycling.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/recycling.svg b/symbols/recycling.svg new file mode 100644 index 0000000000..5942a144fb --- /dev/null +++ b/symbols/recycling.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/rental_bicycle.16.svg b/symbols/rental_bicycle.16.svg deleted file mode 100644 index 72497aaabf..0000000000 --- a/symbols/rental_bicycle.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/rental_bicycle.svg b/symbols/rental_bicycle.svg new file mode 100644 index 0000000000..a0b6218c3f --- /dev/null +++ b/symbols/rental_bicycle.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/rental_car.16.svg b/symbols/rental_car.16.svg deleted file mode 100644 index 5e8d37cfc6..0000000000 --- a/symbols/rental_car.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/rental_car.svg b/symbols/rental_car.svg new file mode 100644 index 0000000000..8462ea5666 --- /dev/null +++ b/symbols/rental_car.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/restaurant.16.svg b/symbols/restaurant.16.svg deleted file mode 100644 index 816134d63d..0000000000 --- a/symbols/restaurant.16.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/symbols/restaurant.svg b/symbols/restaurant.svg new file mode 100644 index 0000000000..16fe16392c --- /dev/null +++ b/symbols/restaurant.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/saddle.svg b/symbols/saddle.svg index ac6c3569cb..37f4aea717 100644 --- a/symbols/saddle.svg +++ b/symbols/saddle.svg @@ -4,5 +4,12 @@ version="1.1" width="8" height="8"> + diff --git a/symbols/scrub.png b/symbols/scrub.png index b43233aefb..c8218985c3 100644 Binary files a/symbols/scrub.png and b/symbols/scrub.png differ diff --git a/symbols/shelter-14.svg b/symbols/shelter.svg similarity index 91% rename from symbols/shelter-14.svg rename to symbols/shelter.svg index 7abe8387d4..0f5e44614f 100644 --- a/symbols/shelter-14.svg +++ b/symbols/shelter.svg @@ -6,8 +6,8 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" - width="100%" - height="100%" + width="14" + height="14" viewBox="0 0 14 14" id="svg2"> + - - - - - diff --git a/symbols/shintoist.svg b/symbols/shintoist.svg new file mode 100644 index 0000000000..77b2d0fb16 --- /dev/null +++ b/symbols/shintoist.svg @@ -0,0 +1,20 @@ + + + + + + + diff --git a/symbols/shop_alcohol.16.svg b/symbols/shop/alcohol.svg similarity index 80% rename from symbols/shop_alcohol.16.svg rename to symbols/shop/alcohol.svg index 7a9f698517..306d1834fc 100644 --- a/symbols/shop_alcohol.16.svg +++ b/symbols/shop/alcohol.svg @@ -1,4 +1,4 @@ - + @@ -9,6 +9,6 @@ - - + + diff --git a/symbols/art-14.svg b/symbols/shop/art.svg similarity index 95% rename from symbols/art-14.svg rename to symbols/shop/art.svg index 310a13a44c..915f842d57 100644 --- a/symbols/art-14.svg +++ b/symbols/shop/art.svg @@ -32,6 +32,7 @@ + diff --git a/symbols/bag-14.svg b/symbols/shop/bag.svg similarity index 97% rename from symbols/bag-14.svg rename to symbols/shop/bag.svg index 9b05c7d48a..6a836f6433 100644 --- a/symbols/bag-14.svg +++ b/symbols/shop/bag.svg @@ -8,8 +8,8 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" - width="100%" - height="100%" + width="14" + height="14" viewBox="0 0 14 14" id="svg2"> + + + + + + diff --git a/symbols/beauty-14.svg b/symbols/shop/beauty.svg similarity index 98% rename from symbols/beauty-14.svg rename to symbols/shop/beauty.svg index 3748dac057..174e5f0d64 100644 --- a/symbols/beauty-14.svg +++ b/symbols/shop/beauty.svg @@ -8,8 +8,8 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" - width="100%" - height="100%" + width="14" + height="14" viewBox="0 0 14 14" id="svg2"> + + + + + image/svg+xml + + + + + + + + + diff --git a/symbols/shop/bicycle.svg b/symbols/shop/bicycle.svg new file mode 100644 index 0000000000..85c06fb5d0 --- /dev/null +++ b/symbols/shop/bicycle.svg @@ -0,0 +1,39 @@ + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/symbols/shop_butcher.png b/symbols/shop/butcher.png similarity index 100% rename from symbols/shop_butcher.png rename to symbols/shop/butcher.png diff --git a/symbols/shop/car.svg b/symbols/shop/car.svg new file mode 100644 index 0000000000..201f5fa0a4 --- /dev/null +++ b/symbols/shop/car.svg @@ -0,0 +1,57 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/symbols/car_parts-14.svg b/symbols/shop/car_parts.svg similarity index 97% rename from symbols/car_parts-14.svg rename to symbols/shop/car_parts.svg index 87001405ed..04b1219b02 100644 --- a/symbols/car_parts-14.svg +++ b/symbols/shop/car_parts.svg @@ -8,8 +8,8 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" - width="100%" - height="100%" + width="14" + height="14" viewBox="0 0 14 14" id="svg2"> + + + + + + + image/svg+xml + + + + + + + + + diff --git a/symbols/chemist-14.svg b/symbols/shop/chemist.svg similarity index 98% rename from symbols/chemist-14.svg rename to symbols/shop/chemist.svg index ecec082aae..ec278d2671 100644 --- a/symbols/chemist-14.svg +++ b/symbols/shop/chemist.svg @@ -8,8 +8,8 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" - width="100%" - height="100%" + width="14" + height="14" viewBox="0 0 14 14" id="svg2"> + @@ -9,6 +9,6 @@ - - + + diff --git a/symbols/shop/computer.svg b/symbols/shop/computer.svg new file mode 100644 index 0000000000..114c508c19 --- /dev/null +++ b/symbols/shop/computer.svg @@ -0,0 +1,30 @@ + +image/svg+xml + + diff --git a/symbols/confectionery-14.svg b/symbols/shop/confectionery.svg similarity index 90% rename from symbols/confectionery-14.svg rename to symbols/shop/confectionery.svg index f3faa9ff39..7da0e243ef 100644 --- a/symbols/confectionery-14.svg +++ b/symbols/shop/confectionery.svg @@ -8,8 +8,8 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" - width="100%" - height="100%" + width="14" + height="14" viewBox="0 0 14 14" id="svg2"> + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + diff --git a/symbols/copyshop-14.svg b/symbols/shop/copyshop.svg similarity index 97% rename from symbols/copyshop-14.svg rename to symbols/shop/copyshop.svg index e45a608332..33f83138f6 100644 --- a/symbols/copyshop-14.svg +++ b/symbols/shop/copyshop.svg @@ -8,8 +8,8 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" - width="100%" - height="100%" + width="14" + height="14" viewBox="0 0 14 14" id="svg2"> + + + + + + + image/svg+xml + + + + + + + + diff --git a/symbols/shop/diy.svg b/symbols/shop/diy.svg new file mode 100644 index 0000000000..74513879cd --- /dev/null +++ b/symbols/shop/diy.svg @@ -0,0 +1,39 @@ + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/symbols/shop_electronics.16.svg b/symbols/shop/electronics.svg similarity index 81% rename from symbols/shop_electronics.16.svg rename to symbols/shop/electronics.svg index 3883f9745f..2b81103dd4 100644 --- a/symbols/shop_electronics.16.svg +++ b/symbols/shop/electronics.svg @@ -1,4 +1,4 @@ - + @@ -9,6 +9,6 @@ - - + + diff --git a/symbols/florist.16.svg b/symbols/shop/florist.svg similarity index 68% rename from symbols/florist.16.svg rename to symbols/shop/florist.svg index 482542d2b3..904a8d24e0 100644 --- a/symbols/florist.16.svg +++ b/symbols/shop/florist.svg @@ -8,9 +8,9 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" - width="100%" - height="100%" - viewBox="0 0 16 16" + width="14" + height="14" + viewBox="0 0 14 14" id="svg2"> @@ -27,14 +27,13 @@ + d="M 3,0 C 3.944406,2.8332196 2.233819,6.4334035 6.25,6.938 l 0,5.562 C 6.25,11.033993 3.997226,8 1,8 c 3,2 1,6 5,6 2,0 0,0 2,0 4,0 2,-4 5,-6 -2.997226,0 -5.25,2.944994 -5.25,4.5 l 0,-5.562 C 11.753428,6.4504075 10.055593,2.8332196 11,0 10,0 8.75,3 8.75,3 8.75,3 8,1 7,0 6,1 5.25,3 5.25,3 5.25,3 4,0 3,0 z" + id="florist" /> diff --git a/symbols/shop_furniture.16.svg b/symbols/shop/furniture.svg similarity index 78% rename from symbols/shop_furniture.16.svg rename to symbols/shop/furniture.svg index 89835e7b3a..4df5e0877c 100644 --- a/symbols/shop_furniture.16.svg +++ b/symbols/shop/furniture.svg @@ -1,4 +1,4 @@ - + @@ -9,6 +9,6 @@ - - + + diff --git a/symbols/garden_centre-14.svg b/symbols/shop/garden_centre.svg similarity index 97% rename from symbols/garden_centre-14.svg rename to symbols/shop/garden_centre.svg index 3cae5d86da..2ff5db8482 100644 --- a/symbols/garden_centre-14.svg +++ b/symbols/shop/garden_centre.svg @@ -8,8 +8,8 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" - width="100%" - height="100%" + width="14" + height="14" viewBox="0 0 14 14" id="svg2"> + @@ -9,6 +9,6 @@ - - + + diff --git a/symbols/greengrocer-14.svg b/symbols/shop/greengrocer.svg similarity index 97% rename from symbols/greengrocer-14.svg rename to symbols/shop/greengrocer.svg index fae3056b3d..0bf57174bc 100644 --- a/symbols/greengrocer-14.svg +++ b/symbols/shop/greengrocer.svg @@ -8,8 +8,8 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" - width="100%" - height="100%" + width="14" + height="14" viewBox="0 0 14 14" id="svg2"> + + + + + + + image/svg+xml + + + + + + + + + diff --git a/symbols/hifi-14.svg b/symbols/shop/hifi.svg similarity index 97% rename from symbols/hifi-14.svg rename to symbols/shop/hifi.svg index 21c9ce806d..5a684743de 100644 --- a/symbols/hifi-14.svg +++ b/symbols/shop/hifi.svg @@ -7,8 +7,8 @@ xmlns="http://www.w3.org/2000/svg" id="svg2" viewBox="0 0 14 14" - height="100%" - width="100%" + height="14" + width="14" version="1.1"> diff --git a/symbols/ice-cream-14.svg b/symbols/shop/ice_cream.svg similarity index 97% rename from symbols/ice-cream-14.svg rename to symbols/shop/ice_cream.svg index a1ad20ee79..c2bb7140c5 100644 --- a/symbols/ice-cream-14.svg +++ b/symbols/shop/ice_cream.svg @@ -8,8 +8,8 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" - width="100%" - height="100%" + width="14" + height="14" viewBox="0 0 14 14" id="svg2"> + @@ -9,6 +9,6 @@ - - + + diff --git a/symbols/shop/laundry.svg b/symbols/shop/laundry.svg new file mode 100644 index 0000000000..3cd3a2c761 --- /dev/null +++ b/symbols/shop/laundry.svg @@ -0,0 +1,38 @@ + + + + + + + image/svg+xml + + + + + + + + diff --git a/symbols/shop_mobile_phone.16.svg b/symbols/shop/mobile_phone.svg similarity index 74% rename from symbols/shop_mobile_phone.16.svg rename to symbols/shop/mobile_phone.svg index 2a7ad070dd..6f46910b5e 100644 --- a/symbols/shop_mobile_phone.16.svg +++ b/symbols/shop/mobile_phone.svg @@ -1,4 +1,4 @@ - + @@ -9,6 +9,6 @@ - - + + diff --git a/symbols/musical_instrument-14.svg b/symbols/shop/musical_instrument.svg similarity index 88% rename from symbols/musical_instrument-14.svg rename to symbols/shop/musical_instrument.svg index a912a20960..e4ce363eff 100644 --- a/symbols/musical_instrument-14.svg +++ b/symbols/shop/musical_instrument.svg @@ -17,8 +17,16 @@ id="metadata13">image/svg+xml + + - \ No newline at end of file + diff --git a/symbols/shop/newsagent.svg b/symbols/shop/newsagent.svg new file mode 100644 index 0000000000..dd624bea16 --- /dev/null +++ b/symbols/shop/newsagent.svg @@ -0,0 +1,38 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/symbols/shop_optician.16.svg b/symbols/shop/optician.svg similarity index 74% rename from symbols/shop_optician.16.svg rename to symbols/shop/optician.svg index d228759fa3..c5c339b0ab 100644 --- a/symbols/shop_optician.16.svg +++ b/symbols/shop/optician.svg @@ -1,4 +1,4 @@ - + @@ -9,6 +9,6 @@ - - + + diff --git a/symbols/outdoor-14.svg b/symbols/shop/outdoor.svg similarity index 97% rename from symbols/outdoor-14.svg rename to symbols/shop/outdoor.svg index 37af74a14b..e18ccf48c5 100644 --- a/symbols/outdoor-14.svg +++ b/symbols/shop/outdoor.svg @@ -7,8 +7,8 @@ xmlns="http://www.w3.org/2000/svg" id="svg2" viewBox="0 0 14 14" - height="100%" - width="100%" + height="14" + width="14" version="1.1"> diff --git a/symbols/perfumery-14.svg b/symbols/shop/perfumery.svg similarity index 88% rename from symbols/perfumery-14.svg rename to symbols/shop/perfumery.svg index 65ed0738d3..a3f88973ea 100644 --- a/symbols/perfumery-14.svg +++ b/symbols/shop/perfumery.svg @@ -7,8 +7,8 @@ xmlns="http://www.w3.org/2000/svg" id="svg2" viewBox="0 0 14 14" - height="100%" - width="100%" + height="14" + width="14" version="1.1"> @@ -24,6 +24,13 @@ + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/symbols/photo-14.svg b/symbols/shop/photo.svg similarity index 91% rename from symbols/photo-14.svg rename to symbols/shop/photo.svg index 3502120c13..41d7df52ff 100644 --- a/symbols/photo-14.svg +++ b/symbols/shop/photo.svg @@ -7,8 +7,8 @@ xmlns="http://www.w3.org/2000/svg" id="svg2" viewBox="0 0 14 14" - height="100%" - width="100%" + height="14" + width="14" version="1.1"> @@ -24,6 +24,13 @@ + image/svg+xml + \ No newline at end of file + id="path4139" /> diff --git a/symbols/shop/shoes.svg b/symbols/shop/shoes.svg new file mode 100644 index 0000000000..a6edb32461 --- /dev/null +++ b/symbols/shop/shoes.svg @@ -0,0 +1,39 @@ + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/symbols/shop/sports.svg b/symbols/shop/sports.svg new file mode 100644 index 0000000000..552eaedddf --- /dev/null +++ b/symbols/shop/sports.svg @@ -0,0 +1,31 @@ + +image/svg+xml + + diff --git a/symbols/stationery-14.svg b/symbols/shop/stationery.svg similarity index 89% rename from symbols/stationery-14.svg rename to symbols/shop/stationery.svg index efa26b5f0c..7cbc72abb7 100644 --- a/symbols/stationery-14.svg +++ b/symbols/shop/stationery.svg @@ -8,8 +8,8 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" - width="100%" - height="100%" + width="14" + height="14" viewBox="0 0 14 14" id="svg2"> + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/symbols/shop/tea.svg b/symbols/shop/tea.svg new file mode 100644 index 0000000000..480f75a5f4 --- /dev/null +++ b/symbols/shop/tea.svg @@ -0,0 +1,65 @@ + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + Jotam + + + + + + + + + + + + + + diff --git a/symbols/tobacco-14.svg b/symbols/shop/tobacco.svg similarity index 83% rename from symbols/tobacco-14.svg rename to symbols/shop/tobacco.svg index 72454afded..21c9d979ae 100644 --- a/symbols/tobacco-14.svg +++ b/symbols/shop/tobacco.svg @@ -17,7 +17,15 @@ id="metadata13">image/svg+xml + + \ No newline at end of file + id="path3357-4" /> diff --git a/symbols/toys-14.svg b/symbols/shop/toys.svg similarity index 80% rename from symbols/toys-14.svg rename to symbols/shop/toys.svg index 3f8e9860a4..ede94cae98 100644 --- a/symbols/toys-14.svg +++ b/symbols/shop/toys.svg @@ -16,22 +16,15 @@ id="metadata19">image/svg+xml +