diff --git a/.env b/.env index b9d77042..dcfb02e3 100644 --- a/.env +++ b/.env @@ -19,8 +19,8 @@ PGPORT=5432 BBOX=-180.0,-85.0511,180.0,85.0511 # Which zooms to generate with make generate-tiles-pg -MIN_ZOOM=0 -MAX_ZOOM=8 +MIN_ZOOM=9 +MAX_ZOOM=11 # `MID_ZOOM` setting only works with `make generate-tiles-pg` command. Make sure MID_ZOOM < MAX_ZOOM. # See https://github.com/openmaptiles/openmaptiles-tools/pull/383 @@ -30,14 +30,14 @@ MAX_ZOOM=8 DIFF_MODE=false # The current setup assumes this file is placed inside the data/ dir -MBTILES_FILE=waterway_13.mbtiles +MBTILES_FILE=waterway_norway_10to11-test01.mbtiles # This is the current repl_config.json location, pre-configured in the tools Dockerfile # Makefile and quickstart replace it with the dynamically generated one, but we keep it here in case some other method is used to run. IMPOSM_CONFIG_FILE=/usr/src/app/config/repl_config.json # Number of parallel processes to use when importing sql files -MAX_PARALLEL_PSQL=10 +MAX_PARALLEL_PSQL=1024 # Number of parallel threads to use when generating vector map tiles diff --git a/layers/landcover/landcover.sql b/layers/landcover/landcover.sql index d690422a..49c48f23 100644 --- a/layers/landcover/landcover.sql +++ b/layers/landcover/landcover.sql @@ -273,7 +273,7 @@ FROM ( -- etldoc: osm_landcover_gen_z1 -> layer_landcover:z1 SELECT geometry, subclass - -- etldoc: osm_landcover_gen_z1 -> layer_landcover:z1 + FROM osm_landcover_gen_z1 WHERE zoom_level = 1 AND geometry && bbox UNION ALL diff --git a/layers/landcover/style.json b/layers/landcover/style.json index 27831292..4529b239 100644 --- a/layers/landcover/style.json +++ b/layers/landcover/style.json @@ -58,7 +58,7 @@ "sand" ] ], - "order": 4 + "order": 3 }, { "id": "landcover_class_outline", @@ -80,7 +80,7 @@ "farmland" ] ], - "order": 5 + "order": 9 }, { "id": "landcover_park", @@ -103,7 +103,7 @@ "park" ] ], - "order": 6 + "order": 13 }, { "id": "landcover_subclasses", @@ -228,7 +228,7 @@ "wood" ] ], - "order": 7 + "order": 14 }, { "id": "landcover_subclass_patterns", @@ -352,7 +352,7 @@ "wood" ] ], - "order": 8 + "order": 15 }, { "id": "landcover_subclass_outline", @@ -403,7 +403,7 @@ "recreation_ground" ] ], - "order": 9 + "order": 17 }, { "id": "landcover_ice", @@ -424,7 +424,7 @@ "ice" ] ], - "order": 10 + "order": 19 }, { "id": "landcover_ice_outline", @@ -476,7 +476,7 @@ "ice" ] ], - "order": 11 + "order": 22 } ] } \ No newline at end of file diff --git a/layers/place/place.sql b/layers/place/place.sql index 7c6fa0ed..1e118ac3 100644 --- a/layers/place/place.sql +++ b/layers/place/place.sql @@ -120,27 +120,27 @@ FROM ( UNION ALL - SELECT - -- etldoc: osm_boundary_polygon -> layer_place:z6_11 - -- etldoc: osm_boundary_polygon -> layer_place:z12_14 - osm_id * 10 AS osm_id, - geometry_point, - name, - NULL::text AS name_en, -- deprecated - NULL::text AS name_de, -- deprecated - tags, - 'aboriginal_lands' AS class, - area_rank(area) AS "rank", - NULL::int AS capital, - NULL::text AS iso_a2 - FROM osm_boundary_polygon - WHERE geometry_point && bbox - AND ((zoom_level = 6 AND area_rank(area) <= 1) - OR (zoom_level = 7 AND area_rank(area) <= 2) - OR (zoom_level = 8 AND area_rank(area) <= 3) - OR (zoom_level = 9 AND area_rank(area) <= 4) - OR (zoom_level >= 10)) - UNION ALL + --SELECT + -- -- etldoc: osm_boundary_polygon -> layer_place:z6_11 + -- -- etldoc: osm_boundary_polygon -> layer_place:z12_14 + -- osm_id * 10 AS osm_id, + -- geometry_point, + -- name, + -- NULL::text AS name_en, -- deprecated + -- NULL::text AS name_de, -- deprecated + -- tags, + -- 'aboriginal_lands' AS class, + -- area_rank(area) AS "rank", + -- NULL::int AS capital, + -- NULL::text AS iso_a2 + --FROM osm_boundary_polygon + --WHERE geometry_point && bbox + -- AND ((zoom_level = 6 AND area_rank(area) <= 1) + -- OR (zoom_level = 7 AND area_rank(area) <= 2) + -- OR (zoom_level = 8 AND area_rank(area) <= 3) + -- OR (zoom_level = 9 AND area_rank(area) <= 4) + -- OR (zoom_level >= 10)) + --UNION ALL SELECT -- etldoc: layer_city -> layer_place:z0_3 diff --git a/layers/place/place.yaml b/layers/place/place.yaml index a81c9a18..e8adb307 100644 --- a/layers/place/place.yaml +++ b/layers/place/place.yaml @@ -5,71 +5,71 @@ layer: - ne_10m_admin_1_states_provinces - ne_10m_admin_0_countries - ne_10m_populated_places - layers: - - boundary + #layers: + # - boundary description: | - The place layer consists out of [countries](http://wiki.openstreetmap.org/wiki/Tag:place%3Dcountry), - [states](http://wiki.openstreetmap.org/wiki/Tag:place%3Dstate), [cities](http://wiki.openstreetmap.org/wiki/Key:place) - and [islands](https://wiki.openstreetmap.org/wiki/Tag:place%3Disland). - Apart from the roads this is also one of the more important layers to create a beautiful map. - We suggest you use different font styles and sizes to create a text hierarchy. + The place layer consists out of [countries](http://wiki.openstreetmap.org/wiki/Tag:place%3Dcountry), + [states](http://wiki.openstreetmap.org/wiki/Tag:place%3Dstate), [cities](http://wiki.openstreetmap.org/wiki/Key:place) + and [islands](https://wiki.openstreetmap.org/wiki/Tag:place%3Disland). + Apart from the roads this is also one of the more important layers to create a beautiful map. + We suggest you use different font styles and sizes to create a text hierarchy. fields: name: The OSM [`name`](http://wiki.openstreetmap.org/wiki/Key:name) value of the place. Language-specific values are in `name:xx`. name_en: English name `name:en` if available, otherwise `name`. This is deprecated and will be removed in a future release in favor of `name:en`. name_de: German name `name:de` if available, otherwise `name` or `name:en`. This is deprecated and will be removed in a future release in favor of `name:de`. capital: description: | - The **capital** field marks the - [`admin_level`](http://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative#admin_level) - of the boundary the place is a capital of. + The **capital** field marks the + [`admin_level`](http://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative#admin_level) + of the boundary the place is a capital of. values: [2, 3, 4, 5, 6] class: description: | - Original value of the - [`place`](http://wiki.openstreetmap.org/wiki/Key:place) tag. - Distinguish between continents, countries, states, islands and - places like settlements or smaller entities. - Use **class** to separately style the different places and build - a text hierarchy according to their importance. For places derived - from boundaries, the original value of the - [`boundary`](http://wiki.openstreetmap.org/wiki/Key:boundary) tag. + Original value of the + [`place`](http://wiki.openstreetmap.org/wiki/Key:place) tag. + Distinguish between continents, countries, states, islands and + places like settlements or smaller entities. + Use **class** to separately style the different places and build + a text hierarchy according to their importance. For places derived + from boundaries, the original value of the + [`boundary`](http://wiki.openstreetmap.org/wiki/Key:boundary) tag. values: - - continent - - country - - state - - province - - city - - town - - village - - hamlet - - borough - - suburb - - quarter - - neighbourhood - - isolated_dwelling - - island - - aboriginal_lands + - continent + - country + - state + - province + - city + - town + - village + - hamlet + - borough + - suburb + - quarter + - neighbourhood + - isolated_dwelling + - island + - aboriginal_lands iso_a2: description: | - Two-letter country code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Available only for `class=country`. - Original value of the - [`country_code_iso3166_1_alpha_2`](http://wiki.openstreetmap.org/wiki/Tag:place%3Dcountry) tag. + Two-letter country code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Available only for `class=country`. + Original value of the + [`country_code_iso3166_1_alpha_2`](http://wiki.openstreetmap.org/wiki/Tag:place%3Dcountry) tag. rank: description: | - Countries, states and the most important cities all have a - **rank** to boost their importance on the map. - The **rank** field for countries and states ranges from - `1` to `6` while the **rank** field for cities ranges from - `1` to `10` for the most important cities - and continues from `10` serially based on the - local importance of the city (derived from population and city class). - You can use the **rank** to limit density of labels or improve - the text hierarchy. - The rank value is a combination of the Natural Earth - `scalerank`, `labelrank` and `datarank` values for countries - and states and for cities consists out of a shifted - Natural Earth `scalerank` combined with a local rank - within a grid for cities that do not have a Natural Earth `scalerank`. + Countries, states and the most important cities all have a + **rank** to boost their importance on the map. + The **rank** field for countries and states ranges from + `1` to `6` while the **rank** field for cities ranges from + `1` to `10` for the most important cities + and continues from `10` serially based on the + local importance of the city (derived from population and city class). + You can use the **rank** to limit density of labels or improve + the text hierarchy. + The rank value is a combination of the Natural Earth + `scalerank`, `labelrank` and `datarank` values for countries + and states and for cities consists out of a shifted + Natural Earth `scalerank` combined with a local rank + within a grid for cities that do not have a Natural Earth `scalerank`. buffer_size: 256 datasource: geometry_field: geometry diff --git a/layers/waterway/update_important_waterway.sql b/layers/waterway/update_important_waterway.sql index aa0105ea..67d2259b 100644 --- a/layers/waterway/update_important_waterway.sql +++ b/layers/waterway/update_important_waterway.sql @@ -24,7 +24,10 @@ CREATE TABLE IF NOT EXISTS osm_important_waterway_linestring ( name varchar, name_en varchar, name_de varchar, - tags hstore + tags hstore, + is_bridge boolean, + is_tunnel boolean, + is_intermittent boolean ); ALTER TABLE osm_important_waterway_linestring ADD COLUMN IF NOT EXISTS source_ids bigint[]; @@ -187,13 +190,16 @@ BEGIN ); -- etldoc: osm_important_waterway_linestring -> osm_important_waterway_linestring_gen_z11 - INSERT INTO osm_important_waterway_linestring_gen_z11 (geometry, id, name, name_en, name_de, tags) + INSERT INTO osm_important_waterway_linestring_gen_z11 (geometry, id, name, name_en, name_de, tags, is_bridge, is_tunnel, is_intermittent) SELECT ST_Simplify(geometry, ZRes(12)) AS geometry, id, name, name_en, name_de, - tags + tags, + is_bridge, + is_tunnel, + is_intermittent FROM osm_important_waterway_linestring WHERE ( full_update OR @@ -219,13 +225,16 @@ BEGIN ); -- etldoc: osm_important_waterway_linestring_gen_z11 -> osm_important_waterway_linestring_gen_z10 - INSERT INTO osm_important_waterway_linestring_gen_z10 (geometry, id, name, name_en, name_de, tags) + INSERT INTO osm_important_waterway_linestring_gen_z10 (geometry, id, name, name_en, name_de, tags, is_bridge, is_tunnel, is_intermittent) SELECT ST_Simplify(geometry, ZRes(11)) AS geometry, id, name, name_en, name_de, - tags + tags, + is_bridge, + is_tunnel, + is_intermittent FROM osm_important_waterway_linestring_gen_z11 WHERE ( full_update OR @@ -251,13 +260,16 @@ BEGIN ); -- etldoc: osm_important_waterway_linestring_gen_z10 -> osm_important_waterway_linestring_gen_z9 - INSERT INTO osm_important_waterway_linestring_gen_z9 (geometry, id, name, name_en, name_de, tags) + INSERT INTO osm_important_waterway_linestring_gen_z9 (geometry, id, name, name_en, name_de, tags, is_bridge, is_tunnel, is_intermittent) SELECT ST_Simplify(geometry, ZRes(10)) AS geometry, id, name, name_en, name_de, - tags + tags, + is_bridge, + is_tunnel, + is_intermittent FROM osm_important_waterway_linestring_gen_z10 WHERE ( full_update OR diff --git a/layers/waterway/waterway.sql b/layers/waterway/waterway.sql index 6b2f7f3a..ebe53d43 100644 --- a/layers/waterway/waterway.sql +++ b/layers/waterway/waterway.sql @@ -229,9 +229,9 @@ SELECT geometry, name_en, name_de, tags, - NULL::boolean AS is_bridge, - NULL::boolean AS is_tunnel, - NULL::boolean AS is_intermittent + is_bridge, + is_tunnel, + is_intermittent FROM osm_important_waterway_linestring_gen_z9 ); @@ -244,9 +244,9 @@ SELECT geometry, name_en, name_de, tags, - NULL::boolean AS is_bridge, - NULL::boolean AS is_tunnel, - NULL::boolean AS is_intermittent + is_bridge, + is_tunnel, + is_intermittent FROM osm_important_waterway_linestring_gen_z10 ); @@ -259,12 +259,19 @@ SELECT geometry, name_en, name_de, tags, - NULL::boolean AS is_bridge, - NULL::boolean AS is_tunnel, - NULL::boolean AS is_intermittent + is_bridge, + is_tunnel, + is_intermittent FROM osm_important_waterway_linestring_gen_z11 ); +-- ST_MakeValid( +-- ST_SnapToGrid( +-- ST_SimplifyVW(geometry, power(zres(10),2)), +-- 0.001)) AS geometry + + + -- etldoc: osm_waterway_linestring -> waterway_z12 CREATE OR REPLACE VIEW waterway_z12 AS ( diff --git a/openmaptiles.yaml b/openmaptiles.yaml index b16ac888..e170b1a4 100644 --- a/openmaptiles.yaml +++ b/openmaptiles.yaml @@ -1,7 +1,7 @@ tileset: layers: - layers/water/water.yaml - #- layers/waterway/waterway.yaml + - layers/waterway/waterway.yaml #- layers/landcover/landcover.yaml #- layers/landuse/landuse.yaml #- layers/mountain_peak/mountain_peak.yaml @@ -10,7 +10,7 @@ tileset: #- layers/aeroway/aeroway.yaml #- layers/transportation/transportation.yaml #- layers/building/building.yaml - #- layers/water_name/water_name.yaml + - layers/water_name/water_name.yaml #- layers/transportation_name/transportation_name.yaml #- layers/place/place.yaml #- layers/housenumber/housenumber.yaml @@ -27,85 +27,8 @@ tileset: minzoom: 0 pixel_scale: 256 languages: - - am # Amharic - - ar # Arabic - - az # Azerbaijani, Latin - - be # Belorussian - - bg # Bulgarian - - bn # Bengali - - br # Breton, Latin - - bs # Bosnian, Latin - - ca # Catalan, Latin - - co # Corsican, Latin - - cs # Czech, Latin - - cy # Welsh, Latin - - da # Danish, Latin - - de # German, Latin - - el # Greek - en # English, Latin - - eo # Esperanto, Latin - - es # Spanish, Latin - - et # Estonian, Latin - - eu # Basque, Latin - - fa # Persian - - fi # Finnish, Latin - - fr # French, Latin - - fy # Western Frisian, Latin - - ga # Irish, Latin - - gd # Scottish Gaelic, Latin - - he # Hebrew - - hi # Hindi - - hr # Croatian, Latin - - hu # Hungarian, Latin - - hy # Armenian - - id # Indonesian, Latin - - is # Icelandic, Latin - - it # Italian, Latin - - ja # Japanese - - ja_kana # Japanese Kana form - - ja_rm # romanization of Japanese, Latin - - ja-Latn # romanisation of Japanese, Latin since 2018 - - ja-Hira # Japanese Hiragana form - - ka # Georgian - - kk # Kazakh - - kn # Kannada - - ko # Korean - - ko-Latn # romanization of Korean, Latin - - ku # Kurdish, Latin - - la # Latin, Latin - - lb # Luxembourgish, Latin - - lt # Lithuanian, Latin - - lv # Latvian, Latin - - mk # Macedonian - - mt # Maltese, Latin - - ml # Malayalam - - nl # Dutch, Latin - "no" # Norwegian, Latin - - oc # Occitan (post 1500), Latin - - pa # Punjabi - - pnb # Western Punjabi - - pl # Polish, Latin - - pt # Portuguese, Latin - - rm # Romansh, Latin - - ro # Romania, Latin - - ru # Russian - - sk # Slovak, Latin - - sl # Slovene, Latin - - sq # Albanian, Latin - - sr # Serbian, Cyrillic - - sr-Latn # Serbian, Latin - - sv # Swedish, Latin - - ta # Tamil - - te # Telugu - - th # Thai - - tok # Toki Pona - - tr # Turkish, Latin - - uk # Ukrainian - - ur # Urdu - - vi # Vietnamese, Latin - - zh # Chinese - - zh-Hant # Traditional Chinese - - zh-Hans # Simplified Chinese defaults: 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: