Merge branch 'master' into quickstart_v2

pull/32/head
ImreSamu 2016-12-02 13:21:27 +01:00
commit d22bacaa6a
10 zmienionych plików z 97 dodań i 4 usunięć

Wyświetl plik

@ -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)
- [landcover](https://github.com/openmaptiles/openmaptiles/wiki/landcover)
- [landuse](https://github.com/openmaptiles/openmaptiles/wiki/landuse)
- [aeroway](https://github.com/openmaptiles/openmaptiles/wiki/aeroway)
- [place](https://github.com/openmaptiles/openmaptiles/wiki/place)
- [poi](https://github.com/openmaptiles/openmaptiles/wiki/poi)
- [park](https://github.com/openmaptiles/openmaptiles/wiki/park)

Wyświetl plik

@ -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

Wyświetl plik

@ -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;

Wyświetl plik

@ -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

Wyświetl plik

@ -10,7 +10,13 @@ layer:
admin_level: |
OSM [admin_level](http://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative#admin_level)
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.
disputed:
description: |
Mark with `1` if the boundary is disputed.
values: [0, 1]
buffer_size: 4
datasource:
geometry_field: geometry

Wyświetl plik

@ -37,6 +37,10 @@ tables:
- __any__
building:
- __any__
# these aeroway polygons all imply building=yes
aeroway:
- terminal
- hangar
filters:
exclude_tags:
- [ "building", "no" ]

Wyświetl plik

@ -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 ('unclassified', 'residential', 'living_street', 'road') THEN 'minor'
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
END;
$$ LANGUAGE SQL IMMUTABLE STRICT;

Wyświetl plik

@ -15,7 +15,8 @@ RETURNS TABLE(osm_id bigint, geometry geometry, class text, subclass text, ramp
END AS class,
COALESCE(NULLIF(highway,''), NULLIF(railway, '')) AS subclass,
-- 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,
brunnel(is_bridge, is_tunnel, is_ford) AS brunnel,
NULLIF(service, '') AS service

Wyświetl plik

@ -129,7 +129,6 @@ tables:
- road
- living_street
- raceway
- construction
- track
- service
- path
@ -137,8 +136,8 @@ tables:
- bridleway
- footway
- corridor
- crossing
- pedestrian
- steps
# etldoc: imposm3 -> osm_railway_linestring
railway_linestring:

Wyświetl plik

@ -13,6 +13,7 @@ tileset:
- layers/landcover/landcover.yaml
- layers/park/park.yaml
- layers/landuse/landuse.yaml
- layers/aeroway/aeroway.yaml
name: OpenMapTiles v1.0
description: "A tileset showcasing all layers in OpenMapTiles. http://openmaptiles.org"
attribution: "<a href=\"http://www.openstreetmap.org/about/\" target=\"_blank\">&copy; OpenStreetMap contributors</a>"