-
Notifications
You must be signed in to change notification settings - Fork 0
/
moabi.style
201 lines (182 loc) · 7.29 KB
/
moabi.style
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# Custom osm2pgsql .style file for osm2pgsql, built for the moabi platform.
#
# A .style file has 4 columns that define how OSM objects end up in tables in
# the database and what columns are created. It interacts with the command-line
# hstore options.
#
# Columns
# =======
#
# OsmType: This is either "node", "way" or "node,way" and indicates if this tag
# applies to nodes, ways, or both.
#
# Tag: The tag
#
# DataType: The type of the column to be created. Normally "text"
#
# Flags: Flags that indicate what table the OSM object is moved into.
#
# There are 5 possible flags. These flags are used both to indicate if a column
# should be created, and if ways with the tag are assumed to be areas. The area
# assumptions can be overridden with an area=yes/no tag
#
# polygon - Create a column for this tag, and objects the tag with are areas
#
# linear - Create a column for this tag
#
# phstore - Don't create a column for this tag, but objects with the tag are areas
#
# delete - Drop this tag completely and don't create a column for it. This also
# prevents the tag from being added to hstore columns
#
# nocache - Deprecated and does nothing
#
# If an object has a tag that indicates it is an area or has area=yes/1,
# osm2pgsql will try to turn it into an area. If it succeeds, it places it in
# the polygon table. If it fails (e.g. not a closed way) it places it in the
# line table.
#
# Nodes are never placed into the polygon or line table and are always placed in
# the point table.
#
# Hstore
# ======
#
# The options --hstore, --hstore-match-only, and --hstore-all interact with
# the .style file.
#
# With --hstore any tags without a column will be added to the hstore column.
# This will also cause all objects to be kept.
#
# With --hstore-match-only the behavior for tags is the same, but objects are
# only kept if they have a non-NULL value in one of the columns.
#
# With --hstore-all all tags are added to the hstore column unless they appear
# in the style file with a delete flag, causing duplication between the normal
# columns and the hstore column.
#
# Special database columns
# ========================
#
# There are some special database columns that if present in the .style file
# will be populated by osm2pgsql.
#
# These are
#
# z_order - datatype int4
#
# way_area - datatype real. The area of the way, in the units of the projection
# (e.g. square mercator meters). Only applies to areas
#
# osm_user, osm_uid, osm_version, osm_timestamp - datatype text. Used with the
# --extra-attributes option to include metadata in the database. If importing
# with both --hstore and --extra-attributes the meta-data will end up in the
# tags hstore column regardless of the style file.
# OsmType Tag DataType Flags
node,way admin_level text linear
node,way area text # hard coded support for area=1/yes => polygon is in osm2pgsql
node,way boundary text linear
node,way building text polygon
node,way highway text linear
node,way landuse text polygon
node,way name text linear
node,way operator text linear
node,way railway text linear
node,way ref text linear
node,way waterway text polygon
node,way z_order int4 linear # This is calculated during import
way way_area real # This is calculated during import
# Moabi-specific primary attributes -> this should match documentation,
# available at rdc.moabi.org/map-features/en
# and stored as a list at jekyll_site/_data/attribute-structure.yml
# OsmType Tag DataType Flags
node,way concession text
node,way territory text
node,way energy text
node,way place text
# Moabi-specific optional attributes -> this should match documentation,
# available at rdc.moabi.org/map-features/en
# and stored as a list at jekyll_site/_data/optional_attributes.yml
# OsmType Tag DataType Flags
node,way license text
node,way status text
node,way resource text
node,way artisanal text
node,way application_date date
node,way grant_date date
node,way expiration_date date
node,way start_date text
node,way end_date text
node,way methodology text
node,way project_leader text
node,way contact_person text
node,way contact_email text
node,way ethnicity text
node,way proposed text
node,way logging text
node,way capacity text
# Area tags
# We don't make columns for these tags, but objects with them are areas.
# Mainly for use with hstore
way abandoned:aeroway text phstore
way abandoned:amenity text phstore
way abandoned:building text phstore
way abandoned:landuse text phstore
way abandoned:power text phstore
way area:highway text phstore
# Deleted tags
# These are tags that are generally regarded as useless for most rendering.
# Most of them are from imports or intended as internal information for mappers
# Some of them are automatically deleted by editors.
# If you want some of them, perhaps for a debugging layer, just delete the lines.
# These tags are used by mappers to keep track of data.
# They aren't very useful for rendering.
node,way note text delete
node,way note:* text delete
node,way source text delete
node,way source_ref text delete
node,way source:* text delete
node,way attribution text delete
node,way comment text delete
node,way fixme text delete
# Tags generally dropped by editors, not otherwise covered
node,way created_by text delete
node,way odbl text delete
node,way odbl:note text delete
node,way SK53_bulk:load text delete
# Lots of import tags
# TIGER (US)
node,way tiger:* text delete
# NHD (US)
# NHD has been converted every way imaginable
node,way NHD:* text delete
node,way nhd:* text delete
# GNIS (US)
node,way gnis:* text delete
# Geobase (CA)
node,way geobase:* text delete
# NHN (CA)
node,way accuracy:meters text delete
node,way sub_sea:type text delete
node,way waterway:type text delete
# KSJ2 (JA)
# See also note:ja and source_ref above
node,way KSJ2:* text delete
# Yahoo/ALPS (JA)
node,way yh:* text delete
# osak (DK)
node,way osak:* text delete
# kms (DK)
node,way kms:* text delete
# ngbe (ES)
# See also note:es and source:file above
node,way ngbe:* text delete
# naptan (UK)
node,way naptan:* text delete
# Corine (CLC) (Europe)
node,way CLC:* text delete
# misc
node,way 3dshapes:ggmodelk text delete
node,way AND_nosr_r text delete
node,way import text delete
node,way it:fvg:* text delete