Newer
Older
osmCoverage / src / osmCoverage.style
@hayashi hayashi on 21 Mar 2018 9 KB リファクタリング busstop
  1. # This is the default osm2pgsql .style file that comes with osm2pgsql.
  2. #
  3. # A .style file has 4 columns that define how OSM objects end up in tables in
  4. # the database and what columns are created. It interacts with the command-line
  5. # hstore options.
  6. #
  7. # Columns
  8. # =======
  9. #
  10. # OsmType: This is either "node", "way" or "node,way" and indicates if this tag
  11. # applies to nodes, ways, or both.
  12. #
  13. # Tag: The tag
  14. #
  15. # DataType: The type of the column to be created. Normally "text"
  16. #
  17. # Flags: Flags that indicate what table the OSM object is moved into.
  18. #
  19. # There are 6 possible flags. These flags are used both to indicate if a column
  20. # should be created, and if ways with the tag are assumed to be areas. The area
  21. # assumptions can be overridden with an area=yes/no tag
  22. #
  23. # polygon - Create a column for this tag, and objects with the tag are areas
  24. #
  25. # linear - Create a column for this tag
  26. #
  27. # nocolumn - Override the above and don't create a column for the tag, but do
  28. # include objects with this tag
  29. #
  30. # phstore - Same as polygon,nocolumn for backward compatibility
  31. #
  32. # delete - Drop this tag completely and don't create a column for it. This also
  33. # prevents the tag from being added to hstore columns
  34. #
  35. # nocache - Deprecated and does nothing
  36. #
  37. # If an object has a tag that indicates it is an area or has area=yes/1,
  38. # osm2pgsql will try to turn it into an area. If it succeeds, it places it in
  39. # the polygon table. If it fails (e.g. not a closed way) it places it in the
  40. # line table.
  41. #
  42. # Nodes are never placed into the polygon or line table and are always placed in
  43. # the point table.
  44. #
  45. # Hstore
  46. # ======
  47. #
  48. # The options --hstore, --hstore-match-only, and --hstore-all interact with
  49. # the .style file.
  50. #
  51. # With --hstore any tags without a column will be added to the hstore column.
  52. # This will also cause all objects to be kept.
  53. #
  54. # With --hstore-match-only the behavior for tags is the same, but objects are
  55. # only kept if they have a non-NULL value in one of the columns.
  56. #
  57. # With --hstore-all all tags are added to the hstore column unless they appear
  58. # in the style file with a delete flag, causing duplication between the normal
  59. # columns and the hstore column.
  60. #
  61. # Special database columns
  62. # ========================
  63. #
  64. # There are some special database columns that if present in the .style file
  65. # will be populated by osm2pgsql.
  66. #
  67. # These are
  68. #
  69. # z_order - datatype int4
  70. #
  71. # way_area - datatype real. The area of the way, in the units of the projection
  72. # (e.g. square mercator meters). Only applies to areas
  73. #
  74. # osm_user - datatype text
  75. # osm_uid - datatype integer
  76. # osm_version - datatype integer
  77. # osm_changeset - datatype integer
  78. # osm_timestamp - datatype timestamptz(0).
  79. # Used with the --extra-attributes option to include metadata in the database.
  80. # If importing with both --hstore and --extra-attributes the meta-data will
  81. # end up in the tags hstore column regardless of the style file.
  82.  
  83. # OsmType Tag DataType Flags
  84. node,way access text linear
  85. node,way addr:housename text linear
  86. node,way addr:housenumber text linear
  87. node,way addr:interpolation text linear
  88. node,way admin_level text linear
  89. node,way aerialway text linear
  90. node,way aeroway text polygon
  91. node,way amenity text polygon
  92. node,way abandoned:amenity text linear
  93. node,way demolished:amenity text linear
  94. node,way disused:amenity text linear
  95. node,way removed:amenity text linear
  96. node,way historic:amenity text linear
  97. node,way no:amenity text linear
  98. node,way was:amenity text linear
  99. node,way area text polygon # hard coded support for area=1/yes => polygon is in osm2pgsql
  100. node,way barrier text linear
  101. node,way bicycle text linear
  102. node,way brand text linear
  103. node,way bridge text linear
  104. node,way boundary text linear
  105. node,way building text polygon
  106. node,way bus text linear
  107. node capital text linear
  108. node,way construction text linear
  109. node,way covered text linear
  110. node,way culvert text linear
  111. node,way cutting text linear
  112. node,way denomination text linear
  113. node,way disused text linear
  114. node ele text linear
  115. node,way embankment text linear
  116. node,way fixme text linear
  117. node,way foot text linear
  118. node,way generator:source text linear
  119. node,way harbour text polygon
  120. node,way highway text linear
  121. node,way abandoned:highway text linear
  122. node,way demolished:highway text linear
  123. node,way disused:highway text linear
  124. node,way removed:highway text linear
  125. node,way historic:highway text linear
  126. node,way no:highway text linear
  127. node,way historic text polygon
  128. node,way horse text linear
  129. node,way intermittent text linear
  130. node,way junction text linear
  131. node,way landuse text polygon
  132. node,way layer text linear
  133. node,way leisure text polygon
  134. node,way lock text linear
  135. node,way man_made text polygon
  136. node,way military text polygon
  137. node,way motorcar text linear
  138. node,way name text linear
  139. node,way natural text polygon # natural=coastline tags are discarded by a hard coded rule in osm2pgsql
  140. node,way office text polygon
  141. node,way oneway text linear
  142. node,way operator text linear
  143. node,way place text polygon
  144. node,way population text linear
  145. node,way power text polygon
  146. node,way power_source text linear
  147. node,way public_transport text polygon
  148. node,way disused:public_transport text polygon
  149. node,way abandoned:public_transport text polygon
  150. node,way removed:public_transport text polygon
  151. node,way no:public_transport text polygon
  152. node,way railway text linear
  153. node,way ref text linear
  154. node,way religion text linear
  155. node,way route text linear
  156. node,way service text linear
  157. node,way shop text polygon
  158. node,way sport text polygon
  159. node,way surface text linear
  160. node,way toll text linear
  161. node,way tourism text polygon
  162. node,way tower:type text linear
  163. way tracktype text linear
  164. node,way tunnel text linear
  165. node,way water text polygon
  166. node,way waterway text polygon
  167. node,way wetland text polygon
  168. node,way width text linear
  169. node,way wood text linear
  170. node,way z_order int4 linear # This is calculated during import
  171. way way_area real linear # This is calculated during import
  172.  
  173. # Area tags
  174. # We don't make columns for these tags, but objects with them are areas.
  175. # Mainly for use with hstore
  176. way abandoned:aeroway text polygon,nocolumn
  177. way abandoned:building text polygon,nocolumn
  178. way abandoned:landuse text polygon,nocolumn
  179. way abandoned:power text polygon,nocolumn
  180. way area:highway text polygon,nocolumn
  181.  
  182. # Deleted tags
  183. # These are tags that are generally regarded as useless for most rendering.
  184. # Most of them are from imports or intended as internal information for mappers
  185. # Some of them are automatically deleted by editors.
  186. # If you want some of them, perhaps for a debugging layer, just delete the lines.
  187.  
  188. # These tags are used by mappers to keep track of data.
  189. # They aren't very useful for rendering.
  190. node,way note text delete
  191. node,way note:* text delete
  192. node,way source text delete
  193. node,way source_ref text delete
  194. node,way source:* text delete
  195. node,way attribution text delete
  196. node,way comment text delete
  197. #node,way fixme text delete
  198.  
  199. # Tags generally dropped by editors, not otherwise covered
  200. node,way created_by text delete
  201. node,way odbl text delete
  202. node,way odbl:note text delete
  203. node,way SK53_bulk:load text delete
  204.  
  205. # Lots of import tags
  206. # TIGER (US)
  207. node,way tiger:* text delete
  208.  
  209. # NHD (US)
  210. # NHD has been converted every way imaginable
  211. node,way NHD:* text delete
  212. node,way nhd:* text delete
  213.  
  214. # GNIS (US)
  215. node,way gnis:* text delete
  216.  
  217. # Geobase (CA)
  218. node,way geobase:* text delete
  219. # NHN (CA)
  220. node,way accuracy:meters text delete
  221. node,way sub_sea:type text delete
  222. node,way waterway:type text delete
  223.  
  224. # KSJ2 (JA)
  225. # See also note:ja and source_ref above
  226. node,way KSJ2:* text delete
  227. # Yahoo/ALPS (JA)
  228. node,way yh:* text delete
  229.  
  230. # osak (DK)
  231. node,way osak:* text delete
  232.  
  233. # kms (DK)
  234. node,way kms:* text delete
  235.  
  236. # ngbe (ES)
  237. # See also note:es and source:file above
  238. node,way ngbe:* text delete
  239.  
  240. # naptan (UK)
  241. node,way naptan:* text delete
  242.  
  243. # Corine (CLC) (Europe)
  244. node,way CLC:* text delete
  245.  
  246. # misc
  247. node,way 3dshapes:ggmodelk text delete
  248. node,way AND_nosr_r text delete
  249. node,way import text delete
  250. node,way it:fvg:* text delete