Merge branch 'master' into quickstart_v2
This commit is contained in:
commit
d22bacaa6a
@ -31,6 +31,7 @@ Layers can be chosen to create a **Tileset** like the `openmaptiles.yaml` tilese
|
|||||||
- [housenumber](https://github.com/openmaptiles/openmaptiles/wiki/housenumber)
|
- [housenumber](https://github.com/openmaptiles/openmaptiles/wiki/housenumber)
|
||||||
- [landcover](https://github.com/openmaptiles/openmaptiles/wiki/landcover)
|
- [landcover](https://github.com/openmaptiles/openmaptiles/wiki/landcover)
|
||||||
- [landuse](https://github.com/openmaptiles/openmaptiles/wiki/landuse)
|
- [landuse](https://github.com/openmaptiles/openmaptiles/wiki/landuse)
|
||||||
|
- [aeroway](https://github.com/openmaptiles/openmaptiles/wiki/aeroway)
|
||||||
- [place](https://github.com/openmaptiles/openmaptiles/wiki/place)
|
- [place](https://github.com/openmaptiles/openmaptiles/wiki/place)
|
||||||
- [poi](https://github.com/openmaptiles/openmaptiles/wiki/poi)
|
- [poi](https://github.com/openmaptiles/openmaptiles/wiki/poi)
|
||||||
- [park](https://github.com/openmaptiles/openmaptiles/wiki/park)
|
- [park](https://github.com/openmaptiles/openmaptiles/wiki/park)
|
||||||
|
|||||||
26
layers/aeroway/aeroway.yaml
Normal file
26
layers/aeroway/aeroway.yaml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
layer:
|
||||||
|
id: "aeroway"
|
||||||
|
description: |
|
||||||
|
Aeroway polygons based of OpenStreetMap [aeroways](http://wiki.openstreetmap.org/wiki/Aeroways).
|
||||||
|
Airport buildings are contained in the **building** layer but all
|
||||||
|
other airport related polygons can be found in the **aeroway** layer.
|
||||||
|
buffer_size: 4
|
||||||
|
fields:
|
||||||
|
class:
|
||||||
|
description: |
|
||||||
|
The original value of the [`aeroway`](http://wiki.openstreetmap.org/wiki/Key:aeroway) tag.
|
||||||
|
values:
|
||||||
|
- aerodrome
|
||||||
|
- heliport
|
||||||
|
- runway
|
||||||
|
- helipad
|
||||||
|
- taxiway
|
||||||
|
- apron
|
||||||
|
datasource:
|
||||||
|
geometry_field: geometry
|
||||||
|
query: (SELECT geometry, class FROM layer_aeroway(!bbox!, z(!scale_denominator!))) AS t
|
||||||
|
schema:
|
||||||
|
- ./layer.sql
|
||||||
|
datasources:
|
||||||
|
- type: imposm3
|
||||||
|
mapping_file: ./mapping.yaml
|
||||||
20
layers/aeroway/layer.sql
Normal file
20
layers/aeroway/layer.sql
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
-- etldoc: layer_aeroway[shape=record fillcolor=lightpink, style="rounded,filled",
|
||||||
|
-- etldoc: label="layer_aeroway |<z12> z12|<z13> z13|<z14_> z14+" ];
|
||||||
|
|
||||||
|
CREATE OR REPLACE FUNCTION layer_aeroway(bbox geometry, zoom_level int)
|
||||||
|
RETURNS TABLE(geometry geometry, class text) AS $$
|
||||||
|
SELECT geometry, aeroway AS class FROM (
|
||||||
|
-- etldoc: aeroway_z12 -> layer_aeroway:z12
|
||||||
|
SELECT geometry, aeroway
|
||||||
|
FROM osm_aeroway_polygon_gen2 WHERE zoom_level = 12
|
||||||
|
UNION ALL
|
||||||
|
-- etldoc: aeroway_z13 -> layer_aeroway:z13
|
||||||
|
SELECT geometry, aeroway
|
||||||
|
FROM osm_aeroway_polygon_gen1 WHERE zoom_level = 13
|
||||||
|
UNION ALL
|
||||||
|
-- etldoc: aeroway_z14 -> layer_aeroway:z14_
|
||||||
|
SELECT geometry, aeroway
|
||||||
|
FROM osm_aeroway_polygon WHERE zoom_level >= 14
|
||||||
|
) AS zoom_levels
|
||||||
|
WHERE geometry && bbox;
|
||||||
|
$$ LANGUAGE SQL IMMUTABLE;
|
||||||
34
layers/aeroway/mapping.yaml
Normal file
34
layers/aeroway/mapping.yaml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
generalized_tables:
|
||||||
|
# etldoc: imposm3 -> osm_landcover_polygon_gen2
|
||||||
|
aeroway_polygon_gen2:
|
||||||
|
source: aeroway_polygon_gen1
|
||||||
|
sql_filter: area>240000
|
||||||
|
tolerance: 50.0
|
||||||
|
|
||||||
|
# etldoc: imposm3 -> osm_aeroway_polygon_gen1
|
||||||
|
aeroway_polygon_gen1:
|
||||||
|
source: aeroway_polygon
|
||||||
|
sql_filter: area>60000
|
||||||
|
tolerance: 20.0
|
||||||
|
tables:
|
||||||
|
# etldoc: imposm3 -> osm_aeroway_polygon
|
||||||
|
aeroway_polygon:
|
||||||
|
type: polygon
|
||||||
|
fields:
|
||||||
|
- name: osm_id
|
||||||
|
type: id
|
||||||
|
- name: geometry
|
||||||
|
type: geometry
|
||||||
|
- name: aeroway
|
||||||
|
key: aeroway
|
||||||
|
type: string
|
||||||
|
- name: area
|
||||||
|
type: pseudoarea
|
||||||
|
mapping:
|
||||||
|
aeroway:
|
||||||
|
- aerodrome
|
||||||
|
- heliport
|
||||||
|
- runway
|
||||||
|
- helipad
|
||||||
|
- taxiway
|
||||||
|
- apron
|
||||||
@ -10,7 +10,13 @@ layer:
|
|||||||
admin_level: |
|
admin_level: |
|
||||||
OSM [admin_level](http://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative#admin_level)
|
OSM [admin_level](http://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative#admin_level)
|
||||||
indicating the level of importance of this boundary.
|
indicating the level of importance of this boundary.
|
||||||
|
The `admin_level` corresponds to the lowest `admin_level`
|
||||||
|
the line participates in.
|
||||||
At low zoom levels the Natural Earth boundaries are mapped to the equivalent admin levels.
|
At low zoom levels the Natural Earth boundaries are mapped to the equivalent admin levels.
|
||||||
|
disputed:
|
||||||
|
description: |
|
||||||
|
Mark with `1` if the boundary is disputed.
|
||||||
|
values: [0, 1]
|
||||||
buffer_size: 4
|
buffer_size: 4
|
||||||
datasource:
|
datasource:
|
||||||
geometry_field: geometry
|
geometry_field: geometry
|
||||||
|
|||||||
@ -37,6 +37,10 @@ tables:
|
|||||||
- __any__
|
- __any__
|
||||||
building:
|
building:
|
||||||
- __any__
|
- __any__
|
||||||
|
# these aeroway polygons all imply building=yes
|
||||||
|
aeroway:
|
||||||
|
- terminal
|
||||||
|
- hangar
|
||||||
filters:
|
filters:
|
||||||
exclude_tags:
|
exclude_tags:
|
||||||
- [ "building", "no" ]
|
- [ "building", "no" ]
|
||||||
|
|||||||
@ -18,7 +18,8 @@ CREATE OR REPLACE FUNCTION highway_class(highway TEXT) RETURNS TEXT AS $$
|
|||||||
WHEN highway IN ('tertiary', 'tertiary_link') THEN 'tertiary'
|
WHEN highway IN ('tertiary', 'tertiary_link') THEN 'tertiary'
|
||||||
WHEN highway IN ('unclassified', 'residential', 'living_street', 'road') THEN 'minor'
|
WHEN highway IN ('unclassified', 'residential', 'living_street', 'road') THEN 'minor'
|
||||||
WHEN highway IN ('service', 'track') THEN highway
|
WHEN highway IN ('service', 'track') THEN highway
|
||||||
WHEN highway IN ('pedestrian', 'path', 'footway', 'cycleway', 'steps') THEN 'path'
|
WHEN highway IN ('pedestrian', 'path', 'footway', 'cycleway', 'steps', 'bridleway', 'corridor') THEN 'path'
|
||||||
|
WHEN highway = 'raceway' THEN 'raceway'
|
||||||
ELSE NULL
|
ELSE NULL
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE SQL IMMUTABLE STRICT;
|
$$ LANGUAGE SQL IMMUTABLE STRICT;
|
||||||
|
|||||||
@ -15,7 +15,8 @@ RETURNS TABLE(osm_id bigint, geometry geometry, class text, subclass text, ramp
|
|||||||
END AS class,
|
END AS class,
|
||||||
COALESCE(NULLIF(highway,''), NULLIF(railway, '')) AS subclass,
|
COALESCE(NULLIF(highway,''), NULLIF(railway, '')) AS subclass,
|
||||||
-- All links are considered as ramps as well
|
-- All links are considered as ramps as well
|
||||||
CASE WHEN highway_is_link(highway) THEN 1 ELSE is_ramp::int END AS ramp,
|
CASE WHEN highway_is_link(highway) OR highway = 'steps'
|
||||||
|
THEN 1 ELSE is_ramp::int END AS ramp,
|
||||||
is_oneway::int AS oneway,
|
is_oneway::int AS oneway,
|
||||||
brunnel(is_bridge, is_tunnel, is_ford) AS brunnel,
|
brunnel(is_bridge, is_tunnel, is_ford) AS brunnel,
|
||||||
NULLIF(service, '') AS service
|
NULLIF(service, '') AS service
|
||||||
|
|||||||
@ -129,7 +129,6 @@ tables:
|
|||||||
- road
|
- road
|
||||||
- living_street
|
- living_street
|
||||||
- raceway
|
- raceway
|
||||||
- construction
|
|
||||||
- track
|
- track
|
||||||
- service
|
- service
|
||||||
- path
|
- path
|
||||||
@ -137,8 +136,8 @@ tables:
|
|||||||
- bridleway
|
- bridleway
|
||||||
- footway
|
- footway
|
||||||
- corridor
|
- corridor
|
||||||
- crossing
|
|
||||||
- pedestrian
|
- pedestrian
|
||||||
|
- steps
|
||||||
|
|
||||||
# etldoc: imposm3 -> osm_railway_linestring
|
# etldoc: imposm3 -> osm_railway_linestring
|
||||||
railway_linestring:
|
railway_linestring:
|
||||||
|
|||||||
@ -13,6 +13,7 @@ tileset:
|
|||||||
- layers/landcover/landcover.yaml
|
- layers/landcover/landcover.yaml
|
||||||
- layers/park/park.yaml
|
- layers/park/park.yaml
|
||||||
- layers/landuse/landuse.yaml
|
- layers/landuse/landuse.yaml
|
||||||
|
- layers/aeroway/aeroway.yaml
|
||||||
name: OpenMapTiles v1.0
|
name: OpenMapTiles v1.0
|
||||||
description: "A tileset showcasing all layers in OpenMapTiles. http://openmaptiles.org"
|
description: "A tileset showcasing all layers in OpenMapTiles. http://openmaptiles.org"
|
||||||
attribution: "<a href=\"http://www.openstreetmap.org/about/\" target=\"_blank\">© OpenStreetMap contributors</a>"
|
attribution: "<a href=\"http://www.openstreetmap.org/about/\" target=\"_blank\">© OpenStreetMap contributors</a>"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user