Skip to content

Instantly share code, notes, and snippets.

@das-g
Last active April 20, 2016 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save das-g/ddc7b52bb27e10ecd4c9e12d000f6509 to your computer and use it in GitHub Desktop.
Save das-g/ddc7b52bb27e10ecd4c9e12d000f6509 to your computer and use it in GitHub Desktop.
Draft for the OSMaxx schema description in YAML
---
layers:
"geoname_p": &layer_geoname_p
# == OSMaxx SQL table name == Layer name in exports
attributes:
"population":
type: int
"wikipedia":
type: text
"type":
type: text
values:
"city":
osm_tags:
- "place": "city"
description: >
The largest urban settlement or settlements within the territory.
"named_place":
osm_tags:
- "area": "yes"
# Just a string means complete tag (here: name=*)
# independent of value.
- "name"
"place":
osm_tags:
# Just a string means complete tag (here: place=*)
# independent of value.
- "place"
"geoname_l": *layer_geoname_p
"misc_l":
attributes:
"type":
type: text
values:
"barrier":
osm_tags:
- "barrier"
correlated_attributes:
# key: attribute name, value: attribute value
"aggtype": "barrier"
description: >
A barrier is a physical structure which blocks
or impedes movement. This contains any other
barrier except the specifics below.
"gate":
osm_tags:
- "barrier": "gate"
correlated_attributes:
# key: attribute name, value: attribute value
"aggtype": "barrier"
description: >
An entrance that can be opened or closed to
get through the barrier.
"road_ground_l":
attributes: &layer_road_ground_l_attributes
"aggtype":
type: text
description: >
Grouping several different 'type' to a common 'type'.
(aka enmu)
"ref":
type: text
description: >
Used for reference numbers or codes.
Common for roads, highway exits, routes, etc.
"oneway":
type: boolean
description: >
Oneway streets are streets where you are only allowed
to drive in one direction.
"maxspeed":
type: smallint
description: >
Specifies the maximum legal speed limit
on a road, railway or waterway
"z_order":
type: smallint
description: >
The layer tag is used to describe vertical relationships
between different crossing or overlapping map features.
Use this in combination with bridge/tunnel tags when one way
passes above or under another one. For describing different
floors within a building or levels of multilevel parking decks
use levels instead of layers.
"bridge":
# can this type be with the specified value ???
type: boolean
values:
"0":
osm_tags: {}
description: &road_attribute_bridge_description >
A bridge is an artificial construction that spans features
such as roads, railways, waterways or valleys and carries a
road, railway or other feature.
"tunnel":
type: boolean
values:
"0":
osm_tags: {}
description: &road_attribute_tunnel_description >
A tunnel is an underground passage for a road or similar.
"road_bridge_l":
attributes:
<<: *layer_road_ground_l_attributes
"bridge":
# can this type be with the specified value ???
type: boolean
values:
"1":
osm_tags:
"bridge": "yes"
description: *road_attribute_bridge_description
"road_tunnel_l":
<<: *layer_road_ground_l_attributes
"tunnel":
# can this type be with the specified value ???
type: boolean
values:
"1":
osm_tags:
"tunnel": "yes"
description: *road_attribute_tunnel_description
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment