Porównaj commity
20 Commity
de3e1c9d64
...
786e66fa52
Autor | SHA1 | Data |
---|---|---|
Brian Sperlongano | 786e66fa52 | |
Tomas Pohanka | eae7d7e1ed | |
Tomas Pohanka | 382b12ae8a | |
Tomas Pohanka | 59692656bd | |
Tomas Pohanka | ee19519905 | |
Tomas Pohanka | 8266197149 | |
zstadler | 3f0ba7ceba | |
Adam Laža | c2ae2503c8 | |
Tomas Pohanka | d709a51de6 | |
Brian Sperlongano | af6dc684ef | |
Adam Laža | 136e1db4d1 | |
Tomas Pohanka | 585b71f666 | |
Brian Sperlongano | d6fd5ef7cb | |
Andrea Mennillo | 9f891b625a | |
Tomas Pohanka | 5b00c496ef | |
Adam Laža | a65495f264 | |
Andrea Mennillo | 2f170fbbd8 | |
Tomas Pohanka | de2fa04c37 | |
Brian Sperlongano | 79d7ecafdd | |
Brian Sperlongano | 7a35d4ee42 |
12
.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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
8
Makefile
|
@ -289,20 +289,20 @@ 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.3.4 \
|
||||
--function --fname=getmvt >> ./build/sql/run_last.sql'
|
||||
endif
|
||||
|
||||
.PHONY: build-sprite
|
||||
build-sprite: init-dirs
|
||||
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools bash -c 'spritezero build/style/sprite /style/icons && \
|
||||
spritezero --retina build/style/sprite@2x /style/icons'
|
||||
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools bash -c 'spreet /style/icons build/style/sprite && \
|
||||
spreet --retina /style/icons build/style/sprite@2x'
|
||||
|
||||
.PHONY: build-style
|
||||
build-style: init-dirs
|
||||
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools bash -c 'style-tools recompose $(TILESET_FILE) $(STYLE_FILE) \
|
||||
$(STYLE_HEADER_FILE) && \
|
||||
spritezero build/style/sprite /style/icons && spritezero --retina build/style/sprite@2x /style/icons'
|
||||
spreet /style/icons build/style/sprite && spreet --retina /style/icons build/style/sprite@2x'
|
||||
|
||||
.PHONY: download-fonts
|
||||
download-fonts:
|
||||
|
|
|
@ -187,7 +187,7 @@ To change the name of the output filename, you can modify the variable `MBTILES_
|
|||
|
||||
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:
|
||||
|
|
|
@ -150,38 +150,10 @@ CREATE MATERIALIZED VIEW osm_border_linestring_gen_z4 AS
|
|||
(
|
||||
SELECT ST_Simplify(geometry, ZRes(5)) AS geometry, adm0_l, adm0_r, admin_level, disputed, name, claimed_by, maritime
|
||||
FROM osm_border_linestring_gen_z5
|
||||
WHERE admin_level = 2 AND (maritime OR disputed)
|
||||
WHERE admin_level = 2 AND maritime
|
||||
) /* DELAY_MATERIALIZED_VIEW_CREATION */ ;
|
||||
CREATE INDEX IF NOT EXISTS osm_border_linestring_gen_z4_idx ON osm_border_linestring_gen_z4 USING gist (geometry);
|
||||
|
||||
-- etldoc: osm_border_linestring_gen_z4 -> osm_border_disp_linestring_gen_z3
|
||||
DROP MATERIALIZED VIEW IF EXISTS osm_border_disp_linestring_gen_z3 CASCADE;
|
||||
CREATE MATERIALIZED VIEW osm_border_disp_linestring_gen_z3 AS
|
||||
(
|
||||
SELECT ST_Simplify(geometry, ZRes(4)) AS geometry, adm0_l, adm0_r, admin_level, TRUE AS disputed, name, claimed_by, maritime
|
||||
FROM osm_border_linestring_gen_z4
|
||||
WHERE disputed -- AND admin_level = 2
|
||||
) /* DELAY_MATERIALIZED_VIEW_CREATION */ ;
|
||||
CREATE INDEX IF NOT EXISTS osm_border_disp_linestring_gen_z3_idx ON osm_border_disp_linestring_gen_z3 USING gist (geometry);
|
||||
|
||||
-- etldoc: osm_border_disp_linestring_gen_z3 -> osm_border_disp_linestring_gen_z2
|
||||
DROP MATERIALIZED VIEW IF EXISTS osm_border_disp_linestring_gen_z2 CASCADE;
|
||||
CREATE MATERIALIZED VIEW osm_border_disp_linestring_gen_z2 AS
|
||||
(
|
||||
SELECT ST_Simplify(geometry, ZRes(3)) AS geometry, adm0_l, adm0_r, admin_level, TRUE AS disputed, name, claimed_by, maritime
|
||||
FROM osm_border_disp_linestring_gen_z3
|
||||
) /* DELAY_MATERIALIZED_VIEW_CREATION */ ;
|
||||
CREATE INDEX IF NOT EXISTS osm_border_disp_linestring_gen_z2_idx ON osm_border_disp_linestring_gen_z2 USING gist (geometry);
|
||||
|
||||
-- etldoc: osm_border_disp_linestring_gen_z2 -> osm_border_disp_linestring_gen_z1
|
||||
DROP MATERIALIZED VIEW IF EXISTS osm_border_disp_linestring_gen_z1 CASCADE;
|
||||
CREATE MATERIALIZED VIEW osm_border_disp_linestring_gen_z1 AS
|
||||
(
|
||||
SELECT ST_Simplify(geometry, ZRes(2)) AS geometry, adm0_l, adm0_r, admin_level, TRUE AS disputed, name, claimed_by, maritime
|
||||
FROM osm_border_disp_linestring_gen_z2
|
||||
) /* DELAY_MATERIALIZED_VIEW_CREATION */ ;
|
||||
CREATE INDEX IF NOT EXISTS osm_border_disp_linestring_gen_z1_idx ON osm_border_disp_linestring_gen_z1 USING gist (geometry);
|
||||
|
||||
-- ne_10m_admin_0_boundary_lines_land
|
||||
-- etldoc: ne_10m_admin_0_boundary_lines_land -> ne_10m_admin_0_boundary_lines_land_gen_z4
|
||||
DROP MATERIALIZED VIEW IF EXISTS ne_10m_admin_0_boundary_lines_land_gen_z4 CASCADE;
|
||||
|
@ -190,7 +162,7 @@ CREATE MATERIALIZED VIEW ne_10m_admin_0_boundary_lines_land_gen_z4 AS
|
|||
SELECT ST_Simplify(geometry, ZRes(6)) as geometry,
|
||||
2 AS admin_level,
|
||||
(CASE WHEN featurecla LIKE 'Disputed%' THEN TRUE ELSE FALSE END) AS disputed,
|
||||
(CASE WHEN featurecla LIKE 'Disputed%' THEN 'ne10m_' || ogc_fid ELSE NULL::text END) AS disputed_name,
|
||||
NULL::text AS disputed_name,
|
||||
NULL::text AS claimed_by,
|
||||
FALSE AS maritime
|
||||
FROM ne_10m_admin_0_boundary_lines_land
|
||||
|
@ -198,6 +170,21 @@ WHERE featurecla <> 'Lease limit'
|
|||
) /* DELAY_MATERIALIZED_VIEW_CREATION */ ;
|
||||
CREATE INDEX IF NOT EXISTS ne_10m_admin_0_boundary_lines_land_gen_z4_idx ON ne_10m_admin_0_boundary_lines_land_gen_z4 USING gist (geometry);
|
||||
|
||||
-- etldoc: ne_10m_admin_0_boundary_lines_land -> ne_10m_admin_0_boundary_lines_land_disputed
|
||||
DROP MATERIALIZED VIEW IF EXISTS ne_10m_admin_0_boundary_lines_land_disputed CASCADE;
|
||||
CREATE MATERIALIZED VIEW ne_10m_admin_0_boundary_lines_land_disputed AS
|
||||
(
|
||||
SELECT geometry,
|
||||
2 AS admin_level,
|
||||
(CASE WHEN featurecla LIKE 'Disputed%' THEN TRUE ELSE FALSE END) AS disputed,
|
||||
NULL::text AS disputed_name,
|
||||
NULL::text AS claimed_by,
|
||||
FALSE AS maritime
|
||||
FROM ne_10m_admin_0_boundary_lines_land
|
||||
WHERE featurecla LIKE 'Disputed%' AND adm0_left = 'South Sudan' AND adm0_right = 'Kenya'
|
||||
) /* DELAY_MATERIALIZED_VIEW_CREATION */ ;
|
||||
CREATE INDEX IF NOT EXISTS ne_10m_admin_0_boundary_lines_land_disputed_idx ON ne_10m_admin_0_boundary_lines_land_disputed USING gist (geometry);
|
||||
|
||||
-- ne_10m_admin_1_states_provinces_lines
|
||||
-- etldoc: ne_10m_admin_1_states_provinces_lines -> ne_10m_admin_1_states_provinces_lines_gen_z4
|
||||
DROP MATERIALIZED VIEW IF EXISTS ne_10m_admin_1_states_provinces_lines_gen_z4 CASCADE;
|
||||
|
@ -267,7 +254,7 @@ CREATE MATERIALIZED VIEW ne_50m_admin_0_boundary_lines_land_gen_z3 AS
|
|||
SELECT ST_Simplify(geometry, ZRes(5)) as geometry,
|
||||
2 AS admin_level,
|
||||
(CASE WHEN featurecla LIKE 'Disputed%' THEN TRUE ELSE FALSE END) AS disputed,
|
||||
(CASE WHEN featurecla LIKE 'Disputed%' THEN 'ne50m_' || ogc_fid ELSE NULL::text END) AS disputed_name,
|
||||
NULL::text AS disputed_name,
|
||||
NULL::text AS claimed_by,
|
||||
FALSE AS maritime
|
||||
FROM ne_50m_admin_0_boundary_lines_land
|
||||
|
@ -310,7 +297,7 @@ CREATE MATERIALIZED VIEW ne_110m_admin_0_boundary_lines_land_gen_z0 AS
|
|||
SELECT ST_Simplify(geometry, ZRes(2)) as geometry,
|
||||
2 AS admin_level,
|
||||
(CASE WHEN featurecla LIKE 'Disputed%' THEN TRUE ELSE FALSE END) AS disputed,
|
||||
(CASE WHEN featurecla LIKE 'Disputed%' THEN 'ne110m_' || ogc_fid ELSE NULL::text END) AS disputed_name,
|
||||
NULL::text AS disputed_name,
|
||||
NULL::text AS claimed_by,
|
||||
FALSE AS maritime
|
||||
FROM ne_110m_admin_0_boundary_lines_land
|
||||
|
@ -347,6 +334,7 @@ FROM ne_110m_admin_0_boundary_lines_land_gen_z0
|
|||
|
||||
-- etldoc: ne_50m_admin_0_boundary_lines_land_gen_z1 -> boundary_z1
|
||||
-- etldoc: ne_10m_admin_1_states_provinces_lines_gen_z1 -> boundary_z1
|
||||
-- etldoc: ne_10m_admin_0_boundary_lines_land_disputed -> boundary_z1
|
||||
-- etldoc: osm_border_disp_linestring_gen_z1 -> boundary_z1
|
||||
DROP MATERIALIZED VIEW IF EXISTS boundary_z1 CASCADE;
|
||||
CREATE MATERIALIZED VIEW boundary_z1 AS
|
||||
|
@ -375,17 +363,18 @@ SELECT geometry,
|
|||
admin_level,
|
||||
NULL::text AS adm0_l,
|
||||
NULL::text AS adm0_r,
|
||||
TRUE AS disputed,
|
||||
edit_name(name) AS disputed_name,
|
||||
disputed,
|
||||
disputed_name,
|
||||
claimed_by,
|
||||
maritime
|
||||
FROM osm_border_disp_linestring_gen_z1
|
||||
FROM ne_10m_admin_0_boundary_lines_land_disputed
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS boundary_z1_idx ON boundary_z1 USING gist (geometry);
|
||||
|
||||
|
||||
-- etldoc: ne_50m_admin_0_boundary_lines_land_gen_z2 -> boundary_z2
|
||||
-- etldoc: ne_10m_admin_1_states_provinces_lines_gen_z2 -> boundary_z2
|
||||
-- etldoc: ne_10m_admin_0_boundary_lines_land_disputed -> boundary_z2
|
||||
-- etldoc: osm_border_disp_linestring_gen_z2 -> boundary_z2
|
||||
DROP MATERIALIZED VIEW IF EXISTS boundary_z2 CASCADE;
|
||||
CREATE MATERIALIZED VIEW boundary_z2 AS
|
||||
|
@ -414,16 +403,17 @@ SELECT geometry,
|
|||
admin_level,
|
||||
NULL::text AS adm0_l,
|
||||
NULL::text AS adm0_r,
|
||||
TRUE AS disputed,
|
||||
edit_name(name) AS disputed_name,
|
||||
disputed,
|
||||
disputed_name,
|
||||
claimed_by,
|
||||
maritime
|
||||
FROM osm_border_disp_linestring_gen_z2
|
||||
FROM ne_10m_admin_0_boundary_lines_land_disputed
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS boundary_z2_idx ON boundary_z2 USING gist (geometry);
|
||||
|
||||
-- etldoc: ne_50m_admin_0_boundary_lines_land_gen_z3 -> boundary_z3
|
||||
-- etldoc: ne_10m_admin_1_states_provinces_lines_gen_z3 -> boundary_z3
|
||||
-- etldoc: ne_10m_admin_0_boundary_lines_land_disputed -> boundary_z3
|
||||
-- etldoc: osm_border_disp_linestring_gen_z3 -> boundary_z3
|
||||
DROP MATERIALIZED VIEW IF EXISTS boundary_z3 CASCADE;
|
||||
CREATE MATERIALIZED VIEW boundary_z3 AS
|
||||
|
@ -452,11 +442,11 @@ SELECT geometry,
|
|||
admin_level,
|
||||
NULL::text AS adm0_l,
|
||||
NULL::text AS adm0_r,
|
||||
TRUE AS disputed,
|
||||
edit_name(name) AS disputed_name,
|
||||
disputed,
|
||||
disputed_name,
|
||||
claimed_by,
|
||||
maritime
|
||||
FROM osm_border_disp_linestring_gen_z3
|
||||
FROM ne_10m_admin_0_boundary_lines_land_disputed
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS boundary_z3_idx ON boundary_z3 USING gist (geometry);
|
||||
|
||||
|
|
Przed Szerokość: | Wysokość: | Rozmiar: 910 KiB Po Szerokość: | Wysokość: | Rozmiar: 750 KiB |
|
@ -47,43 +47,43 @@ $$
|
|||
BEGIN
|
||||
UPDATE osm_boundary_polygon
|
||||
SET tags = update_tags(tags, geometry),
|
||||
geometry_point = st_centroid(geometry);
|
||||
geometry_point = ST_PointOnSurface(geometry);
|
||||
|
||||
UPDATE osm_boundary_polygon_gen_z13
|
||||
SET tags = update_tags(tags, geometry),
|
||||
geometry_point = st_centroid(geometry);
|
||||
geometry_point = ST_PointOnSurface(geometry);
|
||||
|
||||
UPDATE osm_boundary_polygon_gen_z12
|
||||
SET tags = update_tags(tags, geometry),
|
||||
geometry_point = st_centroid(geometry);
|
||||
geometry_point = ST_PointOnSurface(geometry);
|
||||
|
||||
UPDATE osm_boundary_polygon_gen_z11
|
||||
SET tags = update_tags(tags, geometry),
|
||||
geometry_point = st_centroid(geometry);
|
||||
geometry_point = ST_PointOnSurface(geometry);
|
||||
|
||||
UPDATE osm_boundary_polygon_gen_z10
|
||||
SET tags = update_tags(tags, geometry),
|
||||
geometry_point = st_centroid(geometry);
|
||||
geometry_point = ST_PointOnSurface(geometry);
|
||||
|
||||
UPDATE osm_boundary_polygon_gen_z9
|
||||
SET tags = update_tags(tags, geometry),
|
||||
geometry_point = st_centroid(geometry);
|
||||
geometry_point = ST_PointOnSurface(geometry);
|
||||
|
||||
UPDATE osm_boundary_polygon_gen_z8
|
||||
SET tags = update_tags(tags, geometry),
|
||||
geometry_point = st_centroid(geometry);
|
||||
geometry_point = ST_PointOnSurface(geometry);
|
||||
|
||||
UPDATE osm_boundary_polygon_gen_z7
|
||||
SET tags = update_tags(tags, geometry),
|
||||
geometry_point = st_centroid(geometry);
|
||||
geometry_point = ST_PointOnSurface(geometry);
|
||||
|
||||
UPDATE osm_boundary_polygon_gen_z6
|
||||
SET tags = update_tags(tags, geometry),
|
||||
geometry_point = st_centroid(geometry);
|
||||
geometry_point = ST_PointOnSurface(geometry);
|
||||
|
||||
UPDATE osm_boundary_polygon_gen_z5
|
||||
SET tags = update_tags(tags, geometry),
|
||||
geometry_point = st_centroid(geometry);
|
||||
geometry_point = ST_PointOnSurface(geometry);
|
||||
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
|
@ -142,7 +142,7 @@ AS
|
|||
$$
|
||||
BEGIN
|
||||
NEW.tags = update_tags(NEW.tags, NEW.geometry);
|
||||
NEW.geometry_point = st_centroid(NEW.geometry);
|
||||
NEW.geometry_point = ST_PointOnSurface(NEW.geometry);
|
||||
RETURN NEW;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
|
|
|
@ -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(array_remove(string_to_array(raw_housenumber, ';'), '')::int[]) AS value)
|
||||
FROM unnest(array_remove(string_to_array(raw_housenumber, ';'), '')::bigint[]) AS value)
|
||||
END
|
||||
$$ LANGUAGE SQL IMMUTABLE;
|
||||
|
|
|
@ -10,7 +10,7 @@ layer:
|
|||
fields:
|
||||
name: The OSM [`name`](http://wiki.openstreetmap.org/wiki/Key:name) value of the peak. 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`.
|
||||
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`.
|
||||
class:
|
||||
description: |
|
||||
Use the **class** to differentiate between natural objects.
|
||||
|
|
|
@ -67,43 +67,43 @@ $$
|
|||
BEGIN
|
||||
UPDATE osm_park_polygon
|
||||
SET tags = update_tags(tags, geometry),
|
||||
geometry_point = st_centroid(geometry);
|
||||
geometry_point = ST_PointOnSurface(geometry);
|
||||
|
||||
UPDATE osm_park_polygon_gen_z13
|
||||
SET tags = update_tags(tags, geometry),
|
||||
geometry_point = st_centroid(geometry);
|
||||
geometry_point = ST_PointOnSurface(geometry);
|
||||
|
||||
UPDATE osm_park_polygon_gen_z12
|
||||
SET tags = update_tags(tags, geometry),
|
||||
geometry_point = st_centroid(geometry);
|
||||
geometry_point = ST_PointOnSurface(geometry);
|
||||
|
||||
UPDATE osm_park_polygon_gen_z11
|
||||
SET tags = update_tags(tags, geometry),
|
||||
geometry_point = st_centroid(geometry);
|
||||
geometry_point = ST_PointOnSurface(geometry);
|
||||
|
||||
UPDATE osm_park_polygon_gen_z10
|
||||
SET tags = update_tags(tags, geometry),
|
||||
geometry_point = st_centroid(geometry);
|
||||
geometry_point = ST_PointOnSurface(geometry);
|
||||
|
||||
UPDATE osm_park_polygon_gen_z9
|
||||
SET tags = update_tags(tags, geometry),
|
||||
geometry_point = st_centroid(geometry);
|
||||
geometry_point = ST_PointOnSurface(geometry);
|
||||
|
||||
UPDATE osm_park_polygon_gen_z8
|
||||
SET tags = update_tags(tags, geometry),
|
||||
geometry_point = st_centroid(geometry);
|
||||
geometry_point = ST_PointOnSurface(geometry);
|
||||
|
||||
UPDATE osm_park_polygon_gen_z7
|
||||
SET tags = update_tags(tags, geometry),
|
||||
geometry_point = st_centroid(geometry);
|
||||
geometry_point = ST_PointOnSurface(geometry);
|
||||
|
||||
UPDATE osm_park_polygon_gen_z6
|
||||
SET tags = update_tags(tags, geometry),
|
||||
geometry_point = st_centroid(geometry);
|
||||
geometry_point = ST_PointOnSurface(geometry);
|
||||
|
||||
UPDATE osm_park_polygon_gen_z5
|
||||
SET tags = update_tags(tags, geometry),
|
||||
geometry_point = st_centroid(geometry);
|
||||
geometry_point = ST_PointOnSurface(geometry);
|
||||
|
||||
REFRESH MATERIALIZED VIEW CONCURRENTLY osm_park_polygon_dissolve_z4;
|
||||
END;
|
||||
|
@ -165,7 +165,7 @@ AS
|
|||
$$
|
||||
BEGIN
|
||||
NEW.tags = update_tags(NEW.tags, NEW.geometry);
|
||||
NEW.geometry_point = st_centroid(NEW.geometry);
|
||||
NEW.geometry_point = ST_PointOnSurface(NEW.geometry);
|
||||
RETURN NEW;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
|
|
Przed Szerokość: | Wysokość: | Rozmiar: 152 KiB Po Szerokość: | Wysokość: | Rozmiar: 152 KiB |
|
@ -1,4 +1,3 @@
|
|||
|
||||
# imposm3 mapping file for https://github.com/osm2vectortiles/imposm3
|
||||
# Warning: this is not the official imposm3
|
||||
|
||||
|
@ -76,6 +75,15 @@ def_poi_mapping_barrier: &poi_mapping_barrier
|
|||
- stile
|
||||
- toll_booth
|
||||
|
||||
# cuisine values , see http://taginfo.openstreetmap.org/keys/cuisine#values
|
||||
def_poi_mapping_cuisine: &poi_mapping_cuisine
|
||||
- burger
|
||||
- coffee_shop
|
||||
- donut;coffee_shop
|
||||
- ice_cream
|
||||
- pizza
|
||||
- pizza;italian
|
||||
|
||||
# building values , see http://taginfo.openstreetmap.org/keys/building#values
|
||||
def_poi_mapping_building: &poi_mapping_building
|
||||
- dormitory
|
||||
|
@ -444,11 +452,15 @@ def_poi_fields: &poi_fields
|
|||
- name: brand
|
||||
key: brand
|
||||
type: string
|
||||
- name: cuisine
|
||||
key: cuisine
|
||||
type: string
|
||||
|
||||
def_poi_mapping: &poi_mapping
|
||||
aerialway: *poi_mapping_aerialway
|
||||
amenity: *poi_mapping_amenity
|
||||
barrier: *poi_mapping_barrier
|
||||
cuisine: *poi_mapping_cuisine
|
||||
building: *poi_mapping_building
|
||||
highway: *poi_mapping_highway
|
||||
historic: *poi_mapping_historic
|
||||
|
|
|
@ -32,6 +32,8 @@ SELECT osm_id_hash AS osm_id,
|
|||
THEN NULLIF(information, '')
|
||||
WHEN subclass = 'place_of_worship'
|
||||
THEN NULLIF(religion, '')
|
||||
WHEN subclass IN ('fast_food', 'restaurant')
|
||||
THEN NULLIF(cuisine, '')
|
||||
WHEN subclass = 'pitch'
|
||||
THEN NULLIF(sport, '')
|
||||
ELSE subclass
|
||||
|
|
|
@ -113,6 +113,7 @@ layer:
|
|||
Original value of either the
|
||||
[`amenity`](http://wiki.openstreetmap.org/wiki/Key:amenity),
|
||||
[`barrier`](http://wiki.openstreetmap.org/wiki/Key:barrier),
|
||||
[`cuisine`](http://wiki.openstreetmap.org/wiki/Key:cuisine),
|
||||
[`historic`](http://wiki.openstreetmap.org/wiki/Key:historic),
|
||||
[`information`](http://wiki.openstreetmap.org/wiki/Key:information),
|
||||
[`landuse`](http://wiki.openstreetmap.org/wiki/Key:landuse),
|
||||
|
|
|
@ -23,11 +23,35 @@
|
|||
]
|
||||
},
|
||||
"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 +65,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 +93,9 @@
|
|||
"subclass",
|
||||
"mall",
|
||||
"library",
|
||||
"artwork"
|
||||
"artwork",
|
||||
"arts_centre",
|
||||
"gallery"
|
||||
]
|
||||
],
|
||||
"order": 155
|
||||
|
@ -107,10 +124,16 @@
|
|||
},
|
||||
"icon-image": [
|
||||
"match",
|
||||
["get", "subclass"],
|
||||
[
|
||||
"get",
|
||||
"subclass"
|
||||
],
|
||||
"chocolate",
|
||||
"confectionery",
|
||||
["get", "subclass"]
|
||||
[
|
||||
"get",
|
||||
"subclass"
|
||||
]
|
||||
],
|
||||
"text-field": "{name:latin}\n{name:nonlatin}",
|
||||
"visibility": "visible",
|
||||
|
@ -124,16 +147,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 +887,6 @@
|
|||
"class",
|
||||
"cinema",
|
||||
"library",
|
||||
"music",
|
||||
"museum",
|
||||
"castle",
|
||||
"monument",
|
||||
|
@ -883,9 +896,7 @@
|
|||
"!in",
|
||||
"subclass",
|
||||
"books",
|
||||
"musical_instrument",
|
||||
"art",
|
||||
"gallery"
|
||||
"art"
|
||||
]
|
||||
],
|
||||
"order": 168
|
||||
|
|
Przed Szerokość: | Wysokość: | Rozmiar: 772 KiB Po Szerokość: | Wysokość: | Rozmiar: 865 KiB |
|
@ -31,7 +31,11 @@ $$
|
|||
-- Canada
|
||||
'ca-transcanada', 'ca-provincial-arterial',
|
||||
-- United States
|
||||
'us-interstate',
|
||||
'us-interstate', 'us-highway',
|
||||
-- UK
|
||||
'gb-motorway', 'gb-trunk',
|
||||
-- Ireland
|
||||
'ie-motorway', 'ie-national',
|
||||
-- Europe
|
||||
'e-road',
|
||||
-- Asia
|
||||
|
|
|
@ -4529,9 +4529,7 @@
|
|||
"all",
|
||||
[
|
||||
"==",
|
||||
[
|
||||
"geometry-type"
|
||||
],
|
||||
"$type",
|
||||
"LineString"
|
||||
],
|
||||
[
|
||||
|
@ -4633,9 +4631,7 @@
|
|||
"all",
|
||||
[
|
||||
"==",
|
||||
[
|
||||
"geometry-type"
|
||||
],
|
||||
"$type",
|
||||
"LineString"
|
||||
],
|
||||
[
|
||||
|
@ -7834,4 +7830,4 @@
|
|||
"order": 183
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,10 +48,6 @@ WHERE length(ref) > 1
|
|||
CREATE OR REPLACE FUNCTION osm_route_member_network_type(network text, ref text) RETURNS route_network_type AS
|
||||
$$
|
||||
SELECT CASE
|
||||
-- https://wiki.openstreetmap.org/wiki/WikiProject_Europe/E-road_network
|
||||
WHEN network = 'e-road' THEN 'e-road'::route_network_type
|
||||
-- https://wiki.openstreetmap.org/wiki/Asia/Asian_Highway_Network
|
||||
WHEN network = 'AsianHighway' THEN 'a-road'::route_network_type
|
||||
-- https://wiki.openstreetmap.org/wiki/United_States_roads_tagging
|
||||
WHEN network = 'US:I' THEN 'us-interstate'::route_network_type
|
||||
WHEN network = 'US:US' THEN 'us-highway'::route_network_type
|
||||
|
@ -110,35 +106,6 @@ BEGIN
|
|||
USING transportation_name.network_changes c
|
||||
WHERE c.is_old IS TRUE AND transportation_route_member_coalesced.member = c.osm_id;
|
||||
|
||||
-- Create GBR/IRE relations (so we can use it in the same way as other relations)
|
||||
-- etldoc: gbr_route_members_view -> transportation_route_member_coalesced
|
||||
INSERT INTO transportation_route_member_coalesced (member, network, ref, network_type, concurrency_index, osm_id)
|
||||
SELECT member, network, coalesce(ref, '') AS ref,
|
||||
osm_route_member_network_type(network, coalesce(ref, '')) AS network_type,
|
||||
1 AS concurrency_index, 0 AS osm_id
|
||||
FROM gbr_route_members_view
|
||||
WHERE full_update OR EXISTS(
|
||||
SELECT NULL
|
||||
FROM transportation_name.network_changes c
|
||||
WHERE c.is_old IS FALSE AND c.osm_id = gbr_route_members_view.member
|
||||
)
|
||||
GROUP BY member, network, coalesce(ref, '')
|
||||
ON CONFLICT (member, network, ref) DO NOTHING;
|
||||
|
||||
-- etldoc: ire_route_members_view -> transportation_route_member_coalesced
|
||||
INSERT INTO transportation_route_member_coalesced (member, network, ref, network_type, concurrency_index, osm_id)
|
||||
SELECT member, network, coalesce(ref, '') AS ref,
|
||||
osm_route_member_network_type(network, coalesce(ref, '')) AS network_type,
|
||||
1 AS concurrency_index, 0 AS osm_id
|
||||
FROM ire_route_members_view
|
||||
WHERE full_update OR EXISTS(
|
||||
SELECT NULL
|
||||
FROM transportation_name.network_changes c
|
||||
WHERE c.is_old IS FALSE AND c.osm_id = ire_route_members_view.member
|
||||
)
|
||||
GROUP BY member, network, coalesce(ref, '')
|
||||
ON CONFLICT (member, network, ref) DO NOTHING;
|
||||
|
||||
-- etldoc: osm_route_member -> transportation_route_member_coalesced
|
||||
INSERT INTO transportation_route_member_coalesced
|
||||
SELECT
|
||||
|
@ -155,11 +122,13 @@ BEGIN
|
|||
END AS rank
|
||||
FROM (
|
||||
-- etldoc: osm_route_member -> osm_route_member
|
||||
-- etldoc: gbr_route_members_view -> osm_route_member
|
||||
-- etldoc: ire_route_members_view -> osm_route_member
|
||||
-- see http://wiki.openstreetmap.org/wiki/Relation:route#Road_routes
|
||||
SELECT DISTINCT ON (member, COALESCE(network, ''), COALESCE(ref, ''))
|
||||
member,
|
||||
COALESCE(network, '') AS network,
|
||||
COALESCE(ref, '') AS ref,
|
||||
SELECT DISTINCT ON (member, COALESCE(rel.network, ''), COALESCE(rel.ref, ''))
|
||||
rel.member,
|
||||
COALESCE(NULLIF(rel.network,''), gb_way.network, ir_way.network, '') AS network,
|
||||
COALESCE(rel.ref, '') AS ref,
|
||||
osm_id,
|
||||
role,
|
||||
type,
|
||||
|
@ -167,11 +136,13 @@ BEGIN
|
|||
osmc_symbol,
|
||||
colour,
|
||||
ref_colour
|
||||
FROM osm_route_member
|
||||
FROM osm_route_member rel
|
||||
LEFT JOIN gbr_route_members_view gb_way ON (gb_way.member=rel.member)
|
||||
LEFT JOIN ire_route_members_view ir_way ON (ir_way.member=rel.member)
|
||||
WHERE full_update OR EXISTS(
|
||||
SELECT NULL
|
||||
FROM transportation_name.network_changes c
|
||||
WHERE c.is_old IS FALSE AND c.osm_id = osm_route_member.member
|
||||
WHERE c.is_old IS FALSE AND c.osm_id = rel.member
|
||||
)
|
||||
) osm_route_member_filtered
|
||||
ON CONFLICT (member, network, ref) DO UPDATE SET osm_id = EXCLUDED.osm_id, role = EXCLUDED.role,
|
||||
|
|
|
@ -42,6 +42,23 @@ SELECT
|
|||
$$ LANGUAGE SQL IMMUTABLE
|
||||
PARALLEL SAFE;
|
||||
|
||||
-- Determine whether a segment is long enough to have an attribute
|
||||
CREATE OR REPLACE FUNCTION visible_text(g geometry, attr text, zoom_level integer)
|
||||
RETURNS text AS
|
||||
$$
|
||||
SELECT
|
||||
CASE WHEN
|
||||
-- Width of a tile in meters (111,842 is the length of one degree of latitude at the equator in meters)
|
||||
-- 111,842 * 180 / 2^zoom_level
|
||||
-- = 20131560 / POW(2, zoom_level)
|
||||
-- Drop brunnel if length of way < 2% of tile width (less than 3 pixels)
|
||||
ST_Length(g) *
|
||||
COS(RADIANS(ST_Y(ST_Centroid(ST_Transform(g, 4326))))) *
|
||||
POW(2, zoom_level) / 20131560 > 0.02
|
||||
THEN attr END
|
||||
$$ LANGUAGE SQL IMMUTABLE
|
||||
PARALLEL SAFE;
|
||||
|
||||
-- Instead of using relations to find out the road names we
|
||||
-- stitch together the touching ways with the same name
|
||||
-- to allow for nice label rendering
|
||||
|
@ -49,7 +66,8 @@ $$ LANGUAGE SQL IMMUTABLE
|
|||
|
||||
-- etldoc: osm_highway_linestring -> osm_transportation_name_network
|
||||
-- etldoc: transportation_route_member_coalesced -> osm_transportation_name_network
|
||||
CREATE TABLE IF NOT EXISTS osm_transportation_name_network AS
|
||||
DROP TABLE IF EXISTS osm_transportation_name_network;
|
||||
CREATE TABLE osm_transportation_name_network AS
|
||||
SELECT
|
||||
geometry,
|
||||
osm_id,
|
||||
|
@ -807,7 +825,10 @@ BEGIN
|
|||
WHERE transportation.changes_z4_z5_z6_z7.is_old IS FALSE AND
|
||||
transportation.changes_z4_z5_z6_z7.id = osm_transportation_merge_linestring_gen_z5.id
|
||||
)) AND
|
||||
osm_national_network(network) AND
|
||||
(highway = 'motorway' OR construction = 'motorway'
|
||||
) OR
|
||||
(osm_national_network(network) AND network != 'gb-trunk'
|
||||
) AND
|
||||
-- Current view: national-importance motorways and trunks
|
||||
ST_Length(geometry) > 1000
|
||||
ON CONFLICT (id) DO UPDATE SET osm_id = excluded.osm_id, highway = excluded.highway, network = excluded.network,
|
||||
|
|
|
@ -204,7 +204,7 @@ FROM (
|
|||
indoor
|
||||
FROM osm_transportation_name_linestring
|
||||
WHERE zoom_level = 12
|
||||
AND LineLabel(zoom_level, COALESCE(tags->'name', ref), geometry)
|
||||
AND LineLabel(zoom_level, COALESCE(ref, tags->'name'), geometry)
|
||||
AND NOT highway_is_link(highway)
|
||||
AND
|
||||
CASE WHEN highway_class(highway, NULL::text, NULL::text) NOT IN ('path', 'minor') THEN TRUE
|
||||
|
@ -228,7 +228,7 @@ FROM (
|
|||
indoor
|
||||
FROM osm_transportation_name_linestring
|
||||
WHERE zoom_level = 13
|
||||
AND LineLabel(zoom_level, COALESCE(tags->'name', ref), geometry)
|
||||
AND LineLabel(zoom_level, COALESCE(ref, tags->'name'), geometry)
|
||||
AND
|
||||
CASE WHEN highway <> 'path' THEN TRUE
|
||||
WHEN highway = 'path' AND (
|
||||
|
|
|
@ -426,17 +426,17 @@ BEGIN
|
|||
|
||||
-- etldoc: osm_transportation_name_linestring -> osm_transportation_name_linestring_gen1
|
||||
INSERT INTO osm_transportation_name_linestring_gen1 (id, geometry, tags, ref, highway, subclass, brunnel, network,
|
||||
route_1, route_2, route_3, route_4, route_5, route_6, z_order)
|
||||
route_1, route_2, route_3, route_4, route_5, route_6)
|
||||
SELECT MIN(id) as id,
|
||||
ST_Simplify(ST_LineMerge(ST_Collect(geometry)), 50) AS geometry,
|
||||
tags, ref, highway, subclass, brunnel, network,
|
||||
route_1, route_2, route_3, route_4, route_5, route_6, z_order
|
||||
route_1, route_2, route_3, route_4, route_5, route_6
|
||||
FROM (
|
||||
SELECT id,
|
||||
geometry,
|
||||
tags, ref, highway, subclass,
|
||||
CASE WHEN ST_Length(geometry) > 8000 THEN brunnel ELSE '' END AS brunnel,
|
||||
network, route_1, route_2, route_3, route_4, route_5, route_6, z_order
|
||||
visible_text(geometry, brunnel, 9) AS brunnel,
|
||||
network, route_1, route_2, route_3, route_4, route_5, route_6
|
||||
FROM osm_transportation_name_linestring
|
||||
) osm_transportation_name_linestring_gen1_pre_merge
|
||||
WHERE (
|
||||
|
@ -449,12 +449,12 @@ BEGIN
|
|||
) AND (
|
||||
(highway IN ('motorway', 'trunk') OR highway = 'construction' AND subclass IN ('motorway', 'trunk'))
|
||||
)
|
||||
GROUP BY tags, ref, highway, subclass, brunnel, network, route_1, route_2, route_3, route_4, route_5, route_6, z_order
|
||||
GROUP BY tags, ref, highway, subclass, brunnel, network, route_1, route_2, route_3, route_4, route_5, route_6
|
||||
ON CONFLICT (id) DO UPDATE SET geometry = excluded.geometry, tags = excluded.tags, ref = excluded.ref,
|
||||
highway = excluded.highway, subclass = excluded.subclass,
|
||||
brunnel = excluded.brunnel, network = excluded.network, route_1 = excluded.route_1,
|
||||
route_2 = excluded.route_2, route_3 = excluded.route_3, route_4 = excluded.route_4,
|
||||
route_5 = excluded.route_5, route_6 = excluded.route_6, z_order = excluded.z_order;
|
||||
route_5 = excluded.route_5, route_6 = excluded.route_6;
|
||||
|
||||
-- Analyze source table
|
||||
ANALYZE osm_transportation_name_linestring_gen1;
|
||||
|
@ -469,17 +469,17 @@ BEGIN
|
|||
|
||||
-- etldoc: osm_transportation_name_linestring_gen1 -> osm_transportation_name_linestring_gen2
|
||||
INSERT INTO osm_transportation_name_linestring_gen2 (id, geometry, tags, ref, highway, subclass, brunnel, network,
|
||||
route_1, route_2, route_3, route_4, route_5, route_6, z_order)
|
||||
route_1, route_2, route_3, route_4, route_5, route_6)
|
||||
SELECT MIN(id) as id,
|
||||
ST_Simplify(ST_LineMerge(ST_Collect(geometry)), 120) AS geometry,
|
||||
tags, ref, highway, subclass, brunnel, network,
|
||||
route_1, route_2, route_3, route_4, route_5, route_6, z_order
|
||||
route_1, route_2, route_3, route_4, route_5, route_6
|
||||
FROM (
|
||||
SELECT id,
|
||||
(ST_Dump(geometry)).geom AS geometry,
|
||||
tags, ref, highway, subclass,
|
||||
CASE WHEN ST_Length(geometry) > 14000 THEN brunnel ELSE '' END AS brunnel,
|
||||
network, route_1, route_2, route_3, route_4, route_5, route_6, z_order
|
||||
visible_text(geometry, brunnel, 8) AS brunnel,
|
||||
network, route_1, route_2, route_3, route_4, route_5, route_6
|
||||
FROM osm_transportation_name_linestring_gen1
|
||||
) osm_transportation_name_linestring_gen2_pre_merge
|
||||
WHERE (
|
||||
|
@ -492,12 +492,12 @@ BEGIN
|
|||
) AND (
|
||||
(highway IN ('motorway', 'trunk') OR highway = 'construction' AND subclass IN ('motorway', 'trunk'))
|
||||
)
|
||||
GROUP BY tags, ref, highway, subclass, brunnel, network, route_1, route_2, route_3, route_4, route_5, route_6, z_order
|
||||
GROUP BY tags, ref, highway, subclass, brunnel, network, route_1, route_2, route_3, route_4, route_5, route_6
|
||||
ON CONFLICT (id) DO UPDATE SET geometry = excluded.geometry, tags = excluded.tags, ref = excluded.ref,
|
||||
highway = excluded.highway, subclass = excluded.subclass,
|
||||
brunnel = excluded.brunnel, network = excluded.network, route_1 = excluded.route_1,
|
||||
route_2 = excluded.route_2, route_3 = excluded.route_3, route_4 = excluded.route_4,
|
||||
route_5 = excluded.route_5, route_6 = excluded.route_6, z_order = excluded.z_order;
|
||||
route_5 = excluded.route_5, route_6 = excluded.route_6;
|
||||
|
||||
-- Analyze source table
|
||||
ANALYZE osm_transportation_name_linestring_gen2;
|
||||
|
@ -512,17 +512,17 @@ BEGIN
|
|||
|
||||
-- etldoc: osm_transportation_name_linestring_gen2 -> osm_transportation_name_linestring_gen3
|
||||
INSERT INTO osm_transportation_name_linestring_gen3 (id, geometry, tags, ref, highway, subclass, brunnel, network,
|
||||
route_1, route_2, route_3, route_4, route_5, route_6, z_order)
|
||||
route_1, route_2, route_3, route_4, route_5, route_6)
|
||||
SELECT MIN(id) as id,
|
||||
ST_Simplify(ST_LineMerge(ST_Collect(geometry)), 200) AS geometry,
|
||||
tags, ref, highway, subclass, brunnel, network,
|
||||
route_1, route_2, route_3, route_4, route_5, route_6, z_order
|
||||
route_1, route_2, route_3, route_4, route_5, route_6
|
||||
FROM (
|
||||
SELECT id,
|
||||
(ST_Dump(geometry)).geom AS geometry,
|
||||
tags, ref, highway, subclass,
|
||||
CASE WHEN ST_Length(geometry) > 20000 THEN brunnel ELSE '' END AS brunnel,
|
||||
network, route_1, route_2, route_3, route_4, route_5, route_6, z_order
|
||||
visible_text(geometry, brunnel, 7) AS brunnel,
|
||||
network, route_1, route_2, route_3, route_4, route_5, route_6
|
||||
FROM osm_transportation_name_linestring_gen2
|
||||
) osm_transportation_name_linestring_gen3_pre_merge
|
||||
WHERE (
|
||||
|
@ -535,12 +535,12 @@ BEGIN
|
|||
) AND (
|
||||
(highway = 'motorway' OR highway = 'construction' AND subclass = 'motorway')
|
||||
)
|
||||
GROUP BY tags, ref, highway, subclass, brunnel, network, route_1, route_2, route_3, route_4, route_5, route_6, z_order
|
||||
GROUP BY tags, ref, highway, subclass, brunnel, network, route_1, route_2, route_3, route_4, route_5, route_6
|
||||
ON CONFLICT (id) DO UPDATE SET geometry = excluded.geometry, tags = excluded.tags, ref = excluded.ref,
|
||||
highway = excluded.highway, subclass = excluded.subclass,
|
||||
brunnel = excluded.brunnel, network = excluded.network, route_1 = excluded.route_1,
|
||||
route_2 = excluded.route_2, route_3 = excluded.route_3, route_4 = excluded.route_4,
|
||||
route_5 = excluded.route_5, route_6 = excluded.route_6, z_order = excluded.z_order;
|
||||
route_5 = excluded.route_5, route_6 = excluded.route_6;
|
||||
|
||||
-- Analyze source table
|
||||
ANALYZE osm_transportation_name_linestring_gen3;
|
||||
|
@ -555,25 +555,36 @@ BEGIN
|
|||
|
||||
-- etldoc: osm_transportation_name_linestring_gen3 -> osm_transportation_name_linestring_gen4
|
||||
INSERT INTO osm_transportation_name_linestring_gen4 (id, geometry, tags, ref, highway, subclass, brunnel, network,
|
||||
route_1, route_2, route_3, route_4, route_5, route_6, z_order)
|
||||
SELECT id, ST_Simplify(geometry, 500) AS geometry, tags, ref, highway, subclass, brunnel, network, route_1, route_2,
|
||||
route_3, route_4, route_5, route_6, z_order
|
||||
FROM osm_transportation_name_linestring_gen3
|
||||
route_1, route_2, route_3, route_4, route_5, route_6)
|
||||
SELECT MIN(id) as id,
|
||||
ST_Simplify(ST_LineMerge(ST_Collect(geometry)), 500) AS geometry,
|
||||
tags, ref, highway, subclass, brunnel, network,
|
||||
route_1, route_2, route_3, route_4, route_5, route_6
|
||||
FROM (
|
||||
SELECT id,
|
||||
(ST_Dump(geometry)).geom AS geometry,
|
||||
tags, ref, highway, subclass,
|
||||
visible_text(geometry, brunnel, 6) AS brunnel,
|
||||
network, route_1, route_2, route_3, route_4, route_5, route_6
|
||||
FROM osm_transportation_name_linestring_gen3
|
||||
) osm_transportation_name_linestring_gen4_pre_merge
|
||||
WHERE (
|
||||
full_update IS TRUE OR EXISTS (
|
||||
SELECT NULL
|
||||
FROM transportation_name.name_changes_gen
|
||||
WHERE transportation_name.name_changes_gen.is_old IS FALSE AND
|
||||
transportation_name.name_changes_gen.id = osm_transportation_name_linestring_gen3.id
|
||||
transportation_name.name_changes_gen.id = osm_transportation_name_linestring_gen4_pre_merge.id
|
||||
)
|
||||
) AND (
|
||||
(highway = 'motorway' OR highway = 'construction' AND subclass = 'motorway') AND
|
||||
ST_Length(geometry) > 20000
|
||||
) ON CONFLICT (id) DO UPDATE SET geometry = excluded.geometry, tags = excluded.tags, ref = excluded.ref,
|
||||
ST_Length(geometry) > 20000 AND
|
||||
(highway = 'motorway' OR highway = 'construction' AND subclass = 'motorway')
|
||||
)
|
||||
GROUP BY tags, ref, highway, subclass, brunnel, network, route_1, route_2, route_3, route_4, route_5, route_6
|
||||
ON CONFLICT (id) DO UPDATE SET geometry = excluded.geometry, tags = excluded.tags, ref = excluded.ref,
|
||||
highway = excluded.highway, subclass = excluded.subclass,
|
||||
brunnel = excluded.brunnel, network = excluded.network, route_1 = excluded.route_1,
|
||||
route_2 = excluded.route_2, route_3 = excluded.route_3, route_4 = excluded.route_4,
|
||||
route_5 = excluded.route_5, route_6 = excluded.route_6, z_order = excluded.z_order;
|
||||
route_5 = excluded.route_5, route_6 = excluded.route_6;
|
||||
|
||||
-- noinspection SqlWithoutWhere
|
||||
DELETE FROM transportation_name.name_changes_gen;
|
||||
|
|
|
@ -40,7 +40,7 @@ layer:
|
|||
river:
|
||||
water: ['river', 'stream', 'canal', 'ditch', 'drain']
|
||||
pond:
|
||||
water: ['pond', 'basin', 'wastewater']
|
||||
water: ['pond', 'basin', 'wastewater', 'salt_pond']
|
||||
lake:
|
||||
ocean:
|
||||
swimming_pool:
|
||||
|
|
|
@ -351,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 "-------------------------------------------------------------------------------------"
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="14"
|
||||
height="14"
|
||||
viewBox="0 0 14 14"
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg29764"
|
||||
sodipodi:docname="chocolate.svg"
|
||||
inkscape:version="1.0.2 (e86c8708, 2021-01-15)">
|
||||
<metadata
|
||||
id="metadata29770">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs29768" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1265"
|
||||
inkscape:window-height="714"
|
||||
id="namedview29766"
|
||||
showgrid="false"
|
||||
inkscape:zoom="33.14"
|
||||
inkscape:cx="-0.18165359"
|
||||
inkscape:cy="7"
|
||||
inkscape:window-x="55"
|
||||
inkscape:window-y="56"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg29764"
|
||||
inkscape:pagecheckerboard="true"
|
||||
inkscape:document-rotation="0" />
|
||||
<circle
|
||||
style="fill:#c77400;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;paint-order:stroke fill markers;fill-opacity:1"
|
||||
id="path30353"
|
||||
cx="6.8497281"
|
||||
cy="7.0609536"
|
||||
r="2.6554012" />
|
||||
</svg>
|
Przed Szerokość: | Wysokość: | Rozmiar: 1.8 KiB |
|
@ -0,0 +1,10 @@
|
|||
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0)">
|
||||
<path d="M7 0C3.13444 0 0 3.13444 0 7C0 10.8656 3.13444 14 7 14C7.64556 14 8.16602 13.4795 8.16602 12.834C8.16602 12.5307 8.05384 12.2569 7.86328 12.0508C7.6805 11.8447 7.57227 11.5768 7.57227 11.2773C7.57227 10.6318 8.09273 10.1113 8.73828 10.1113H10.1113C12.258 10.1113 14 8.36932 14 6.22266C14 2.78488 10.8656 0 7 0V0ZM8.93359 1.30469C9.30185 1.30482 9.65499 1.45117 9.91539 1.71157C10.1758 1.97197 10.3221 2.3251 10.3223 2.69336C10.3225 2.87587 10.2867 3.05663 10.217 3.2253C10.1473 3.39398 10.045 3.54727 9.91608 3.67641C9.78711 3.80556 9.63397 3.90802 9.46539 3.97796C9.29681 4.04789 9.1161 4.08392 8.93359 4.08398C8.75109 4.08392 8.57038 4.04789 8.4018 3.97796C8.23322 3.90802 8.08007 3.80556 7.95111 3.67641C7.82215 3.54727 7.7199 3.39398 7.6502 3.2253C7.58051 3.05663 7.54473 2.87587 7.54492 2.69336C7.54506 2.3251 7.69141 1.97197 7.9518 1.71157C8.2122 1.45117 8.56534 1.30482 8.93359 1.30469V1.30469ZM5.03906 1.32422C5.22174 1.32403 5.40265 1.35987 5.57146 1.42969C5.74026 1.4995 5.89364 1.60193 6.02281 1.7311C6.15198 1.86027 6.2544 2.01365 6.32422 2.18245C6.39404 2.35125 6.42988 2.53217 6.42969 2.71484C6.42962 2.89735 6.39359 3.07806 6.32366 3.24664C6.25373 3.41522 6.15126 3.56836 6.02212 3.69733C5.89297 3.82629 5.73968 3.92854 5.57101 3.99823C5.40233 4.06793 5.22157 4.10371 5.03906 4.10352C4.67081 4.10338 4.31767 3.95703 4.05727 3.69663C3.79687 3.43624 3.65052 3.0831 3.65039 2.71484C3.6502 2.53234 3.68598 2.35158 3.75567 2.1829C3.82537 2.01422 3.92762 1.86093 4.05658 1.73179C4.18554 1.60265 4.33869 1.50018 4.50727 1.43025C4.67585 1.36031 4.85655 1.32429 5.03906 1.32422V1.32422ZM2.70703 4.44727C2.88954 4.44733 3.07025 4.48336 3.23883 4.55329C3.4074 4.62323 3.56055 4.72569 3.68951 4.85484C3.81848 4.98398 3.92073 5.13727 3.99042 5.30595C4.06012 5.47462 4.09589 5.65538 4.0957 5.83789C4.09557 6.20615 3.94922 6.55928 3.68882 6.81968C3.42842 7.08008 3.07529 7.22643 2.70703 7.22656C2.33877 7.22643 1.98564 7.08008 1.72524 6.81968C1.46484 6.55928 1.31849 6.20615 1.31836 5.83789C1.31817 5.65538 1.35394 5.47462 1.42364 5.30595C1.49334 5.13727 1.59559 4.98398 1.72455 4.85484C1.85351 4.72569 2.00666 4.62323 2.17524 4.55329C2.34382 4.48336 2.52452 4.44733 2.70703 4.44727V4.44727ZM11.2656 4.44727C11.4481 4.44733 11.6288 4.48336 11.7974 4.55329C11.966 4.62323 12.1191 4.72569 12.2481 4.85484C12.3771 4.98398 12.4793 5.13727 12.549 5.30595C12.6187 5.47462 12.6545 5.65538 12.6543 5.83789C12.6542 6.20615 12.5078 6.55928 12.2474 6.81968C11.987 7.08008 11.6339 7.22643 11.2656 7.22656C10.8974 7.22643 10.5442 7.08008 10.2838 6.81968C10.0234 6.55928 9.87709 6.20615 9.87695 5.83789C9.87676 5.65538 9.91254 5.47462 9.98223 5.30595C10.0519 5.13727 10.1542 4.98398 10.2831 4.85484C10.4121 4.72569 10.5653 4.62323 10.7338 4.55329C10.9024 4.48336 11.0831 4.44733 11.2656 4.44727V4.44727Z" fill="#734A08"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0">
|
||||
<rect width="14" height="14" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
Po Szerokość: | Wysokość: | Rozmiar: 3.0 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 1.7 KiB Po Szerokość: | Wysokość: | Rozmiar: 1.7 KiB |
|
@ -1,59 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="14"
|
||||
height="14"
|
||||
viewBox="0 0 14 14"
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg29764"
|
||||
sodipodi:docname="tattoo.svg"
|
||||
inkscape:version="1.0.2 (e86c8708, 2021-01-15)">
|
||||
<metadata
|
||||
id="metadata29770">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs29768" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1265"
|
||||
inkscape:window-height="714"
|
||||
id="namedview29766"
|
||||
showgrid="false"
|
||||
inkscape:zoom="33.14"
|
||||
inkscape:cx="7"
|
||||
inkscape:cy="7"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="25"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg29764"
|
||||
inkscape:pagecheckerboard="true" />
|
||||
<circle
|
||||
style="fill:#ac39ac;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;paint-order:stroke fill markers"
|
||||
id="path30353"
|
||||
cx="6.8497281"
|
||||
cy="7.0609536"
|
||||
r="2.6554012" />
|
||||
</svg>
|
Przed Szerokość: | Wysokość: | Rozmiar: 1.7 KiB |
|
@ -1,59 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="14"
|
||||
height="14"
|
||||
viewBox="0 0 14 14"
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg29764"
|
||||
sodipodi:docname="other.svg"
|
||||
inkscape:version="1.0.2 (e86c8708, 2021-01-15)">
|
||||
<metadata
|
||||
id="metadata29770">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs29768" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1265"
|
||||
inkscape:window-height="714"
|
||||
id="namedview29766"
|
||||
showgrid="false"
|
||||
inkscape:zoom="33.14"
|
||||
inkscape:cx="7"
|
||||
inkscape:cy="7"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="25"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg29764"
|
||||
inkscape:pagecheckerboard="true" />
|
||||
<circle
|
||||
style="fill:#ac39ac;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;paint-order:stroke fill markers"
|
||||
id="path30353"
|
||||
cx="6.8497281"
|
||||
cy="7.0609536"
|
||||
r="2.6554012" />
|
||||
</svg>
|
Przed Szerokość: | Wysokość: | Rozmiar: 1.7 KiB |