osmconf.ini 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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. # Uncomment to avoid laundering of keys ( ':' turned into '_' )
  8. #attribute_name_laundering=no
  9. # Some tags, set on ways and when building multipolygons, multilinestrings or other_relations,
  10. # are normally filtered out early, independent of the 'ignore' configuration below.
  11. # Uncomment to disable early filtering. The 'ignore' lines below remain active.
  12. #report_all_tags=yes
  13. # uncomment to report all nodes, including the ones without any (significant) tag
  14. #report_all_nodes=yes
  15. # uncomment to report all ways, including the ones without any (significant) tag
  16. #report_all_ways=yes
  17. [points]
  18. # common attributes
  19. osm_id=yes
  20. osm_version=no
  21. osm_timestamp=no
  22. osm_uid=no
  23. osm_user=no
  24. osm_changeset=no
  25. # keys to report as OGR fields
  26. attributes=name,barrier,highway,ref,address,is_in,place,man_made
  27. # keys that, alone, are not significant enough to report a node as a OGR point
  28. unsignificant=created_by,converted_by,source,time,ele,attribution
  29. # keys that should NOT be reported in the "other_tags" field
  30. ignore=created_by,converted_by,source,time,ele,note,todo,openGeoDB:,fixme,FIXME
  31. # uncomment to avoid creation of "other_tags" field
  32. #other_tags=no
  33. # uncomment to create "all_tags" field. "all_tags" and "other_tags" are exclusive
  34. #all_tags=yes
  35. [lines]
  36. # common attributes
  37. osm_id=yes
  38. osm_version=no
  39. osm_timestamp=no
  40. osm_uid=no
  41. osm_user=no
  42. osm_changeset=no
  43. # keys to report as OGR fields
  44. attributes=name,highway,waterway,aerialway,barrier,man_made
  45. # type of attribute 'foo' can be changed with something like
  46. #foo_type=Integer/Real/String/DateTime
  47. # keys that should NOT be reported in the "other_tags" field
  48. ignore=created_by,converted_by,source,time,ele,note,todo,openGeoDB:,fixme,FIXME
  49. # uncomment to avoid creation of "other_tags" field
  50. #other_tags=no
  51. # uncomment to create "all_tags" field. "all_tags" and "other_tags" are exclusive
  52. #all_tags=yes
  53. #computed_attributes must appear before the keywords _type and _sql
  54. computed_attributes=z_order
  55. z_order_type=Integer
  56. # Formula based on https://github.com/openstreetmap/osm2pgsql/blob/master/style.lua#L13
  57. # [foo] is substituted by value of tag foo. When substitution is not wished, the [ character can be escaped with \[ in literals
  58. # Note for GDAL developers: if we change the below formula, make sure to edit ogrosmlayer.cpp since it has a hardcoded optimization for this very precise formula
  59. 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)"
  60. [multipolygons]
  61. # common attributes
  62. # note: for multipolygons, osm_id=yes instantiates a osm_id field for the id of relations
  63. # and a osm_way_id field for the id of closed ways. Both fields are exclusively set.
  64. osm_id=yes
  65. osm_version=no
  66. osm_timestamp=no
  67. osm_uid=no
  68. osm_user=no
  69. osm_changeset=no
  70. # keys to report as OGR fields
  71. 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
  72. # keys that should NOT be reported in the "other_tags" field
  73. ignore=area,created_by,converted_by,source,time,ele,note,todo,openGeoDB:,fixme,FIXME
  74. # uncomment to avoid creation of "other_tags" field
  75. #other_tags=no
  76. # uncomment to create "all_tags" field. "all_tags" and "other_tags" are exclusive
  77. #all_tags=yes
  78. [multilinestrings]
  79. # common attributes
  80. osm_id=yes
  81. osm_version=no
  82. osm_timestamp=no
  83. osm_uid=no
  84. osm_user=no
  85. osm_changeset=no
  86. # keys to report as OGR fields
  87. attributes=name,type
  88. # keys that should NOT be reported in the "other_tags" field
  89. ignore=area,created_by,converted_by,source,time,ele,note,todo,openGeoDB:,fixme,FIXME
  90. # uncomment to avoid creation of "other_tags" field
  91. #other_tags=no
  92. # uncomment to create "all_tags" field. "all_tags" and "other_tags" are exclusive
  93. #all_tags=yes
  94. [other_relations]
  95. # common attributes
  96. osm_id=yes
  97. osm_version=no
  98. osm_timestamp=no
  99. osm_uid=no
  100. osm_user=no
  101. osm_changeset=no
  102. # keys to report as OGR fields
  103. attributes=name,type
  104. # keys that should NOT be reported in the "other_tags" field
  105. ignore=area,created_by,converted_by,source,time,ele,note,todo,openGeoDB:,fixme,FIXME
  106. # uncomment to avoid creation of "other_tags" field
  107. #other_tags=no
  108. # uncomment to create "all_tags" field. "all_tags" and "other_tags" are exclusive
  109. #all_tags=yes