openmaptiles/layers/transportation/mapping.yaml

361 wiersze
6.9 KiB
YAML

generalized_tables:
# etldoc: imposm3 -> osm_railway_linestring_gen5
railway_linestring_gen5:
source: railway_linestring_gen4
tolerance: ZRES9
# etldoc: imposm3 -> osm_railway_linestring_gen4
railway_linestring_gen4:
source: railway_linestring_gen3
tolerance: ZRES10
# etldoc: imposm3 -> osm_railway_linestring_gen3
railway_linestring_gen3:
source: railway_linestring_gen2
tolerance: ZRES11
# etldoc: imposm3 -> osm_railway_linestring_gen2
railway_linestring_gen2:
source: railway_linestring_gen1
tolerance: ZRES12
# etldoc: imposm3 -> osm_railway_linestring_gen1
railway_linestring_gen1:
source: railway_linestring
sql_filter: railway IN ('rail', 'narrow_gauge', 'light_rail') AND service='' AND ST_IsValid(geometry)
tolerance: ZRES13
# etldoc: imposm3 -> osm_aerialway_linestring_gen1
aerialway_linestring_gen1:
source: aerialway_linestring
sql_filter: ST_IsValid(geometry)
tolerance: ZRES13
# etldoc: imposm3 -> osm_shipway_linestring_gen2
shipway_linestring_gen2:
source: shipway_linestring_gen1
tolerance: ZRES12
# etldoc: imposm3 -> osm_shipway_linestring_gen1
shipway_linestring_gen1:
source: shipway_linestring
sql_filter: ST_IsValid(geometry)
tolerance: ZRES13
# etldoc: imposm3 -> osm_highway_linestring_gen2
highway_linestring_gen2:
source: highway_linestring_gen1
sql_filter: highway IN ('motorway', 'trunk', 'primary', 'secondary', 'motorway_link', 'trunk_link', 'primary_link', 'secondary_link') AND NOT is_area
tolerance: ZRES11
# etldoc: imposm3 -> osm_highway_linestring_gen1
highway_linestring_gen1:
source: highway_linestring
sql_filter: highway IN ('motorway', 'trunk', 'primary', 'secondary', 'tertiary', 'motorway_link', 'trunk_link', 'primary_link', 'secondary_link', 'tertiary_link') AND NOT is_area AND ST_IsValid(geometry)
tolerance: ZRES12
name_field: &name
name: name
key: name
type: string
name_en_field: &name_en
name: name_en
key: name:en
type: string
name_de_field: &name_de
name: name_de
key: name:de
type: string
short_name_field: &short_name
key: short_name
name: short_name
type: string
tunnel_field: &tunnel
key: tunnel
name: is_tunnel
type: bool
bridge_field: &bridge
key: bridge
name: is_bridge
type: bool
ramp_field: &ramp
key: ramp
name: is_ramp
type: bool
ford_field: &ford
key: ford
name: is_ford
type: bool
oneway_field: &oneway
key: oneway
name: is_oneway
type: direction
area_field: &area
name: is_area
key: area
type: bool
service_field: &service
key: service
name: service
type: string
usage_field: &usage
key: usage
name: usage
type: string
public_transport_field: &public_transport
key: public_transport
name: public_transport
type: string
ref_field: &ref
key: ref
name: ref
type: string
network_field: &network
key: network
name: network
type: string
layer_field: &layer
key: layer
name: layer
type: integer
level_field: &level
key: level
name: level
type: integer
indoor_field: &indoor
key: indoor
name: indoor
type: bool
man_made_field: &man_made
key: man_made
name: man_made
type: string
z_order_field: &z_order
name: z_order
type: wayzorder
tables:
# etldoc: imposm3 -> osm_highway_linestring
highway_linestring:
type: linestring
fields:
- name: osm_id
type: id
- name: geometry
type: geometry
- name: highway
key: highway
type: string
- *ref
- *network
- *z_order
- *layer
- *level
- *indoor
- *name
- *name_en
- *name_de
- name: tags
type: hstore_tags
- *short_name
- *tunnel
- *bridge
- *ramp
- *ford
- *oneway
- *area
- *service
- *usage
- *public_transport
- *man_made
mapping:
highway:
- motorway
- motorway_link
- trunk
- trunk_link
- primary
- primary_link
- secondary
- secondary_link
- tertiary
- tertiary_link
- unclassified
- residential
- road
- living_street
- raceway
- track
- service
- path
- cycleway
- bridleway
- footway
- corridor
- pedestrian
- steps
public_transport:
- platform
man_made:
- pier
# etldoc: imposm3 -> osm_railway_linestring
railway_linestring:
type: linestring
fields:
- name: osm_id
type: id
- name: geometry
type: geometry
- key: railway
name: railway
type: string
- *ref
- *network
- *z_order
- *layer
- *level
- *indoor
- *name
- *name_en
- *name_de
- name: tags
type: hstore_tags
- *short_name
- *tunnel
- *bridge
- *ramp
- *ford
- *oneway
- *area
- *service
- *usage
mapping:
railway:
- rail
- narrow_gauge
- preserved
- funicular
- subway
- light_rail
- 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
- name: tags
type: hstore_tags
- *short_name
- *tunnel
- *bridge
- *ramp
- *ford
- *oneway
- *area
- *service
- *usage
mapping:
aerialway:
- cable_car
# etldoc: imposm3 -> osm_shipway_linestring
shipway_linestring:
type: linestring
fields:
- name: osm_id
type: id
- name: geometry
type: geometry
- key: route
name: shipway
type: string
- *z_order
- *layer
- *name
- *name_en
- *name_de
- name: tags
type: hstore_tags
- *short_name
- *tunnel
- *bridge
- *ramp
- *ford
- *oneway
- *area
- *service
- *usage
mapping:
route:
- ferry
# etldoc: imposm3 -> osm_highway_polygon
highway_polygon:
type: polygon
fields:
- name: osm_id
type: id
- name: geometry
type: geometry
- name: highway
key: highway
type: string
- name: z_order
type: wayzorder
- *layer
- *level
- *indoor
- name: is_area
key: area
type: bool
- *public_transport
- *man_made
mapping:
highway:
- path
- cycleway
- bridleway
- footway
- corridor
- pedestrian
- steps
public_transport:
- platform
man_made:
- bridge
- pier
# TODO: Future table for joining networks
# etldoc: imposm3 -> osm_route_member
route_member:
type: relation_member
columns:
- name: osm_id
type: id
- name: member
type: member_id
- name: role
type: member_role
- name: type
type: member_type
- *ref
- *network
- *name
mapping:
route:
- road