Merge branch 'master' of https://github.com/openmaptiles/openmaptiles into merge-github
# Conflicts: # Makefile # QUICKSTART.md # docker-compose.yml # layers/boundary/mapping.yaml # layers/landuse/landuse.sql # layers/landuse/landuse.yaml # layers/landuse/mapping.yaml # layers/poi/mapping.yaml # layers/poi/poi.sql # layers/poi/poi.yaml
This commit is contained in:
10
layers/landuse/class.sql
Normal file
10
layers/landuse/class.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
-- Unify class names that represent the same type of feature
|
||||
CREATE OR REPLACE FUNCTION landuse_unify(class text) RETURNS text LANGUAGE plpgsql
|
||||
AS
|
||||
$$
|
||||
BEGIN
|
||||
RETURN CASE
|
||||
WHEN class='grave_yard' THEN 'cemetery'
|
||||
ELSE class END;
|
||||
END;
|
||||
$$;
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 176 KiB After Width: | Height: | Size: 333 KiB |
@@ -37,6 +37,188 @@ WHERE scalerank <= 2
|
||||
) /* DELAY_MATERIALIZED_VIEW_CREATION */ ;
|
||||
CREATE INDEX IF NOT EXISTS ne_50m_urban_areas_gen_z4_idx ON ne_50m_urban_areas_gen_z4 USING gist (geometry);
|
||||
|
||||
-- etldoc: osm_landuse_polygon_gen_z6 -> osm_landuse_polygon_gen_z6_union
|
||||
-- etldoc: osm_residential_gen_z6 -> osm_landuse_polygon_gen_z6_union
|
||||
CREATE OR REPLACE VIEW osm_landuse_polygon_gen_z6_union AS
|
||||
(
|
||||
SELECT osm_id,
|
||||
geometry,
|
||||
landuse,
|
||||
amenity,
|
||||
leisure,
|
||||
tourism,
|
||||
place,
|
||||
waterway
|
||||
FROM osm_landuse_polygon_gen_z6
|
||||
WHERE landuse <> 'residential'
|
||||
UNION ALL
|
||||
SELECT NULL::bigint AS osm_id,
|
||||
geometry,
|
||||
'residential' AS landuse,
|
||||
'' AS amenity,
|
||||
'' AS leisure,
|
||||
'' AS tourism,
|
||||
'' AS place,
|
||||
'' AS waterway
|
||||
FROM osm_residential_gen_z6
|
||||
);
|
||||
|
||||
-- etldoc: osm_landuse_polygon_gen_z7 -> osm_landuse_polygon_gen_z7_union
|
||||
-- etldoc: osm_residential_gen_z7 -> osm_landuse_polygon_gen_z7_union
|
||||
CREATE OR REPLACE VIEW osm_landuse_polygon_gen_z7_union AS
|
||||
(
|
||||
SELECT osm_id,
|
||||
geometry,
|
||||
landuse,
|
||||
amenity,
|
||||
leisure,
|
||||
tourism,
|
||||
place,
|
||||
waterway
|
||||
FROM osm_landuse_polygon_gen_z7
|
||||
WHERE landuse <> 'residential'
|
||||
UNION ALL
|
||||
SELECT NULL::bigint AS osm_id,
|
||||
geometry,
|
||||
'residential' AS landuse,
|
||||
'' AS amenity,
|
||||
'' AS leisure,
|
||||
'' AS tourism,
|
||||
'' AS place,
|
||||
'' AS waterway
|
||||
FROM osm_residential_gen_z7
|
||||
);
|
||||
|
||||
-- etldoc: osm_landuse_polygon_gen_z8 -> osm_landuse_polygon_gen_z8_union
|
||||
-- etldoc: osm_residential_gen_z8 -> osm_landuse_polygon_gen_z8_union
|
||||
CREATE OR REPLACE VIEW osm_landuse_polygon_gen_z8_union AS
|
||||
(
|
||||
SELECT osm_id,
|
||||
geometry,
|
||||
landuse,
|
||||
amenity,
|
||||
leisure,
|
||||
tourism,
|
||||
place,
|
||||
waterway
|
||||
FROM osm_landuse_polygon_gen_z8
|
||||
WHERE landuse <> 'residential'
|
||||
UNION ALL
|
||||
SELECT NULL::bigint AS osm_id,
|
||||
geometry,
|
||||
'residential' AS landuse,
|
||||
'' AS amenity,
|
||||
'' AS leisure,
|
||||
'' AS tourism,
|
||||
'' AS place,
|
||||
'' AS waterway
|
||||
FROM osm_residential_gen_z8
|
||||
);
|
||||
|
||||
-- etldoc: osm_landuse_polygon_gen_z9 -> osm_landuse_polygon_gen_z9_union
|
||||
-- etldoc: osm_residential_gen_z9 -> osm_landuse_polygon_gen_z9_union
|
||||
CREATE OR REPLACE VIEW osm_landuse_polygon_gen_z9_union AS
|
||||
(
|
||||
SELECT osm_id,
|
||||
geometry,
|
||||
landuse,
|
||||
amenity,
|
||||
leisure,
|
||||
tourism,
|
||||
place,
|
||||
waterway
|
||||
FROM osm_landuse_polygon_gen_z9
|
||||
WHERE landuse <> 'residential'
|
||||
UNION ALL
|
||||
SELECT NULL::bigint AS osm_id,
|
||||
geometry,
|
||||
'residential' AS landuse,
|
||||
'' AS amenity,
|
||||
'' AS leisure,
|
||||
'' AS tourism,
|
||||
'' AS place,
|
||||
'' AS waterway
|
||||
FROM osm_residential_gen_z9
|
||||
);
|
||||
|
||||
-- etldoc: osm_landuse_polygon_gen_z10 -> osm_landuse_polygon_gen_z10_union
|
||||
-- etldoc: osm_residential_gen_z10 -> osm_landuse_polygon_gen_z10_union
|
||||
CREATE OR REPLACE VIEW osm_landuse_polygon_gen_z10_union AS
|
||||
(
|
||||
SELECT osm_id,
|
||||
geometry,
|
||||
landuse,
|
||||
amenity,
|
||||
leisure,
|
||||
tourism,
|
||||
place,
|
||||
waterway
|
||||
FROM osm_landuse_polygon_gen_z10
|
||||
WHERE landuse <> 'residential'
|
||||
UNION ALL
|
||||
SELECT NULL::bigint AS osm_id,
|
||||
geometry,
|
||||
'residential' AS landuse,
|
||||
'' AS amenity,
|
||||
'' AS leisure,
|
||||
'' AS tourism,
|
||||
'' AS place,
|
||||
'' AS waterway
|
||||
FROM osm_residential_gen_z10
|
||||
);
|
||||
|
||||
-- etldoc: osm_landuse_polygon_gen_z11 -> osm_landuse_polygon_gen_z11_union
|
||||
-- etldoc: osm_residential_gen_z11 -> osm_landuse_polygon_gen_z11_union
|
||||
CREATE OR REPLACE VIEW osm_landuse_polygon_gen_z11_union AS
|
||||
(
|
||||
SELECT osm_id,
|
||||
geometry,
|
||||
landuse,
|
||||
amenity,
|
||||
leisure,
|
||||
tourism,
|
||||
place,
|
||||
waterway
|
||||
FROM osm_landuse_polygon_gen_z11
|
||||
WHERE landuse <> 'residential'
|
||||
UNION ALL
|
||||
SELECT NULL::bigint AS osm_id,
|
||||
geometry,
|
||||
'residential' AS landuse,
|
||||
'' AS amenity,
|
||||
'' AS leisure,
|
||||
'' AS tourism,
|
||||
'' AS place,
|
||||
'' AS waterway
|
||||
FROM osm_residential_gen_z11
|
||||
);
|
||||
|
||||
-- etldoc: osm_landuse_polygon_gen_z12 -> osm_landuse_polygon_gen_z12_union
|
||||
-- etldoc: osm_residential_gen_z12 -> osm_landuse_polygon_gen_z12_union
|
||||
CREATE OR REPLACE VIEW osm_landuse_polygon_gen_z12_union AS
|
||||
(
|
||||
SELECT osm_id,
|
||||
geometry,
|
||||
landuse,
|
||||
amenity,
|
||||
leisure,
|
||||
tourism,
|
||||
place,
|
||||
waterway
|
||||
FROM osm_landuse_polygon_gen_z12
|
||||
WHERE landuse <> 'residential'
|
||||
UNION ALL
|
||||
SELECT NULL::bigint AS osm_id,
|
||||
geometry,
|
||||
'residential' AS landuse,
|
||||
'' AS amenity,
|
||||
'' AS leisure,
|
||||
'' AS tourism,
|
||||
'' AS place,
|
||||
'' AS waterway
|
||||
FROM osm_residential_gen_z12
|
||||
);
|
||||
|
||||
-- etldoc: layer_landuse[shape=record fillcolor=lightpink, style="rounded,filled",
|
||||
-- etldoc: label="layer_landuse |<z4> z4|<z5> z5|<z6> z6|<z7> z7|<z8> z8|<z9> z9|<z10> z10|<z11> z11|<z12> z12|<z13> z13|<z14> z14+" ] ;
|
||||
|
||||
@@ -51,7 +233,8 @@ AS
|
||||
$$
|
||||
SELECT osm_id,
|
||||
geometry,
|
||||
COALESCE(
|
||||
landuse_unify(
|
||||
COALESCE(
|
||||
NULLIF(landuse, ''),
|
||||
NULLIF(amenity, ''),
|
||||
NULLIF(leisure, ''),
|
||||
@@ -59,7 +242,7 @@ SELECT osm_id,
|
||||
NULLIF(place, ''),
|
||||
NULLIF(waterway, ''),
|
||||
NULLIF(man_made, '')
|
||||
) AS class
|
||||
)) AS class
|
||||
FROM (
|
||||
-- etldoc: ne_50m_urban_areas_gen_z4 -> layer_landuse:z4
|
||||
SELECT osm_id,
|
||||
@@ -87,7 +270,7 @@ FROM (
|
||||
FROM ne_50m_urban_areas_gen_z5
|
||||
WHERE zoom_level = 5
|
||||
UNION ALL
|
||||
-- etldoc: osm_landuse_polygon_gen_z6 -> layer_landuse:z6
|
||||
-- etldoc: osm_landuse_polygon_gen_z6_union -> layer_landuse:z6
|
||||
SELECT osm_id,
|
||||
geometry,
|
||||
landuse,
|
||||
@@ -97,10 +280,10 @@ FROM (
|
||||
place,
|
||||
waterway,
|
||||
man_made
|
||||
FROM osm_landuse_polygon_gen_z6
|
||||
FROM osm_landuse_polygon_gen_z6_union
|
||||
WHERE zoom_level = 6
|
||||
UNION ALL
|
||||
-- etldoc: osm_landuse_polygon_gen_z7 -> layer_landuse:z7
|
||||
-- etldoc: osm_landuse_polygon_gen_z7_union -> layer_landuse:z7
|
||||
SELECT osm_id,
|
||||
geometry,
|
||||
landuse,
|
||||
@@ -110,10 +293,10 @@ FROM (
|
||||
place,
|
||||
waterway,
|
||||
man_made
|
||||
FROM osm_landuse_polygon_gen_z7
|
||||
FROM osm_landuse_polygon_gen_z7_union
|
||||
WHERE zoom_level = 7
|
||||
UNION ALL
|
||||
-- etldoc: osm_landuse_polygon_gen_z8 -> layer_landuse:z8
|
||||
-- etldoc: osm_landuse_polygon_gen_z8_union -> layer_landuse:z8
|
||||
SELECT osm_id,
|
||||
geometry,
|
||||
landuse,
|
||||
@@ -123,10 +306,10 @@ FROM (
|
||||
place,
|
||||
waterway,
|
||||
man_made
|
||||
FROM osm_landuse_polygon_gen_z8
|
||||
FROM osm_landuse_polygon_gen_z8_union
|
||||
WHERE zoom_level = 8
|
||||
UNION ALL
|
||||
-- etldoc: osm_landuse_polygon_gen_z9 -> layer_landuse:z9
|
||||
-- etldoc: osm_landuse_polygon_gen_z9_union -> layer_landuse:z9
|
||||
SELECT osm_id,
|
||||
geometry,
|
||||
landuse,
|
||||
@@ -136,10 +319,10 @@ FROM (
|
||||
place,
|
||||
waterway,
|
||||
man_made
|
||||
FROM osm_landuse_polygon_gen_z9
|
||||
FROM osm_landuse_polygon_gen_z9_union
|
||||
WHERE zoom_level = 9
|
||||
UNION ALL
|
||||
-- etldoc: osm_landuse_polygon_gen_z10 -> layer_landuse:z10
|
||||
-- etldoc: osm_landuse_polygon_gen_z10_union -> layer_landuse:z10
|
||||
SELECT osm_id,
|
||||
geometry,
|
||||
landuse,
|
||||
@@ -149,10 +332,10 @@ FROM (
|
||||
place,
|
||||
waterway,
|
||||
man_made
|
||||
FROM osm_landuse_polygon_gen_z10
|
||||
FROM osm_landuse_polygon_gen_z10_union
|
||||
WHERE zoom_level = 10
|
||||
UNION ALL
|
||||
-- etldoc: osm_landuse_polygon_gen_z11 -> layer_landuse:z11
|
||||
-- etldoc: osm_landuse_polygon_gen_z11_union -> layer_landuse:z11
|
||||
SELECT osm_id,
|
||||
geometry,
|
||||
landuse,
|
||||
@@ -162,10 +345,10 @@ FROM (
|
||||
place,
|
||||
waterway,
|
||||
man_made
|
||||
FROM osm_landuse_polygon_gen_z11
|
||||
FROM osm_landuse_polygon_gen_z11_union
|
||||
WHERE zoom_level = 11
|
||||
UNION ALL
|
||||
-- etldoc: osm_landuse_polygon_gen_z12 -> layer_landuse:z12
|
||||
-- etldoc: osm_landuse_polygon_gen_z12_union -> layer_landuse:z12
|
||||
SELECT osm_id,
|
||||
geometry,
|
||||
landuse,
|
||||
@@ -175,7 +358,7 @@ FROM (
|
||||
place,
|
||||
waterway,
|
||||
man_made
|
||||
FROM osm_landuse_polygon_gen_z12
|
||||
FROM osm_landuse_polygon_gen_z12_union
|
||||
WHERE zoom_level = 12
|
||||
UNION ALL
|
||||
-- etldoc: osm_landuse_polygon_gen_z13 -> layer_landuse:z13
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
layer:
|
||||
id: "landuse"
|
||||
requires:
|
||||
tables:
|
||||
- ne_50m_urban_areas
|
||||
description: |
|
||||
Landuse is used to describe use of land by humans. At lower zoom levels this is
|
||||
from Natural Earth data for residential (urban) areas and at higher zoom levels mostly OSM `landuse` tags.
|
||||
@@ -49,10 +52,13 @@ layer:
|
||||
- prison
|
||||
- wastewater_plant
|
||||
- water_works
|
||||
- quarry
|
||||
datasource:
|
||||
geometry_field: geometry
|
||||
query: (SELECT geometry, class FROM layer_landuse(!bbox!, z(!scale_denominator!))) AS t
|
||||
schema:
|
||||
- ./class.sql
|
||||
- ./prep_landuse.sql
|
||||
- ./landuse.sql
|
||||
datasources:
|
||||
- type: imposm3
|
||||
|
||||
@@ -77,6 +77,7 @@ tables:
|
||||
- railway
|
||||
- cemetery
|
||||
- military
|
||||
- quarry
|
||||
# zoning
|
||||
- residential
|
||||
- commercial
|
||||
@@ -98,6 +99,7 @@ tables:
|
||||
- motorcycle_parking
|
||||
- bicycle_parking
|
||||
- animal_training
|
||||
- grave_yard
|
||||
leisure:
|
||||
- stadium
|
||||
- pitch
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 63 KiB |
176
layers/landuse/prep_landuse.sql
Normal file
176
layers/landuse/prep_landuse.sql
Normal file
@@ -0,0 +1,176 @@
|
||||
DROP TABLE IF EXISTS cluster_zres14;
|
||||
CREATE TABLE cluster_zres14 AS
|
||||
(
|
||||
WITH single_geom AS (
|
||||
SELECT (ST_Dump(geometry)).geom AS geometry
|
||||
FROM osm_landuse_polygon
|
||||
WHERE landuse='residential'
|
||||
)
|
||||
SELECT ST_ClusterDBSCAN(geometry, eps := zres(14), minpoints := 1) over () AS cid,
|
||||
geometry
|
||||
FROM single_geom
|
||||
);
|
||||
CREATE INDEX ON cluster_zres14 USING gist(geometry);
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS cluster_zres14_union;
|
||||
CREATE TABLE cluster_zres14_union AS (
|
||||
SELECT ST_Buffer(
|
||||
ST_Union(
|
||||
ST_Buffer(
|
||||
ST_SnapToGrid(geometry, 0.01)
|
||||
, zres(14), 'join=mitre'
|
||||
)
|
||||
),-zres(14), 'join=mitre'
|
||||
) AS geometry
|
||||
FROM cluster_zres14
|
||||
GROUP BY cid
|
||||
);
|
||||
CREATE INDEX ON cluster_zres14_union USING gist(geometry);
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS cluster_zres12;
|
||||
CREATE TABLE cluster_zres12 AS
|
||||
(
|
||||
WITH single_geom AS (
|
||||
SELECT (ST_Dump(geometry)).geom AS geometry
|
||||
FROM osm_landuse_polygon
|
||||
WHERE landuse='residential'
|
||||
)
|
||||
SELECT ST_ClusterDBSCAN(geometry, eps := zres(12), minpoints := 1) over () AS cid,
|
||||
geometry
|
||||
FROM single_geom
|
||||
);
|
||||
CREATE INDEX ON cluster_zres12 USING gist(geometry);
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS cluster_zres12_union;
|
||||
CREATE TABLE cluster_zres12_union AS
|
||||
(
|
||||
SELECT ST_Buffer(
|
||||
ST_Union(
|
||||
ST_Buffer(
|
||||
ST_SnapToGrid(geometry, 1)
|
||||
, zres(12), 'join=mitre'
|
||||
)
|
||||
), -zres(12), 'join=mitre'
|
||||
) AS geometry
|
||||
FROM cluster_zres12
|
||||
GROUP BY cid
|
||||
);
|
||||
CREATE INDEX ON cluster_zres12_union USING gist(geometry);
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS cluster_zres9;
|
||||
CREATE TABLE cluster_zres9 AS
|
||||
(
|
||||
WITH single_geom AS (
|
||||
SELECT (ST_Dump(geometry)).geom AS geometry
|
||||
FROM osm_landuse_polygon
|
||||
WHERE landuse='residential'
|
||||
)
|
||||
SELECT ST_ClusterDBSCAN(geometry, eps := zres(9), minpoints := 1) over () AS cid,
|
||||
geometry
|
||||
FROM single_geom
|
||||
);
|
||||
CREATE INDEX ON cluster_zres9 USING gist(geometry);
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS cluster_zres9_union;
|
||||
CREATE TABLE cluster_zres9_union AS
|
||||
(
|
||||
SELECT ST_Buffer(
|
||||
ST_Union(
|
||||
ST_Buffer(
|
||||
ST_SnapToGrid(geometry, 1)
|
||||
, zres(9), 'join=mitre'
|
||||
)
|
||||
), -zres(9), 'join=mitre'
|
||||
) AS geometry
|
||||
FROM cluster_zres9
|
||||
GROUP BY cid
|
||||
);
|
||||
CREATE INDEX ON cluster_zres9_union USING gist(geometry);
|
||||
|
||||
-- For z6
|
||||
-- etldoc: osm_landuse_polygon -> osm_residential_gen_z6
|
||||
DROP TABLE IF EXISTS osm_residential_gen_z6 CASCADE;
|
||||
CREATE TABLE osm_residential_gen_z6 AS
|
||||
(
|
||||
SELECT ST_SimplifyVW(geometry, power(zres(6), 2)) AS geometry
|
||||
FROM cluster_zres9_union
|
||||
WHERE ST_Area(geometry) > power(zres(6), 2)
|
||||
);
|
||||
CREATE INDEX ON osm_residential_gen_z6 USING gist(geometry);
|
||||
|
||||
|
||||
-- For z7
|
||||
-- etldoc: osm_landuse_polygon -> osm_residential_gen_z7
|
||||
DROP TABLE IF EXISTS osm_residential_gen_z7 CASCADE;
|
||||
CREATE TABLE osm_residential_gen_z7 AS
|
||||
(
|
||||
SELECT ST_SimplifyVW(geometry, power(zres(7), 2)) AS geometry
|
||||
FROM cluster_zres12_union
|
||||
WHERE ST_Area(geometry) > power(zres(6), 2)
|
||||
);
|
||||
CREATE INDEX ON osm_residential_gen_z7 USING gist(geometry);
|
||||
|
||||
|
||||
-- For z8
|
||||
-- etldoc: osm_landuse_polygon -> osm_residential_gen_z8
|
||||
DROP TABLE IF EXISTS osm_residential_gen_z8 CASCADE;
|
||||
CREATE TABLE osm_residential_gen_z8 AS
|
||||
(
|
||||
SELECT ST_SimplifyVW(geometry, power(zres(8), 2)) AS geometry
|
||||
FROM cluster_zres12_union
|
||||
WHERE ST_Area(geometry) > power(zres(7), 2)
|
||||
);
|
||||
CREATE INDEX ON osm_residential_gen_z8 USING gist(geometry);
|
||||
|
||||
|
||||
-- For z9
|
||||
-- etldoc: osm_landuse_polygon -> osm_residential_gen_z9
|
||||
DROP TABLE IF EXISTS osm_residential_gen_z9 CASCADE;
|
||||
CREATE TABLE osm_residential_gen_z9 AS
|
||||
(
|
||||
SELECT ST_SimplifyVW(geometry, power(zres(9), 2)) AS geometry
|
||||
FROM cluster_zres12_union
|
||||
WHERE ST_Area(geometry) > power(zres(9), 2)
|
||||
);
|
||||
CREATE INDEX ON osm_residential_gen_z9 USING gist(geometry);
|
||||
|
||||
|
||||
-- For z10
|
||||
-- etldoc: osm_landuse_polygon -> osm_residential_gen_z10
|
||||
DROP TABLE IF EXISTS osm_residential_gen_z10 CASCADE;
|
||||
CREATE TABLE osm_residential_gen_z10 AS
|
||||
(
|
||||
SELECT ST_SimplifyVW(geometry, power(zres(10), 2)) AS geometry
|
||||
FROM cluster_zres14_union
|
||||
WHERE ST_Area(geometry) > power(zres(10), 2)
|
||||
);
|
||||
CREATE INDEX ON osm_residential_gen_z10 USING gist(geometry);
|
||||
|
||||
|
||||
-- For z11
|
||||
-- etldoc: osm_landuse_polygon -> osm_residential_gen_z11
|
||||
DROP TABLE IF EXISTS osm_residential_gen_z11 CASCADE;
|
||||
CREATE TABLE osm_residential_gen_z11 AS
|
||||
(
|
||||
SELECT ST_SimplifyVW(geometry, power(zres(11), 2)) AS geometry
|
||||
FROM cluster_zres14_union
|
||||
WHERE ST_Area(geometry) > power(zres(11), 2)
|
||||
);
|
||||
CREATE INDEX ON osm_residential_gen_z11 USING gist(geometry);
|
||||
|
||||
|
||||
-- For z12
|
||||
-- etldoc: osm_landuse_polygon -> osm_residential_gen_z12
|
||||
DROP TABLE IF EXISTS osm_residential_gen_z12 CASCADE;
|
||||
CREATE TABLE osm_residential_gen_z12 AS
|
||||
(
|
||||
SELECT ST_SimplifyVW(geometry, power(zres(12), 2)) AS geometry
|
||||
FROM cluster_zres14_union
|
||||
WHERE ST_Area(geometry) > power(zres(12), 2)
|
||||
);
|
||||
CREATE INDEX ON osm_residential_gen_z12 USING gist(geometry);
|
||||
369
layers/landuse/style.json
Normal file
369
layers/landuse/style.json
Normal file
@@ -0,0 +1,369 @@
|
||||
{
|
||||
"layers": [
|
||||
{
|
||||
"id": "landuse_classes",
|
||||
"type": "fill",
|
||||
"source": "openmaptiles",
|
||||
"source-layer": "landuse",
|
||||
"minzoom": 7,
|
||||
"layout": {
|
||||
"visibility": "visible"
|
||||
},
|
||||
"paint": {
|
||||
"fill-color": [
|
||||
"match",
|
||||
[
|
||||
"get",
|
||||
"class"
|
||||
],
|
||||
"railway",
|
||||
"#ebdbe8",
|
||||
"residential",
|
||||
"#e0dfdf",
|
||||
"cemetery",
|
||||
"#aacbaf",
|
||||
"military",
|
||||
"#fceaea",
|
||||
"commercial",
|
||||
"#f2dad9",
|
||||
"industrial",
|
||||
"#ebdbe8",
|
||||
"garages",
|
||||
"#dfddce",
|
||||
"retail",
|
||||
"#ffd6d1",
|
||||
"bus_station",
|
||||
"#e9e7e2",
|
||||
"school",
|
||||
"#ffffe5",
|
||||
"university",
|
||||
"#ffffe5",
|
||||
"kindergarten",
|
||||
"#ffffe5",
|
||||
"college",
|
||||
"#ffffe5",
|
||||
"hospital",
|
||||
"#ffffe5",
|
||||
"stadium",
|
||||
"#d5ffd9",
|
||||
"pitch",
|
||||
"#aae0cb",
|
||||
"playground",
|
||||
"#d5ffd9",
|
||||
"track",
|
||||
"#aae0cb",
|
||||
"dam",
|
||||
"#adadad",
|
||||
"#000"
|
||||
],
|
||||
"fill-opacity": 1
|
||||
},
|
||||
"metadata": {},
|
||||
"filter": [
|
||||
"all",
|
||||
[
|
||||
"in",
|
||||
"class",
|
||||
"railway",
|
||||
"cemetery",
|
||||
"military",
|
||||
"residential",
|
||||
"commercial",
|
||||
"industrial",
|
||||
"garages",
|
||||
"retail",
|
||||
"bus_station",
|
||||
"school",
|
||||
"university",
|
||||
"kindergarten",
|
||||
"college",
|
||||
"hospital",
|
||||
"stadium",
|
||||
"pitch",
|
||||
"playground",
|
||||
"track",
|
||||
"dam"
|
||||
],
|
||||
[
|
||||
"==",
|
||||
"$type",
|
||||
"Polygon"
|
||||
]
|
||||
],
|
||||
"order": 1
|
||||
},
|
||||
{
|
||||
"id": "landuse_residential",
|
||||
"type": "fill",
|
||||
"source": "openmaptiles",
|
||||
"source-layer": "landuse",
|
||||
"minzoom": 6,
|
||||
"maxzoom": 24,
|
||||
"layout": {
|
||||
"visibility": "visible"
|
||||
},
|
||||
"paint": {
|
||||
"fill-color": {
|
||||
"stops": [
|
||||
[
|
||||
7,
|
||||
"#d0d0d0"
|
||||
],
|
||||
[
|
||||
11,
|
||||
"#dddddd"
|
||||
],
|
||||
[
|
||||
12,
|
||||
"#e0dfdf"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"metadata": {},
|
||||
"filter": [
|
||||
"all",
|
||||
[
|
||||
"in",
|
||||
"class",
|
||||
"residential",
|
||||
"suburbs",
|
||||
"neighbourhood"
|
||||
]
|
||||
],
|
||||
"order": 2
|
||||
},
|
||||
{
|
||||
"id": "landuse_class_pattern",
|
||||
"type": "fill",
|
||||
"source": "openmaptiles",
|
||||
"source-layer": "landuse",
|
||||
"layout": {
|
||||
"visibility": "visible"
|
||||
},
|
||||
"paint": {
|
||||
"fill-color": "#000000",
|
||||
"fill-opacity": 1,
|
||||
"fill-pattern": [
|
||||
"match",
|
||||
[
|
||||
"get",
|
||||
"class"
|
||||
],
|
||||
"military",
|
||||
"military_red_hatch",
|
||||
"cemetery",
|
||||
"grave_yard_generic",
|
||||
""
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"filter": [
|
||||
"all",
|
||||
[
|
||||
"in",
|
||||
"class",
|
||||
"military",
|
||||
"cemetery"
|
||||
]
|
||||
],
|
||||
"order": 25
|
||||
},
|
||||
{
|
||||
"id": "landuse_class_outline",
|
||||
"type": "line",
|
||||
"source": "openmaptiles",
|
||||
"source-layer": "landuse",
|
||||
"minzoom": 13,
|
||||
"layout": {
|
||||
"visibility": "visible"
|
||||
},
|
||||
"paint": {
|
||||
"line-color": [
|
||||
"match",
|
||||
[
|
||||
"get",
|
||||
"class"
|
||||
],
|
||||
"railway",
|
||||
"#c6b3c3",
|
||||
"military",
|
||||
"#ff5555",
|
||||
"residential",
|
||||
"#b9b9b9",
|
||||
"commercial",
|
||||
"#f2dad9",
|
||||
"industrial",
|
||||
"#c6b3c3",
|
||||
"retail",
|
||||
"#d99c95",
|
||||
"school",
|
||||
"#A6A68C",
|
||||
"university",
|
||||
"#A6A68C",
|
||||
"kindergarten",
|
||||
"#A6A68C",
|
||||
"college",
|
||||
"#A6A68C",
|
||||
"hospital",
|
||||
"#A6A68C",
|
||||
"stadium",
|
||||
"#7ca680",
|
||||
"pitch",
|
||||
"#7aaa97",
|
||||
"playground",
|
||||
"#3c6640",
|
||||
"track",
|
||||
"#7aaa96",
|
||||
"theme_park",
|
||||
"#660033",
|
||||
"zoo",
|
||||
"#660033",
|
||||
"dam",
|
||||
"#444444",
|
||||
"#000"
|
||||
],
|
||||
"line-width": [
|
||||
"match",
|
||||
[
|
||||
"get",
|
||||
"class"
|
||||
],
|
||||
"railway",
|
||||
0.7,
|
||||
"military",
|
||||
2,
|
||||
"residential",
|
||||
0.5,
|
||||
"commercial",
|
||||
0.5,
|
||||
"industrial",
|
||||
0.5,
|
||||
"retail",
|
||||
0.5,
|
||||
"school",
|
||||
0.3,
|
||||
"university",
|
||||
0.3,
|
||||
"kindergarten",
|
||||
0.3,
|
||||
"college",
|
||||
0.3,
|
||||
"hospital",
|
||||
0.3,
|
||||
"stadium",
|
||||
0.3,
|
||||
"pitch",
|
||||
0.5,
|
||||
"playground",
|
||||
0.3,
|
||||
"track",
|
||||
0.5,
|
||||
"theme_park",
|
||||
1,
|
||||
"zoo",
|
||||
1,
|
||||
"dam",
|
||||
2,
|
||||
1
|
||||
],
|
||||
"line-offset": [
|
||||
"match",
|
||||
[
|
||||
"get",
|
||||
"class"
|
||||
],
|
||||
"military",
|
||||
1,
|
||||
0
|
||||
],
|
||||
"line-opacity": [
|
||||
"match",
|
||||
[
|
||||
"get",
|
||||
"class"
|
||||
],
|
||||
"military",
|
||||
0.24,
|
||||
1
|
||||
]
|
||||
},
|
||||
"filter": [
|
||||
"all",
|
||||
[
|
||||
"in",
|
||||
"class",
|
||||
"railway",
|
||||
"military",
|
||||
"residential",
|
||||
"commercial",
|
||||
"industrial",
|
||||
"retail",
|
||||
"school",
|
||||
"university",
|
||||
"kindergarten",
|
||||
"college",
|
||||
"hospital",
|
||||
"stadium",
|
||||
"pitch",
|
||||
"playground",
|
||||
"track",
|
||||
"theme_park",
|
||||
"zoo",
|
||||
"dam"
|
||||
]
|
||||
],
|
||||
"order": 26
|
||||
},
|
||||
{
|
||||
"id": "landuse_class_themepark",
|
||||
"type": "line",
|
||||
"source": "openmaptiles",
|
||||
"source-layer": "landuse",
|
||||
"minzoom": 13,
|
||||
"layout": {
|
||||
"line-cap": "square",
|
||||
"line-join": "round",
|
||||
"visibility": "visible"
|
||||
},
|
||||
"paint": {
|
||||
"line-color": "#660033",
|
||||
"line-width": {
|
||||
"stops": [
|
||||
[
|
||||
9,
|
||||
3.5
|
||||
],
|
||||
[
|
||||
14,
|
||||
5.5
|
||||
]
|
||||
]
|
||||
},
|
||||
"line-offset": 2,
|
||||
"line-opacity": {
|
||||
"stops": [
|
||||
[
|
||||
9,
|
||||
0.1
|
||||
],
|
||||
[
|
||||
12,
|
||||
0.3
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"filter": [
|
||||
"all",
|
||||
[
|
||||
"in",
|
||||
"class",
|
||||
"theme_park",
|
||||
"zoo"
|
||||
]
|
||||
],
|
||||
"order": 27
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user