Add aerialways (cable cars) to transportation

pull/351/head
jirik 2017-09-22 14:41:18 +02:00 zatwierdzone przez Jiri Kozel
rodzic 137667b235
commit 634de5e474
5 zmienionych plików z 84 dodań i 18 usunięć

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 273 KiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 316 KiB

Wyświetl plik

@ -13,6 +13,7 @@ ramp int, oneway int, brunnel TEXT, service TEXT) AS $$
CASE
WHEN highway IS NOT NULL THEN highway_class(highway)
WHEN railway IS NOT NULL THEN railway_class(railway)
WHEN aerialway IS NOT NULL THEN aerialway
END AS class,
CASE
WHEN railway IS NOT NULL THEN railway
@ -27,7 +28,8 @@ ramp int, oneway int, brunnel TEXT, service TEXT) AS $$
FROM (
-- etldoc: osm_transportation_merge_linestring_gen7 -> layer_transportation:z4
SELECT
osm_id, geometry, highway, NULL AS railway, NULL AS service,
osm_id, geometry, highway, NULL AS railway, NULL AS aerialway,
NULL AS service,
NULL::boolean AS is_bridge, NULL::boolean AS is_tunnel,
NULL::boolean AS is_ford,
NULL::boolean AS is_ramp, NULL::boolean AS is_oneway,
@ -38,7 +40,8 @@ ramp int, oneway int, brunnel TEXT, service TEXT) AS $$
-- etldoc: osm_transportation_merge_linestring_gen6 -> layer_transportation:z5
SELECT
osm_id, geometry, highway, NULL AS railway, NULL AS service,
osm_id, geometry, highway, NULL AS railway, NULL AS aerialway,
NULL AS service,
NULL::boolean AS is_bridge, NULL::boolean AS is_tunnel,
NULL::boolean AS is_ford,
NULL::boolean AS is_ramp, NULL::boolean AS is_oneway,
@ -49,7 +52,8 @@ ramp int, oneway int, brunnel TEXT, service TEXT) AS $$
-- etldoc: osm_transportation_merge_linestring_gen5 -> layer_transportation:z6
SELECT
osm_id, geometry, highway, NULL AS railway, NULL AS service,
osm_id, geometry, highway, NULL AS railway, NULL AS aerialway,
NULL AS service,
NULL::boolean AS is_bridge, NULL::boolean AS is_tunnel,
NULL::boolean AS is_ford,
NULL::boolean AS is_ramp, NULL::boolean AS is_oneway,
@ -60,7 +64,8 @@ ramp int, oneway int, brunnel TEXT, service TEXT) AS $$
-- etldoc: osm_transportation_merge_linestring_gen4 -> layer_transportation:z7
SELECT
osm_id, geometry, highway, NULL AS railway, NULL AS service,
osm_id, geometry, highway, NULL AS railway, NULL AS aerialway,
NULL AS service,
NULL::boolean AS is_bridge, NULL::boolean AS is_tunnel,
NULL::boolean AS is_ford,
NULL::boolean AS is_ramp, NULL::boolean AS is_oneway,
@ -71,7 +76,8 @@ ramp int, oneway int, brunnel TEXT, service TEXT) AS $$
-- etldoc: osm_transportation_merge_linestring_gen3 -> layer_transportation:z8
SELECT
osm_id, geometry, highway, NULL AS railway, NULL AS service,
osm_id, geometry, highway, NULL AS railway, NULL AS aerialway,
NULL AS service,
NULL::boolean AS is_bridge, NULL::boolean AS is_tunnel,
NULL::boolean AS is_ford,
NULL::boolean AS is_ramp, NULL::boolean AS is_oneway,
@ -83,7 +89,8 @@ ramp int, oneway int, brunnel TEXT, service TEXT) AS $$
-- etldoc: osm_highway_linestring_gen2 -> layer_transportation:z9
-- etldoc: osm_highway_linestring_gen2 -> layer_transportation:z10
SELECT
osm_id, geometry, highway, NULL AS railway, NULL AS service,
osm_id, geometry, highway, NULL AS railway, NULL AS aerialway,
NULL AS service,
NULL::boolean AS is_bridge, NULL::boolean AS is_tunnel,
NULL::boolean AS is_ford,
NULL::boolean AS is_ramp, NULL::boolean AS is_oneway,
@ -95,7 +102,8 @@ ramp int, oneway int, brunnel TEXT, service TEXT) AS $$
-- etldoc: osm_highway_linestring_gen1 -> layer_transportation:z11
SELECT
osm_id, geometry, highway, NULL AS railway, NULL AS service,
osm_id, geometry, highway, NULL AS railway, NULL AS aerialway,
NULL AS service,
NULL::boolean AS is_bridge, NULL::boolean AS is_tunnel,
NULL::boolean AS is_ford,
NULL::boolean AS is_ramp, NULL::boolean AS is_oneway,
@ -109,7 +117,7 @@ ramp int, oneway int, brunnel TEXT, service TEXT) AS $$
-- etldoc: osm_highway_linestring -> layer_transportation:z13
-- etldoc: osm_highway_linestring -> layer_transportation:z14_
SELECT
osm_id, geometry, highway, NULL AS railway,
osm_id, geometry, highway, NULL AS railway, NULL AS aerialway,
service_value(service) AS service,
is_bridge, is_tunnel, is_ford, is_ramp, is_oneway, z_order
FROM osm_highway_linestring
@ -125,7 +133,7 @@ ramp int, oneway int, brunnel TEXT, service TEXT) AS $$
-- etldoc: osm_railway_linestring_gen5 -> layer_transportation:z8
SELECT
osm_id, geometry, NULL AS highway, railway,
osm_id, geometry, NULL AS highway, railway, NULL AS aerialway,
service_value(service) AS service,
NULL::boolean AS is_bridge, NULL::boolean AS is_tunnel,
NULL::boolean AS is_ford,
@ -138,7 +146,7 @@ ramp int, oneway int, brunnel TEXT, service TEXT) AS $$
-- etldoc: osm_railway_linestring_gen4 -> layer_transportation:z9
SELECT
osm_id, geometry, NULL AS highway, railway,
osm_id, geometry, NULL AS highway, railway, NULL AS aerialway,
service_value(service) AS service,
NULL::boolean AS is_bridge, NULL::boolean AS is_tunnel,
NULL::boolean AS is_ford,
@ -151,7 +159,7 @@ ramp int, oneway int, brunnel TEXT, service TEXT) AS $$
-- etldoc: osm_railway_linestring_gen3 -> layer_transportation:z10
SELECT
osm_id, geometry, NULL AS highway, railway,
osm_id, geometry, NULL AS highway, railway, NULL AS aerialway,
service_value(service) AS service,
is_bridge, is_tunnel, is_ford, is_ramp, is_oneway, z_order
FROM osm_railway_linestring_gen3
@ -161,7 +169,7 @@ ramp int, oneway int, brunnel TEXT, service TEXT) AS $$
-- etldoc: osm_railway_linestring_gen2 -> layer_transportation:z11
SELECT
osm_id, geometry, NULL AS highway, railway,
osm_id, geometry, NULL AS highway, railway, NULL AS aerialway,
service_value(service) AS service,
is_bridge, is_tunnel, is_ford, is_ramp, is_oneway, z_order
FROM osm_railway_linestring_gen2
@ -171,7 +179,7 @@ ramp int, oneway int, brunnel TEXT, service TEXT) AS $$
-- etldoc: osm_railway_linestring_gen1 -> layer_transportation:z12
SELECT
osm_id, geometry, NULL AS highway, railway,
osm_id, geometry, NULL AS highway, railway, NULL AS aerialway,
service_value(service) AS service,
is_bridge, is_tunnel, is_ford, is_ramp, is_oneway, z_order
FROM osm_railway_linestring_gen1
@ -182,7 +190,7 @@ ramp int, oneway int, brunnel TEXT, service TEXT) AS $$
-- etldoc: osm_railway_linestring -> layer_transportation:z13
-- etldoc: osm_railway_linestring -> layer_transportation:z14_
SELECT
osm_id, geometry, NULL AS highway, railway,
osm_id, geometry, NULL AS highway, railway, NULL AS aerialway,
service_value(service) AS service,
is_bridge, is_tunnel, is_ford, is_ramp, is_oneway, z_order
FROM osm_railway_linestring
@ -191,6 +199,27 @@ ramp int, oneway int, brunnel TEXT, service TEXT) AS $$
OR zoom_Level >= 14
UNION ALL
-- etldoc: osm_aerialway_linestring_gen1 -> layer_transportation:z12
SELECT
osm_id, geometry, NULL AS highway, NULL as railway,
aerialway,
service_value(service) AS service,
is_bridge, is_tunnel, is_ford, is_ramp, is_oneway, z_order
FROM osm_aerialway_linestring_gen1
WHERE zoom_level = 12
UNION ALL
-- etldoc: osm_aerialway_linestring -> layer_transportation:z13
-- etldoc: osm_aerialway_linestring -> layer_transportation:z14_
SELECT
osm_id, geometry, NULL AS highway, NULL as railway,
aerialway,
service_value(service) AS service,
is_bridge, is_tunnel, is_ford, is_ramp, is_oneway, z_order
FROM osm_aerialway_linestring
WHERE zoom_level >= 13
UNION ALL
-- NOTE: We limit the selection of polys because we need to be
-- careful to net get false positives here because
-- it is possible that closed linestrings appear both as
@ -199,7 +228,8 @@ ramp int, oneway int, brunnel TEXT, service TEXT) AS $$
-- etldoc: osm_highway_polygon -> layer_transportation:z14_
SELECT
osm_id, geometry,
highway, NULL AS railway, NULL AS service,
highway, NULL AS railway, NULL AS aerialway,
NULL AS service,
FALSE AS is_bridge, FALSE AS is_tunnel, FALSE AS is_ford,
FALSE AS is_ramp, FALSE AS is_oneway, z_order
FROM osm_highway_polygon

