diff --git a/.env b/.env
index d664449c..0ef9a892 100644
--- a/.env
+++ b/.env
@@ -4,7 +4,7 @@
TILESET_FILE=openmaptiles.yaml
# Use 3-part patch version to ignore patch updates, e.g. 7.0.0
-TOOLS_VERSION=7.0
+TOOLS_VERSION=7.1
# Make sure these values are in sync with the ones in .env-postgres file
PGDATABASE=openmaptiles
@@ -29,21 +29,13 @@ MAX_ZOOM=7
# Use true (case sensitive) to allow data updates
DIFF_MODE=false
-# Some area data like openstreetmap.fr can contain invalid references
-# that must be cleaned up before using it for borders -- set it to true.
-BORDERS_CLEANUP=false
-
# The current setup assumes this file is placed inside the data/ dir
MBTILES_FILE=tiles.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
-# import-borders temp files - set them here to defaults, and override in the Makefile based on the area
-BORDERS_CLEANUP_FILE=data/borders/cleanup.pbf
-BORDERS_PBF_FILE=data/borders/filtered.pbf
-BORDERS_CSV_FILE=data/borders/lines.csv
-
# Number of parallel processes to use when importing sql files
MAX_PARALLEL_PSQL=5
diff --git a/.github/workflows/integrity.yml b/.github/workflows/integrity.yml
index 5ba95030..c46aa11c 100644
--- a/.github/workflows/integrity.yml
+++ b/.github/workflows/integrity.yml
@@ -15,7 +15,7 @@ jobs:
steps:
- name: Checkout the changes
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
- name: Run quickstart for a small area
env:
@@ -27,7 +27,7 @@ jobs:
./quickstart.sh $area
- name: Save quickstart.log
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
with:
name: quickstart.log
path: quickstart.log
diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml
index 3266dbda..6b8649d4 100644
--- a/.github/workflows/performance.yml
+++ b/.github/workflows/performance.yml
@@ -45,7 +45,7 @@ jobs:
- name: Cache test data download
id: cache-testdata
- uses: actions/cache@v2
+ uses: actions/cache@v4
with:
path: ci_cache
key: "v2-${{ env.TEST_DATA_URL }}"
@@ -58,7 +58,7 @@ jobs:
curl --silent --show-error --location --output ci_cache/perf-test-areas-latest.osm.pbf "$TEST_DATA_URL"
- name: Get code
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
with:
# Fetch the last two commits in case this is a PR,
# and we need to profile the base branch first
@@ -76,10 +76,10 @@ jobs:
# Take the first parent of the grafted commit (cannot use HEAD^1 with shallow clones)
REV_HASH=$(git cat-file -p $REV_HASH | awk 'NR > 1 {if(/^parent/){print $2; exit}}')
fi
- echo "::set-output name=hash::$REV_HASH"
+ echo "hash=$REV_HASH" >> $GITHUB_OUTPUT
- name: Set up caching for the performance results
- uses: actions/cache@v2
+ uses: actions/cache@v4
with:
path: perf_cache
# If profiling result cache has incompatible format, increase this "v" number
@@ -287,14 +287,14 @@ jobs:
fi
- name: Save performance artifacts
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
with:
name: performance_results
path: artifacts
- name: Save PR message artifact
if: github.event_name == 'pull_request'
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
with:
name: pr_message
path: pr_message
diff --git a/.github/workflows/sql-tests.yml b/.github/workflows/sql-tests.yml
index b301f055..895d6b88 100644
--- a/.github/workflows/sql-tests.yml
+++ b/.github/workflows/sql-tests.yml
@@ -15,7 +15,7 @@ jobs:
steps:
- name: Checkout the changes
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
- name: Run unit tests
run: |
diff --git a/LICENSE.md b/LICENSE.md
index 626555b4..52c81b85 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,4 +1,4 @@
-Copyright (c) 2023, MapTiler.com & OpenMapTiles contributors.
+Copyright (c) 2024, MapTiler.com & OpenMapTiles contributors.
All rights reserved.
The vector tile schema has been developed by Klokan Technologies GmbH and
diff --git a/Makefile b/Makefile
index 697fe106..4f174377 100644
--- a/Makefile
+++ b/Makefile
@@ -289,7 +289,7 @@ ifeq (,$(wildcard build/sql/run_last.sql))
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools bash -c \
'generate-sql $(TILESET_FILE) --dir ./build/sql \
&& generate-sqltomvt $(TILESET_FILE) \
- --key --gzip --postgis-ver 3.0.1 \
+ --key --gzip --postgis-ver 3.2.3 \
--function --fname=getmvt >> ./build/sql/run_last.sql'
endif
diff --git a/README.md b/README.md
index ebfb8536..c4afc403 100644
--- a/README.md
+++ b/README.md
@@ -160,7 +160,7 @@ make build-style
Now you are ready to **generate the vector tiles**. By default, `./.env` specifies the entire planet BBOX for zooms 0-7, but running `generate-bbox-file` will analyze the data file and set the `BBOX` param to limit tile generation.
```
-make generate-bbox-file # compute data bbox -- not needed for the whole planet
+make generate-bbox-file # compute data bbox -- not needed for the whole planet or for downloaded area by `make download`
make generate-tiles-pg # generate tiles
```
@@ -175,17 +175,19 @@ make download area=albania # download albania .osm.pbf file -- can be skipped i
make import-osm # import data into postgres
make import-wikidata # import Wikidata
make import-sql # create / import sql functions
-make generate-bbox-file # compute data bbox -- not needed for the whole planet
+make generate-bbox-file # compute data bbox -- not needed for the whole planet or for downloaded area by `make download`
make generate-tiles-pg # generate tiles
```
Instead of calling `make download area=albania` you can add a .osm.pbf file in the `data` folder `openmaptiles/data/your_area_file.osm.pbf`
+To change the name of the output filename, you can modify the variable `MBTILES_FILE` in the `.env` file or set up the environment variable `MBTILES_FILE` before running `./quickstart.sh` or `make generate-tiles-pg` (e.g., `MBTILES_FILENAME=monaco.mbtiles ./quickstart.sh monaco`).
+
## License
All code in this repository is under the [BSD license](./LICENSE.md). Design and the cartography decisions encoded in the schema and SQL are licensed under [CC-BY](./LICENSE.md).
-Products or services using maps derived from OpenMapTiles schema need to visibly credit "OpenMapTiles.org" or reference "OpenMapTiles" with a link to https://openmaptiles.org/. Exceptions to attribution requirement can be granted on request.
+Products or services using maps derived from OpenMapTiles schema need to **visibly credit "OpenMapTiles.org"** or **reference "OpenMapTiles"** with a link to https://openmaptiles.org/. Exceptions to attribution requirement can be granted on request.
For a browsable electronic map based on OpenMapTiles and OpenStreetMap data, the
credit should appear in the corner of the map. For example:
diff --git a/layers/housenumber/housenumber_display.sql b/layers/housenumber/housenumber_display.sql
index 7b4a46b0..a924c3ba 100644
--- a/layers/housenumber/housenumber_display.sql
+++ b/layers/housenumber/housenumber_display.sql
@@ -15,6 +15,6 @@ RETURNS text AS $$
WHEN raw_housenumber ~ '[^0-9;]' THEN display_housenumber_nonnumeric(raw_housenumber)
ELSE
(SELECT min(value)::text || '–' || max(value)::text
- FROM unnest(string_to_array(raw_housenumber, ';')::int[]) AS value)
+ FROM unnest(array_remove(string_to_array(raw_housenumber, ';'), '')::bigint[]) AS value)
END
$$ LANGUAGE SQL IMMUTABLE;
diff --git a/layers/mountain_peak/style.json b/layers/mountain_peak/style.json
index f47736d8..befc0f0c 100644
--- a/layers/mountain_peak/style.json
+++ b/layers/mountain_peak/style.json
@@ -6,6 +6,15 @@
"source": "openmaptiles",
"source-layer": "mountain_peak",
"maxzoom": 16,
+ "filter": [
+ "all",
+ [
+ "!in",
+ "class",
+ "cliff",
+ "volcano"
+ ]
+ ],
"layout": {
"text-size": 10,
"icon-image": "peak",
@@ -38,15 +47,55 @@
"text-halo-color": "rgba(255, 255, 255, .8)",
"text-halo-width": 1
},
+ "order": 197
+ },
+ {
+ "id": "mountain_peak_volcano",
+ "type": "symbol",
+ "source": "openmaptiles",
+ "source-layer": "mountain_peak",
+ "maxzoom": 16,
"filter": [
"all",
[
- "!=",
+ "==",
"class",
- "cliff"
+ "volcano"
]
],
- "order": 197
+ "layout": {
+ "text-size": 10,
+ "icon-image": "volcano",
+ "text-field": {
+ "stops": [
+ [
+ 6,
+ " "
+ ],
+ [
+ 12,
+ "{name} {ele}m"
+ ]
+ ]
+ },
+ "text-anchor": "top",
+ "text-offset": [
+ 0,
+ 0.5
+ ],
+ "text-max-width": 6,
+ "text-line-height": 1.1,
+ "text-font": [
+ "Noto Sans Regular",
+ "Noto Sans Italic"
+ ]
+ },
+ "paint": {
+ "text-color": "#d40000",
+ "text-halo-color": "rgba(255, 255, 255, .8)",
+ "text-halo-width": 1
+ },
+ "order": 198
}
]
}
\ No newline at end of file
diff --git a/layers/place/style.json b/layers/place/style.json
index c1564dc0..3ee5457d 100644
--- a/layers/place/style.json
+++ b/layers/place/style.json
@@ -129,7 +129,7 @@
"village"
]
],
- "order": 198
+ "order": 199
},
{
"id": "place_town",
@@ -177,7 +177,7 @@
"town"
]
],
- "order": 199
+ "order": 200
},
{
"id": "place_state",
@@ -228,7 +228,7 @@
3
]
],
- "order": 200
+ "order": 201
},
{
"id": "place_city",
@@ -311,7 +311,7 @@
1
]
],
- "order": 201
+ "order": 202
},
{
"id": "place_capital",
@@ -396,7 +396,7 @@
2
]
],
- "order": 202
+ "order": 203
},
{
"id": "country_other",
@@ -449,7 +449,7 @@
"iso_a2"
]
],
- "order": 203
+ "order": 204
},
{
"id": "country_3",
@@ -518,7 +518,7 @@
"iso_a2"
]
],
- "order": 204
+ "order": 205
},
{
"id": "country_2",
@@ -587,7 +587,7 @@
"iso_a2"
]
],
- "order": 205
+ "order": 206
},
{
"id": "country_1",
@@ -656,7 +656,7 @@
"iso_a2"
]
],
- "order": 206
+ "order": 207
}
]
}
\ No newline at end of file
diff --git a/layers/poi/style.json b/layers/poi/style.json
index ad246b5f..546f2089 100644
--- a/layers/poi/style.json
+++ b/layers/poi/style.json
@@ -23,11 +23,29 @@
]
},
"icon-image": [
- "match",
- ["get", "subclass"],
- "chocolate",
- "confectionery",
- ["get", "subclass"]
+ "coalesce",
+ [
+ "image",
+ [
+ "match",
+ ["get", "subclass"],
+ "chocolate",
+ "confectionery",
+ "wine",
+ "alcohol",
+ "kiosk",
+ "newsagent",
+ "perfume",
+ "perfumery",
+ "wholesale",
+ "trade",
+ ["get", "subclass"]
+ ]
+ ],
+ [
+ "image",
+ "shop"
+ ]
],
"text-field": "{name:latin}\n{name:nonlatin}",
"visibility": "visible",
@@ -41,16 +59,7 @@
"icon-allow-overlap": true
},
"paint": {
- "text-color": [
- "match",
- [
- "get",
- "class"
- ],
- "ice_cream",
- "#C77400",
- "#939"
- ],
+ "text-color": "#939",
"icon-opacity": 1,
"icon-halo-blur": 1,
"text-halo-blur": 0.5,
@@ -78,7 +87,9 @@
"subclass",
"mall",
"library",
- "artwork"
+ "artwork",
+ "arts_centre",
+ "gallery"
]
],
"order": 155
@@ -124,16 +135,7 @@
"icon-allow-overlap": true
},
"paint": {
- "text-color": [
- "match",
- [
- "get",
- "class"
- ],
- "ice_cream",
- "#C77400",
- "#939"
- ],
+ "text-color": "#939",
"icon-opacity": 1,
"icon-halo-blur": 1,
"text-halo-blur": 0.5,
@@ -873,7 +875,6 @@
"class",
"cinema",
"library",
- "music",
"museum",
"castle",
"monument",
@@ -883,9 +884,7 @@
"!in",
"subclass",
"books",
- "musical_instrument",
- "art",
- "gallery"
+ "art"
]
],
"order": 168
diff --git a/layers/transportation/mapping.yaml b/layers/transportation/mapping.yaml
index ff1b6b87..a2513bd4 100644
--- a/layers/transportation/mapping.yaml
+++ b/layers/transportation/mapping.yaml
@@ -102,10 +102,6 @@ name_de_field: &name_de
name: name_de
key: name:de
type: string
-short_name_field: &short_name
- key: short_name
- name: short_name
- type: string
tunnel_field: &tunnel
key: tunnel
name: is_tunnel
@@ -236,7 +232,6 @@ tables:
- *name_de
- name: tags
type: hstore_tags
- - *short_name
- *tunnel
- *bridge
- *ramp
@@ -316,7 +311,6 @@ tables:
- *name_de
- name: tags
type: hstore_tags
- - *short_name
- *tunnel
- *bridge
- *ramp
@@ -354,7 +348,6 @@ tables:
- *name_de
- name: tags
type: hstore_tags
- - *short_name
- *tunnel
- *bridge
- *ramp
@@ -393,7 +386,6 @@ tables:
- *name_de
- name: tags
type: hstore_tags
- - *short_name
- *tunnel
- *bridge
- *ramp
@@ -491,6 +483,9 @@ tables:
- name: colour
key: colour
type: string
+ - name: ref_colour
+ key: ref:colour
+ type: string
mapping:
route:
- road
diff --git a/layers/transportation/network_type.sql b/layers/transportation/network_type.sql
index 4e1a694d..e7197a72 100644
--- a/layers/transportation/network_type.sql
+++ b/layers/transportation/network_type.sql
@@ -39,3 +39,15 @@ $$
);
$$ LANGUAGE sql IMMUTABLE
PARALLEL SAFE;
+
+CREATE OR REPLACE FUNCTION create_route_hstore(network TEXT, ref TEXT, name TEXT, colour TEXT, ref_colour TEXT)
+RETURNS hstore AS $$
+SELECT CASE
+ WHEN network = '' THEN hstore('')
+ ELSE hstore(
+ ARRAY['network', 'ref', 'name', 'colour'],
+ ARRAY[network, NULLIF(ref, ''), NULLIF(name, ''), COALESCE(NULLIF(colour, ''), NULLIF(ref_colour, ''))]
+ )
+ END;
+$$ LANGUAGE sql IMMUTABLE
+ PARALLEL SAFE;
diff --git a/layers/transportation/update_route_member.sql b/layers/transportation/update_route_member.sql
index d7e126b4..c369ed8f 100644
--- a/layers/transportation/update_route_member.sql
+++ b/layers/transportation/update_route_member.sql
@@ -90,6 +90,7 @@ CREATE TABLE IF NOT EXISTS transportation_route_member_coalesced
name varchar,
osmc_symbol varchar,
colour varchar,
+ ref_colour varchar,
network_type route_network_type,
concurrency_index integer,
rank integer,
@@ -164,7 +165,8 @@ BEGIN
type,
name,
osmc_symbol,
- colour
+ colour,
+ ref_colour
FROM osm_route_member
WHERE full_update OR EXISTS(
SELECT NULL
@@ -174,7 +176,7 @@ BEGIN
) osm_route_member_filtered
ON CONFLICT (member, network, ref) DO UPDATE SET osm_id = EXCLUDED.osm_id, role = EXCLUDED.role,
type = EXCLUDED.type, name = EXCLUDED.name,
- osmc_symbol = EXCLUDED.osmc_symbol, colour = EXCLUDED.colour,
+ osmc_symbol = EXCLUDED.osmc_symbol, colour = EXCLUDED.colour, ref_colour = EXCLUDED.ref_colour,
concurrency_index = EXCLUDED.concurrency_index,
rank = EXCLUDED.rank;
END;
diff --git a/layers/transportation/update_transportation_merge.sql b/layers/transportation/update_transportation_merge.sql
index f72cca34..44541393 100644
--- a/layers/transportation/update_transportation_merge.sql
+++ b/layers/transportation/update_transportation_merge.sql
@@ -84,12 +84,12 @@ FROM (
CASE WHEN highway IN ('footway', 'steps') THEN layer END AS layer,
CASE WHEN highway IN ('footway', 'steps') THEN level END AS level,
CASE WHEN highway IN ('footway', 'steps') THEN indoor END AS indoor,
- NULLIF(rm1.network, '') || '=' || COALESCE(rm1.ref, '') AS route_1,
- NULLIF(rm2.network, '') || '=' || COALESCE(rm2.ref, '') AS route_2,
- NULLIF(rm3.network, '') || '=' || COALESCE(rm3.ref, '') AS route_3,
- NULLIF(rm4.network, '') || '=' || COALESCE(rm4.ref, '') AS route_4,
- NULLIF(rm5.network, '') || '=' || COALESCE(rm5.ref, '') AS route_5,
- NULLIF(rm6.network, '') || '=' || COALESCE(rm6.ref, '') AS route_6,
+ create_route_hstore(rm1.network, rm1.ref, rm1.name, rm1.colour, rm1.ref_colour) AS route_1,
+ create_route_hstore(rm2.network, rm2.ref, rm2.name, rm2.colour, rm2.ref_colour) AS route_2,
+ create_route_hstore(rm3.network, rm3.ref, rm3.name, rm3.colour, rm3.ref_colour) AS route_3,
+ create_route_hstore(rm4.network, rm4.ref, rm4.name, rm4.colour, rm4.ref_colour) AS route_4,
+ create_route_hstore(rm5.network, rm5.ref, rm5.name, rm5.colour, rm5.ref_colour) AS route_5,
+ create_route_hstore(rm6.network, rm6.ref, rm6.name, rm6.colour, rm6.ref_colour) AS route_6,
hl.z_order,
LEAST(rm1.rank, rm2.rank, rm3.rank, rm4.rank, rm5.rank, rm6.rank) AS route_rank
FROM osm_highway_linestring hl
diff --git a/layers/transportation_name/transportation_name.sql b/layers/transportation_name/transportation_name.sql
index be120dfe..798aa4da 100644
--- a/layers/transportation_name/transportation_name.sql
+++ b/layers/transportation_name/transportation_name.sql
@@ -4,26 +4,44 @@
CREATE OR REPLACE FUNCTION layer_transportation_name(bbox geometry, zoom_level integer)
RETURNS TABLE
(
- geometry geometry,
- name text,
- name_en text,
- name_de text,
- tags hstore,
- ref text,
- ref_length int,
- network text,
- route_1 text,
- route_2 text,
- route_3 text,
- route_4 text,
- route_5 text,
- route_6 text,
- class text,
- subclass text,
- brunnel text,
- layer int,
- level int,
- indoor int
+ geometry geometry,
+ name text,
+ name_en text,
+ name_de text,
+ tags hstore,
+ ref text,
+ ref_length int,
+ network text,
+ route_1_network text,
+ route_1_ref text,
+ route_1_name text,
+ route_1_colour text,
+ route_2_network text,
+ route_2_ref text,
+ route_2_name text,
+ route_2_colour text,
+ route_3_network text,
+ route_3_ref text,
+ route_3_name text,
+ route_3_colour text,
+ route_4_network text,
+ route_4_ref text,
+ route_4_name text,
+ route_4_colour text,
+ route_5_network text,
+ route_5_ref text,
+ route_5_name text,
+ route_5_colour text,
+ route_6_network text,
+ route_6_ref text,
+ route_6_name text,
+ route_6_colour text,
+ class text,
+ subclass text,
+ brunnel text,
+ layer int,
+ level int,
+ indoor int
)
AS
$$
@@ -40,7 +58,35 @@ SELECT geometry,
WHEN length(coalesce(ref, '')) > 0
THEN 'road'
END AS network,
- route_1, route_2, route_3, route_4, route_5, route_6,
+ route_1->'network' AS route_1_network,
+ route_1->'ref' AS route_1_ref,
+ route_1->'name' AS route_1_name,
+ route_1->'colour' AS route_1_colour,
+
+ route_2->'network' AS route_2_network,
+ route_2->'ref' AS route_2_ref,
+ route_2->'name' AS route_2_name,
+ route_2->'colour' AS route_2_colour,
+
+ route_3->'network' AS route_3_network,
+ route_3->'ref' AS route_3_ref,
+ route_3->'name' AS route_3_name,
+ route_3->'colour' AS route_3_colour,
+
+ route_4->'network' AS route_4_network,
+ route_4->'ref' AS route_4_ref,
+ route_4->'name' AS route_4_name,
+ route_4->'colour' AS route_4_colour,
+
+ route_5->'network' AS route_5_network,
+ route_5->'ref' AS route_5_ref,
+ route_5->'name' AS route_5_name,
+ route_5->'colour' AS route_5_colour,
+
+ route_6->'network' AS route_6_network,
+ route_6->'ref' AS route_6_ref,
+ route_6->'name' AS route_6_name,
+ route_6->'colour' AS route_6_colour,
highway_class(highway, '', subclass) AS class,
CASE
WHEN highway IS NOT NULL AND highway_class(highway, '', subclass) = 'path'
@@ -225,12 +271,12 @@ FROM (
'junction'::text AS subclass,
NULL AS brunnel,
NULL AS network,
- NULL::text AS route_1,
- NULL::text AS route_2,
- NULL::text AS route_3,
- NULL::text AS route_4,
- NULL::text AS route_5,
- NULL::text AS route_6,
+ NULL::hstore AS route_1,
+ NULL::hstore AS route_2,
+ NULL::hstore AS route_3,
+ NULL::hstore AS route_4,
+ NULL::hstore AS route_5,
+ NULL::hstore AS route_6,
z_order,
layer,
NULL::int AS level,
diff --git a/layers/transportation_name/transportation_name.yaml b/layers/transportation_name/transportation_name.yaml
index ad664f9e..7c8654a8 100644
--- a/layers/transportation_name/transportation_name.yaml
+++ b/layers/transportation_name/transportation_name.yaml
@@ -101,16 +101,34 @@ layer:
value of [`indoor`](http://wiki.openstreetmap.org/wiki/Key:indoor) tag.
values:
- 1
- route_1: 1st route concurrency.
- route_2: 2nd route concurrency.
- route_3: 3rd route concurrency.
- route_4: 4th route concurrency.
- route_5: 5th route concurrency.
- route_6: 6th route concurrency.
+ route_1_network: 1st route concurrency network.
+ route_1_ref: 1st route concurrency ref.
+ route_1_name: 1st route concurrency name.
+ route_1_colour: 1st route concurrency colour.
+ route_2_network: 2nd route concurrency network.
+ route_2_ref: 2nd route concurrency ref.
+ route_2_name: 2nd route concurrency name.
+ route_2_colour: 2nd route concurrency colour.
+ route_3_network: 3rd route concurrency network.
+ route_3_ref: 3rd route concurrency ref.
+ route_3_name: 3rd route concurrency name.
+ route_3_colour: 3rd route concurrency colour.
+ route_4_network: 4th route concurrency network.
+ route_4_ref: 4th route concurrency ref.
+ route_4_name: 4th route concurrency name.
+ route_4_colour: 4th route concurrency colour.
+ route_5_network: 5th route concurrency network.
+ route_5_ref: 5th route concurrency ref.
+ route_5_name: 5th route concurrency name.
+ route_5_colour: 5th route concurrency colour.
+ route_6_network: 6th route concurrency network.
+ route_6_ref: 6th route concurrency ref.
+ route_6_name: 6th route concurrency name.
+ route_6_colour: 6th route concurrency colour.
datasource:
geometry_field: geometry
srid: 900913
- query: (SELECT geometry, name, name_en, name_de, {name_languages}, ref, ref_length, network::text, class::text, subclass, brunnel, layer, level, indoor, route_1, route_2, route_3, route_4, route_5, route_6 FROM layer_transportation_name(!bbox!, z(!scale_denominator!))) AS t
+ query: (SELECT geometry, name, name_en, name_de, {name_languages}, ref, ref_length, network::text, class::text, subclass, brunnel, layer, level, indoor, route_1_network, route_1_ref, route_1_name, route_1_colour, route_2_network, route_2_ref, route_2_name, route_2_colour, route_3_network, route_3_ref, route_3_name, route_3_colour, route_4_network, route_4_ref, route_4_name, route_4_colour, route_5_network, route_5_ref, route_5_name, route_5_colour, route_6_network, route_6_ref, route_6_name, route_6_colour FROM layer_transportation_name(!bbox!, z(!scale_denominator!))) AS t
schema:
- ./highway_classification.sql
- ./update_transportation_name.sql
diff --git a/layers/transportation_name/update_transportation_name.sql b/layers/transportation_name/update_transportation_name.sql
index 2a6d1eb5..40375266 100644
--- a/layers/transportation_name/update_transportation_name.sql
+++ b/layers/transportation_name/update_transportation_name.sql
@@ -51,12 +51,12 @@ CREATE TABLE IF NOT EXISTS osm_transportation_name_linestring(
layer integer,
indoor boolean,
network route_network_type,
- route_1 text,
- route_2 text,
- route_3 text,
- route_4 text,
- route_5 text,
- route_6 text,
+ route_1 hstore,
+ route_2 hstore,
+ route_3 hstore,
+ route_4 hstore,
+ route_5 hstore,
+ route_6 hstore,
z_order integer,
route_rank integer
);
@@ -170,12 +170,12 @@ FROM (
layer,
NULL AS indoor,
NULL AS network_type,
- NULL AS route_1,
- NULL AS route_2,
- NULL AS route_3,
- NULL AS route_4,
- NULL AS route_5,
- NULL AS route_6,
+ NULL::hstore AS route_1,
+ NULL::hstore AS route_2,
+ NULL::hstore AS route_3,
+ NULL::hstore AS route_4,
+ NULL::hstore AS route_5,
+ NULL::hstore AS route_6,
min(z_order) AS z_order,
NULL::int AS route_rank
FROM (
@@ -228,12 +228,12 @@ FROM (
layer,
NULL AS indoor,
NULL AS network_type,
- NULL AS route_1,
- NULL AS route_2,
- NULL AS route_3,
- NULL AS route_4,
- NULL AS route_5,
- NULL AS route_6,
+ NULL::hstore AS route_1,
+ NULL::hstore AS route_2,
+ NULL::hstore AS route_3,
+ NULL::hstore AS route_4,
+ NULL::hstore AS route_5,
+ NULL::hstore AS route_6,
min(z_order) AS z_order,
NULL::int AS route_rank
FROM (
@@ -276,12 +276,12 @@ CREATE TABLE IF NOT EXISTS osm_transportation_name_linestring_gen1 (
subclass text,
brunnel text,
network route_network_type,
- route_1 text,
- route_2 text,
- route_3 text,
- route_4 text,
- route_5 text,
- route_6 text,
+ route_1 hstore,
+ route_2 hstore,
+ route_3 hstore,
+ route_4 hstore,
+ route_5 hstore,
+ route_6 hstore,
z_order integer
);
@@ -752,13 +752,13 @@ BEGIN
CASE WHEN highway IN ('footway', 'steps') THEN layer END AS layer,
CASE WHEN highway IN ('footway', 'steps') THEN level END AS level,
CASE WHEN highway IN ('footway', 'steps') THEN indoor END AS indoor,
- NULLIF(rm1.network, '') || '=' || COALESCE(rm1.ref, '') AS route_1,
- NULLIF(rm2.network, '') || '=' || COALESCE(rm2.ref, '') AS route_2,
- NULLIF(rm3.network, '') || '=' || COALESCE(rm3.ref, '') AS route_3,
- NULLIF(rm4.network, '') || '=' || COALESCE(rm4.ref, '') AS route_4,
- NULLIF(rm5.network, '') || '=' || COALESCE(rm5.ref, '') AS route_5,
- NULLIF(rm6.network, '') || '=' || COALESCE(rm6.ref, '') AS route_6,
- hl.z_order,
+ create_route_hstore(rm1.network, rm1.ref, rm1.name, rm1.colour, rm1.ref_colour) AS route_1,
+ create_route_hstore(rm2.network, rm2.ref, rm2.name, rm2.colour, rm2.ref_colour) AS route_2,
+ create_route_hstore(rm3.network, rm3.ref, rm3.name, rm3.colour, rm3.ref_colour) AS route_3,
+ create_route_hstore(rm4.network, rm4.ref, rm4.name, rm4.colour, rm4.ref_colour) AS route_4,
+ create_route_hstore(rm5.network, rm5.ref, rm5.name, rm5.colour, rm5.ref_colour) AS route_5,
+ create_route_hstore(rm6.network, rm6.ref, rm6.name, rm6.colour, rm6.ref_colour) AS route_6,
+ hl.z_order,
LEAST(rm1.rank, rm2.rank, rm3.rank, rm4.rank, rm5.rank, rm6.rank) AS route_rank
FROM osm_highway_linestring hl
JOIN transportation_name.network_changes AS c ON
diff --git a/quickstart.sh b/quickstart.sh
index d82b4470..41585cd0 100755
--- a/quickstart.sh
+++ b/quickstart.sh
@@ -163,12 +163,7 @@ else
echo " "
fi
-# override the output filename based on the area if the default `tiles.mbtiles` is found
-if [[ "$(source .env ; echo "$MBTILES_FILE")" = "tiles.mbtiles" ]]; then
- MBTILES_FILENAME=${area}.mbtiles
-else
- MBTILES_FILENAME=$(source .env ; echo "$MBTILES_FILE")
-fi
+MBTILES_FILE=${MBTILES_FILE:-$(source .env ; echo "$MBTILES_FILE")}
echo " "
echo "-------------------------------------------------------------------------------------"
@@ -187,8 +182,8 @@ make init-dirs
echo " "
echo "-------------------------------------------------------------------------------------"
-echo "====> : Removing old MBTILES if exists ( ./data/$MBTILES_FILENAME ) "
-rm -f "./data/$MBTILES_FILENAME"
+echo "====> : Removing old MBTILES if exists ( ./data/$MBTILES_FILE ) "
+rm -f "./data/$MBTILES_FILE"
echo " "
echo "-------------------------------------------------------------------------------------"
@@ -299,9 +294,9 @@ fi
echo " "
echo "-------------------------------------------------------------------------------------"
echo "====> : Start generating MBTiles (containing gzipped MVT PBF) using PostGIS. "
-echo " : Output MBTiles: $MBTILES_FILENAME "
+echo " : Output MBTiles: $MBTILES_FILE "
echo " : Source code: https://github.com/openmaptiles/openmaptiles-tools/blob/master/bin/generate-tiles "
-MBTILES_FILE=$MBTILES_FILENAME make generate-tiles-pg
+make generate-tiles-pg
echo " "
echo "-------------------------------------------------------------------------------------"
@@ -332,7 +327,7 @@ docker images | grep openmaptiles
echo " "
echo "-------------------------------------------------------------------------------------"
-echo "====> : (disk space) We have created the new vectortiles ( ./data/$MBTILES_FILENAME ) "
+echo "====> : (disk space) We have created the new vectortiles ( ./data/$MBTILES_FILE ) "
echo " : Please respect the licenses (OdBL for OSM data) of the sources when distributing the MBTiles file."
echo " : Data directory content:"
ls -la ./data
@@ -356,8 +351,11 @@ echo " Acknowledgments "
echo " Generated vector tiles are produced work of OpenStreetMap data. "
echo " Such tiles are reusable under CC-BY license granted by OpenMapTiles team: "
echo " https://github.com/openmaptiles/openmaptiles/#license "
-echo " Maps made with these vector tiles must display a visible credit: "
+echo "-------------------------------------------------------------------------------------"
+echo " "
+echo -e "\033[1m Maps made with these vector tiles must display a visible credit:\033[0m "
echo " © OpenMapTiles © OpenStreetMap contributors "
echo " "
+echo "-------------------------------------------------------------------------------------"
echo " Thanks to all free, open source software developers and Open Data Contributors! "
echo "-------------------------------------------------------------------------------------"
diff --git a/style/icons/chocolate.svg b/style/icons/chocolate.svg
deleted file mode 100644
index ab55f153..00000000
--- a/style/icons/chocolate.svg
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
diff --git a/style/icons/gallery.svg b/style/icons/gallery.svg
new file mode 100644
index 00000000..ef93c527
--- /dev/null
+++ b/style/icons/gallery.svg
@@ -0,0 +1,10 @@
+
diff --git a/style/icons/frozen_food.svg b/style/icons/shop.svg
similarity index 100%
rename from style/icons/frozen_food.svg
rename to style/icons/shop.svg
diff --git a/style/icons/tattoo.svg b/style/icons/tattoo.svg
deleted file mode 100644
index d29e518e..00000000
--- a/style/icons/tattoo.svg
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
diff --git a/style/icons/volcano.svg b/style/icons/volcano.svg
new file mode 100644
index 00000000..ca1a7212
--- /dev/null
+++ b/style/icons/volcano.svg
@@ -0,0 +1,3 @@
+
diff --git a/style/icons/watches.svg b/style/icons/watches.svg
deleted file mode 100644
index df654b43..00000000
--- a/style/icons/watches.svg
+++ /dev/null
@@ -1,59 +0,0 @@
-
-