default.style 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  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. # OsmType Tag DataType Flags
  83. node,way access text linear
  84. node,way addr:housename text linear
  85. node,way addr:housenumber text linear
  86. node,way addr:interpolation text linear
  87. node,way admin_level text linear
  88. node,way aerialway text linear
  89. node,way aeroway text polygon
  90. node,way amenity text polygon
  91. node,way area text polygon # hard coded support for area=1/yes => polygon is in osm2pgsql
  92. node,way barrier text linear
  93. node,way bicycle text linear
  94. node,way brand text linear
  95. node,way bridge text linear
  96. node,way boundary text linear
  97. node,way building text polygon
  98. node capital text linear
  99. node,way construction text linear
  100. node,way covered text linear
  101. node,way culvert text linear
  102. node,way cutting text linear
  103. node,way denomination text linear
  104. node,way disused text linear
  105. node ele text linear
  106. node,way embankment text linear
  107. node,way foot text linear
  108. node,way generator:source text linear
  109. node,way harbour text polygon
  110. node,way highway text linear
  111. node,way historic text polygon
  112. node,way horse text linear
  113. node,way intermittent text linear
  114. node,way junction text linear
  115. node,way landuse text polygon
  116. node,way layer text linear
  117. node,way leisure text polygon
  118. node,way lock text linear
  119. node,way man_made text polygon
  120. node,way military text polygon
  121. node,way motorcar text linear
  122. node,way name text linear
  123. node,way natural text polygon # natural=coastline tags are discarded by a hard coded rule in osm2pgsql
  124. node,way office text polygon
  125. node,way oneway text linear
  126. node,way operator text linear
  127. node,way place text polygon
  128. node,way population text linear
  129. node,way power text polygon
  130. node,way power_source text linear
  131. node,way public_transport text polygon
  132. node,way railway text linear
  133. node,way ref text linear
  134. node,way religion text linear
  135. node,way route text linear
  136. node,way service text linear
  137. node,way shop text polygon
  138. node,way sport text polygon
  139. node,way surface text linear
  140. node,way toll text linear
  141. node,way tourism text polygon
  142. node,way tower:type text linear
  143. way tracktype text linear
  144. node,way tunnel text linear
  145. node,way water text polygon
  146. node,way waterway text polygon
  147. node,way wetland text polygon
  148. node,way width text linear
  149. node,way wood text linear
  150. node,way z_order int4 linear # This is calculated during import
  151. way way_area real linear # This is calculated during import
  152. # Area tags
  153. # We don't make columns for these tags, but objects with them are areas.
  154. # Mainly for use with hstore
  155. way abandoned:aeroway text polygon,nocolumn
  156. way abandoned:amenity text polygon,nocolumn
  157. way abandoned:building text polygon,nocolumn
  158. way abandoned:landuse text polygon,nocolumn
  159. way abandoned:power text polygon,nocolumn
  160. way area:highway text polygon,nocolumn
  161. # Deleted tags
  162. # These are tags that are generally regarded as useless for most rendering.
  163. # Most of them are from imports or intended as internal information for mappers
  164. # Some of them are automatically deleted by editors.
  165. # If you want some of them, perhaps for a debugging layer, just delete the lines.
  166. # These tags are used by mappers to keep track of data.
  167. # They aren't very useful for rendering.
  168. node,way note text delete
  169. node,way note:* text delete
  170. node,way source text delete
  171. node,way source_ref text delete
  172. node,way source:* text delete
  173. node,way attribution text delete
  174. node,way comment text delete
  175. node,way fixme text delete
  176. # Tags generally dropped by editors, not otherwise covered
  177. node,way created_by text delete
  178. node,way odbl text delete
  179. node,way odbl:note text delete
  180. node,way SK53_bulk:load text delete
  181. # Lots of import tags
  182. # TIGER (US)
  183. node,way tiger:* text delete
  184. # NHD (US)
  185. # NHD has been converted every way imaginable
  186. node,way NHD:* text delete
  187. node,way nhd:* text delete
  188. # GNIS (US)
  189. node,way gnis:* text delete
  190. # Geobase (CA)
  191. node,way geobase:* text delete
  192. # NHN (CA)
  193. node,way accuracy:meters text delete
  194. node,way sub_sea:type text delete
  195. node,way waterway:type text delete
  196. # KSJ2 (JA)
  197. # See also note:ja and source_ref above
  198. node,way KSJ2:* text delete
  199. # Yahoo/ALPS (JA)
  200. node,way yh:* text delete
  201. # osak (DK)
  202. node,way osak:* text delete
  203. # kms (DK)
  204. node,way kms:* text delete
  205. # ngbe (ES)
  206. # See also note:es and source:file above
  207. node,way ngbe:* text delete
  208. # naptan (UK)
  209. node,way naptan:* text delete
  210. # Corine (CLC) (Europe)
  211. node,way CLC:* text delete
  212. # misc
  213. node,way 3dshapes:ggmodelk text delete
  214. node,way AND_nosr_r text delete
  215. node,way import text delete
  216. node,way it:fvg:* text delete