Wyświetl plik

@ -25,6 +25,11 @@ generalized_tables:
sql_filter: railway IN ('rail', 'narrow_gauge', 'light_rail') AND service=''
tolerance: ZRES13
# etldoc: imposm3 -> osm_aerialway_linestring_gen1
aerialway_linestring_gen1:
source: aerialway_linestring
tolerance: ZRES13
# etldoc: imposm3 -> osm_highway_linestring_gen2
highway_linestring_gen2:
source: highway_linestring_gen1
@ -194,6 +199,35 @@ tables:
- monorail
- tram
# etldoc: imposm3 -> osm_aerialway_linestring
aerialway_linestring:
type: linestring
fields:
- name: osm_id
type: id
- name: geometry
type: geometry
- key: aerialway
name: aerialway
type: string
- *z_order
- *layer
- *name
- *name_en
- *name_de
- *short_name
- *tunnel
- *bridge
- *ramp
- *ford
- *oneway
- *area
- *service
- *usage
mapping:
aerialway:
- cable_car
# etldoc: imposm3 -> osm_highway_polygon
highway_polygon:
type: polygon

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 56 KiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 68 KiB

Wyświetl plik

@ -1,7 +1,7 @@
layer:
id: "transportation"
description: |
**transportation** contains roads and railways.
**transportation** contains roads, railways, and aerialways.
This layer is directly derived from the OSM road hierarchy.
At lower zoom levels major highways from Natural Earth are used.
It contains all roads from motorways to primary, secondary and
@ -15,8 +15,9 @@ layer:
description: |
Distinguish between more and less important roads or railways.
Class is derived from the value of the
[`highway`](http://wiki.openstreetmap.org/wiki/Key:highway) or
[`railway`](http://wiki.openstreetmap.org/wiki/Key:railway) tag.
[`highway`](http://wiki.openstreetmap.org/wiki/Key:highway),
[`railway`](http://wiki.openstreetmap.org/wiki/Key:railway), or
[`aerialway`](http://wiki.openstreetmap.org/wiki/Key:aerialway) tag.
values:
- motorway
- trunk
@ -30,6 +31,7 @@ layer:
- raceway
- rail
- transit
- cable_car
subclass:
description: |
Distinguish more specific railway classes: