kopia lustrzana https://github.com/openmaptiles/openmaptiles
place=suburb and place=neighbourhood added
rodzic
8fe9af2327
commit
c320b92a4b
|
@ -1,55 +1,55 @@
|
||||||
-- etldoc: ne_50m_urban_areas -> landuse_z4
|
-- etldoc: ne_50m_urban_areas -> landuse_z4
|
||||||
CREATE OR REPLACE VIEW landuse_z4 AS (
|
CREATE OR REPLACE VIEW landuse_z4 AS (
|
||||||
SELECT NULL::bigint AS osm_id, geometry, 'residential'::text AS landuse, NULL::text AS amenity, NULL::text AS leisure, NULL::text AS tourism, scalerank
|
SELECT NULL::bigint AS osm_id, geometry, 'residential'::text AS landuse, NULL::text AS amenity, NULL::text AS leisure, NULL::text AS tourism, NULL::text AS place, scalerank
|
||||||
FROM ne_50m_urban_areas
|
FROM ne_50m_urban_areas
|
||||||
WHERE scalerank <= 2
|
WHERE scalerank <= 2
|
||||||
);
|
);
|
||||||
|
|
||||||
-- etldoc: ne_50m_urban_areas -> landuse_z5
|
-- etldoc: ne_50m_urban_areas -> landuse_z5
|
||||||
CREATE OR REPLACE VIEW landuse_z5 AS (
|
CREATE OR REPLACE VIEW landuse_z5 AS (
|
||||||
SELECT NULL::bigint AS osm_id, geometry, 'residential'::text AS landuse, NULL::text AS amenity, NULL::text AS leisure, NULL::text AS tourism, scalerank
|
SELECT NULL::bigint AS osm_id, geometry, 'residential'::text AS landuse, NULL::text AS amenity, NULL::text AS leisure, NULL::text AS tourism, NULL::text AS place, scalerank
|
||||||
FROM ne_50m_urban_areas
|
FROM ne_50m_urban_areas
|
||||||
);
|
);
|
||||||
|
|
||||||
-- etldoc: ne_10m_urban_areas -> landuse_z6
|
-- etldoc: ne_10m_urban_areas -> landuse_z6
|
||||||
CREATE OR REPLACE VIEW landuse_z6 AS (
|
CREATE OR REPLACE VIEW landuse_z6 AS (
|
||||||
SELECT NULL::bigint AS osm_id, geometry, 'residential'::text AS landuse, NULL::text AS amenity, NULL::text AS leisure, NULL::text AS tourism, scalerank
|
SELECT NULL::bigint AS osm_id, geometry, 'residential'::text AS landuse, NULL::text AS amenity, NULL::text AS leisure, NULL::text AS tourism, NULL::text AS place, scalerank
|
||||||
FROM ne_10m_urban_areas
|
FROM ne_10m_urban_areas
|
||||||
);
|
);
|
||||||
|
|
||||||
-- etldoc: osm_landuse_polygon_gen5 -> landuse_z9
|
-- etldoc: osm_landuse_polygon_gen5 -> landuse_z9
|
||||||
CREATE OR REPLACE VIEW landuse_z9 AS (
|
CREATE OR REPLACE VIEW landuse_z9 AS (
|
||||||
SELECT osm_id, geometry, landuse, amenity, leisure, tourism, NULL::int as scalerank
|
SELECT osm_id, geometry, landuse, amenity, leisure, tourism, place, NULL::int as scalerank
|
||||||
FROM osm_landuse_polygon_gen5
|
FROM osm_landuse_polygon_gen5
|
||||||
);
|
);
|
||||||
|
|
||||||
-- etldoc: osm_landuse_polygon_gen4 -> landuse_z10
|
-- etldoc: osm_landuse_polygon_gen4 -> landuse_z10
|
||||||
CREATE OR REPLACE VIEW landuse_z10 AS (
|
CREATE OR REPLACE VIEW landuse_z10 AS (
|
||||||
SELECT osm_id, geometry, landuse, amenity, leisure, tourism, NULL::int as scalerank
|
SELECT osm_id, geometry, landuse, amenity, leisure, tourism, place, NULL::int as scalerank
|
||||||
FROM osm_landuse_polygon_gen4
|
FROM osm_landuse_polygon_gen4
|
||||||
);
|
);
|
||||||
|
|
||||||
-- etldoc: osm_landuse_polygon_gen3 -> landuse_z11
|
-- etldoc: osm_landuse_polygon_gen3 -> landuse_z11
|
||||||
CREATE OR REPLACE VIEW landuse_z11 AS (
|
CREATE OR REPLACE VIEW landuse_z11 AS (
|
||||||
SELECT osm_id, geometry, landuse, amenity, leisure, tourism, NULL::int as scalerank
|
SELECT osm_id, geometry, landuse, amenity, leisure, tourism, place, NULL::int as scalerank
|
||||||
FROM osm_landuse_polygon_gen3
|
FROM osm_landuse_polygon_gen3
|
||||||
);
|
);
|
||||||
|
|
||||||
-- etldoc: osm_landuse_polygon_gen2 -> landuse_z12
|
-- etldoc: osm_landuse_polygon_gen2 -> landuse_z12
|
||||||
CREATE OR REPLACE VIEW landuse_z12 AS (
|
CREATE OR REPLACE VIEW landuse_z12 AS (
|
||||||
SELECT osm_id, geometry, landuse, amenity, leisure, tourism, NULL::int as scalerank
|
SELECT osm_id, geometry, landuse, amenity, leisure, tourism, place, NULL::int as scalerank
|
||||||
FROM osm_landuse_polygon_gen2
|
FROM osm_landuse_polygon_gen2
|
||||||
);
|
);
|
||||||
|
|
||||||
-- etldoc: osm_landuse_polygon_gen1 -> landuse_z13
|
-- etldoc: osm_landuse_polygon_gen1 -> landuse_z13
|
||||||
CREATE OR REPLACE VIEW landuse_z13 AS (
|
CREATE OR REPLACE VIEW landuse_z13 AS (
|
||||||
SELECT osm_id, geometry, landuse, amenity, leisure,tourism, NULL::int as scalerank
|
SELECT osm_id, geometry, landuse, amenity, leisure, tourism, place, NULL::int as scalerank
|
||||||
FROM osm_landuse_polygon_gen1
|
FROM osm_landuse_polygon_gen1
|
||||||
);
|
);
|
||||||
|
|
||||||
-- etldoc: osm_landuse_polygon -> landuse_z14
|
-- etldoc: osm_landuse_polygon -> landuse_z14
|
||||||
CREATE OR REPLACE VIEW landuse_z14 AS (
|
CREATE OR REPLACE VIEW landuse_z14 AS (
|
||||||
SELECT osm_id, geometry, landuse, amenity, leisure, tourism, NULL::int as scalerank
|
SELECT osm_id, geometry, landuse, amenity, leisure, tourism, place, NULL::int as scalerank
|
||||||
FROM osm_landuse_polygon
|
FROM osm_landuse_polygon
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -63,7 +63,8 @@ RETURNS TABLE(osm_id bigint, geometry geometry, class text) AS $$
|
||||||
NULLIF(landuse, ''),
|
NULLIF(landuse, ''),
|
||||||
NULLIF(amenity, ''),
|
NULLIF(amenity, ''),
|
||||||
NULLIF(leisure, ''),
|
NULLIF(leisure, ''),
|
||||||
NULLIF(tourism, '')
|
NULLIF(tourism, ''),
|
||||||
|
NULLIF(place, '')
|
||||||
) AS class
|
) AS class
|
||||||
FROM (
|
FROM (
|
||||||
-- etldoc: landuse_z4 -> layer_landuse:z4
|
-- etldoc: landuse_z4 -> layer_landuse:z4
|
||||||
|
|
|
@ -9,17 +9,12 @@ layer:
|
||||||
description: |
|
description: |
|
||||||
Use the **class** to assign special colors to areas.
|
Use the **class** to assign special colors to areas.
|
||||||
Original value of either the
|
Original value of either the
|
||||||
[`amenity`](http://wiki.openstreetmap.org/wiki/Key:amenity),
|
|
||||||
[`tourism`](http://wiki.openstreetmap.org/wiki/Key:tourism),
|
|
||||||
[`landuse`](http://wiki.openstreetmap.org/wiki/Key:landuse),
|
[`landuse`](http://wiki.openstreetmap.org/wiki/Key:landuse),
|
||||||
or [`leisure`](http://wiki.openstreetmap.org/wiki/Key:leisure) tag.
|
[`amenity`](http://wiki.openstreetmap.org/wiki/Key:amenity),
|
||||||
|
[`leisure`](http://wiki.openstreetmap.org/wiki/Key:leisure),
|
||||||
|
[`tourism`](http://wiki.openstreetmap.org/wiki/Key:tourism),
|
||||||
|
or [`place`](http://wiki.openstreetmap.org/wiki/Key:place) tag.
|
||||||
values:
|
values:
|
||||||
- school
|
|
||||||
- university
|
|
||||||
- kindergarten
|
|
||||||
- college
|
|
||||||
- library
|
|
||||||
- hospital
|
|
||||||
- railway
|
- railway
|
||||||
- cemetery
|
- cemetery
|
||||||
- military
|
- military
|
||||||
|
@ -27,12 +22,20 @@ layer:
|
||||||
- commercial
|
- commercial
|
||||||
- industrial
|
- industrial
|
||||||
- retail
|
- retail
|
||||||
|
- bus_station
|
||||||
|
- school
|
||||||
|
- university
|
||||||
|
- kindergarten
|
||||||
|
- college
|
||||||
|
- library
|
||||||
|
- hospital
|
||||||
- stadium
|
- stadium
|
||||||
- pitch
|
- pitch
|
||||||
- playground
|
- playground
|
||||||
- theme_park
|
- theme_park
|
||||||
- bus_station
|
|
||||||
- zoo
|
- zoo
|
||||||
|
- suburb
|
||||||
|
- neighbourhood
|
||||||
datasource:
|
datasource:
|
||||||
geometry_field: geometry
|
geometry_field: geometry
|
||||||
query: (SELECT geometry, class FROM layer_landuse(!bbox!, z(!scale_denominator!))) AS t
|
query: (SELECT geometry, class FROM layer_landuse(!bbox!, z(!scale_denominator!))) AS t
|
||||||
|
|
|
@ -46,19 +46,14 @@ tables:
|
||||||
- name: tourism
|
- name: tourism
|
||||||
key: tourism
|
key: tourism
|
||||||
type: string
|
type: string
|
||||||
|
- name: place
|
||||||
|
key: place
|
||||||
|
type: string
|
||||||
- name: area
|
- name: area
|
||||||
type: area
|
type: area
|
||||||
- name: webmerc_area
|
- name: webmerc_area
|
||||||
type: webmerc_area
|
type: webmerc_area
|
||||||
mapping:
|
mapping:
|
||||||
amenity:
|
|
||||||
- bus_station
|
|
||||||
- school
|
|
||||||
- university
|
|
||||||
- kindergarten
|
|
||||||
- college
|
|
||||||
- library
|
|
||||||
- hospital
|
|
||||||
landuse:
|
landuse:
|
||||||
- railway
|
- railway
|
||||||
- cemetery
|
- cemetery
|
||||||
|
@ -68,6 +63,14 @@ tables:
|
||||||
- commercial
|
- commercial
|
||||||
- industrial
|
- industrial
|
||||||
- retail
|
- retail
|
||||||
|
amenity:
|
||||||
|
- bus_station
|
||||||
|
- school
|
||||||
|
- university
|
||||||
|
- kindergarten
|
||||||
|
- college
|
||||||
|
- library
|
||||||
|
- hospital
|
||||||
leisure:
|
leisure:
|
||||||
- stadium
|
- stadium
|
||||||
- pitch
|
- pitch
|
||||||
|
@ -75,3 +78,6 @@ tables:
|
||||||
tourism:
|
tourism:
|
||||||
- theme_park
|
- theme_park
|
||||||
- zoo
|
- zoo
|
||||||
|
place:
|
||||||
|
- suburb
|
||||||
|
- neighbourhood
|
||||||
|
|
Ładowanie…
Reference in New Issue