osmconf.ini 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. #
  2. # Configuration file for OSM import
  3. #
  4. # put here the name of keys, or key=value, for ways that are assumed to be polygons if they are closed
  5. # see http://wiki.openstreetmap.org/wiki/Map_Features
  6. closed_ways_are_polygons=aeroway,amenity,boundary,building,craft,geological,historic,landuse,leisure,military,natural,office,place,shop,sport,tourism,highway=platform,public_transport=platform
  7. # comment to avoid laundering of keys ( ':' turned into '_' )
  8. attribute_name_laundering=yes
  9. # uncomment to report all nodes, including the ones without any (significant) tag
  10. #report_all_nodes=yes
  11. # uncomment to report all ways, including the ones without any (significant) tag
  12. #report_all_ways=yes
  13. [points]
  14. # common attributes
  15. osm_id=yes
  16. osm_version=no
  17. osm_timestamp=no
  18. osm_uid=no
  19. osm_user=no
  20. osm_changeset=no
  21. # keys to report as OGR fields
  22. attributes=name,barrier,highway,ref,address,is_in,place,man_made
  23. # keys that, alone, are not significant enough to report a node as a OGR point
  24. unsignificant=created_by,converted_by,source,time,ele,attribution
  25. # keys that should NOT be reported in the "other_tags" field
  26. ignore=created_by,converted_by,source,time,ele,note,openGeoDB:,fixme,FIXME
  27. # uncomment to avoid creation of "other_tags" field
  28. #other_tags=no
  29. # uncomment to create "all_tags" field. "all_tags" and "other_tags" are exclusive
  30. #all_tags=yes
  31. [lines]
  32. # common attributes
  33. osm_id=yes
  34. osm_version=no
  35. osm_timestamp=no
  36. osm_uid=no
  37. osm_user=no
  38. osm_changeset=no
  39. # keys to report as OGR fields
  40. attributes=name,highway,waterway,aerialway,barrier,man_made
  41. # type of attribute 'foo' can be changed with something like
  42. #foo_type=Integer/Real/String/DateTime
  43. # keys that should NOT be reported in the "other_tags" field
  44. ignore=created_by,converted_by,source,time,ele,note,openGeoDB:,fixme,FIXME
  45. # uncomment to avoid creation of "other_tags" field
  46. #other_tags=no
  47. # uncomment to create "all_tags" field. "all_tags" and "other_tags" are exclusive
  48. #all_tags=yes
  49. #computed_attributes must appear before the keywords _type and _sql
  50. computed_attributes=z_order
  51. z_order_type=Integer
  52. # Formula based on https://github.com/openstreetmap/osm2pgsql/blob/master/style.lua#L13
  53. # [foo] is substituted by value of tag foo. When substitution is not wished, the [ character can be escaped with \[ in literals
  54. z_order_sql="SELECT (CASE [highway] WHEN 'minor' THEN 3 WHEN 'road' THEN 3 WHEN 'unclassified' THEN 3 WHEN 'residential' THEN 3 WHEN 'tertiary_link' THEN 4 WHEN 'tertiary' THEN 4 WHEN 'secondary_link' THEN 6 WHEN 'secondary' THEN 6 WHEN 'primary_link' THEN 7 WHEN 'primary' THEN 7 WHEN 'trunk_link' THEN 8 WHEN 'trunk' THEN 8 WHEN 'motorway_link' THEN 9 WHEN 'motorway' THEN 9 ELSE 0 END) + (CASE WHEN [bridge] IN ('yes', 'true', '1') THEN 10 ELSE 0 END) + (CASE WHEN [tunnel] IN ('yes', 'true', '1') THEN -10 ELSE 0 END) + (CASE WHEN [railway] IS NOT NULL THEN 5 ELSE 0 END) + (CASE WHEN [layer] IS NOT NULL THEN 10 * CAST([layer] AS INTEGER) ELSE 0 END)"
  55. [multipolygons]
  56. # common attributes
  57. # note: for multipolygons, osm_id=yes instantiates a osm_id field for the id of relations
  58. # and a osm_way_id field for the id of closed ways. Both fields are exclusively set.
  59. osm_id=yes
  60. osm_version=no
  61. osm_timestamp=no
  62. osm_uid=no
  63. osm_user=no
  64. osm_changeset=no
  65. # keys to report as OGR fields
  66. attributes=name,type,aeroway,amenity,admin_level,barrier,boundary,building,craft,geological,historic,land_area,landuse,leisure,man_made,military,natural,office,place,shop,sport,tourism
  67. # keys that should NOT be reported in the "other_tags" field
  68. ignore=area,created_by,converted_by,source,time,ele,note,openGeoDB:,fixme,FIXME
  69. # uncomment to avoid creation of "other_tags" field
  70. #other_tags=no
  71. # uncomment to create "all_tags" field. "all_tags" and "other_tags" are exclusive
  72. #all_tags=yes
  73. [multilinestrings]
  74. # common attributes
  75. osm_id=yes
  76. osm_version=no
  77. osm_timestamp=no
  78. osm_uid=no
  79. osm_user=no
  80. osm_changeset=no
  81. # keys to report as OGR fields
  82. attributes=name,type
  83. # keys that should NOT be reported in the "other_tags" field
  84. ignore=area,created_by,converted_by,source,time,ele,note,openGeoDB:,fixme,FIXME
  85. # uncomment to avoid creation of "other_tags" field
  86. #other_tags=no
  87. # uncomment to create "all_tags" field. "all_tags" and "other_tags" are exclusive
  88. #all_tags=yes
  89. [other_relations]
  90. # common attributes
  91. osm_id=yes
  92. osm_version=no
  93. osm_timestamp=no
  94. osm_uid=no
  95. osm_user=no
  96. osm_changeset=no
  97. # keys to report as OGR fields
  98. attributes=name,type
  99. # keys that should NOT be reported in the "other_tags" field
  100. ignore=area,created_by,converted_by,source,time,ele,note,openGeoDB:,fixme,FIXME
  101. # uncomment to avoid creation of "other_tags" field
  102. #other_tags=no
  103. # uncomment to create "all_tags" field. "all_tags" and "other_tags" are exclusive
  104. #all_tags=yes