Debian Codegraph @

ogr/ogrsf_frmts/osm/data/osmconf.ini

raw
1 #
2 # Configuration file for importing OSM data into OGR
3 #
4 # NOTE: remove the below "[general]" line for GDAL < 3.10
5 [general]
6
7 # put here the name of keys, or key=value, for ways that are assumed to be polygons if they are closed
8 # see http://wiki.openstreetmap.org/wiki/Map_Features
9 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
10
11 # Uncomment to avoid laundering of keys ( ':' turned into '_' )
12 #attribute_name_laundering=no
13
14 # Some tags, set on ways and when building multipolygons, multilinestrings or other_relations,
15 # are normally filtered out early, independent of the 'ignore' configuration below.
16 # Uncomment to disable early filtering. The 'ignore' lines below remain active.
17 #report_all_tags=yes
18
19 # uncomment to report all nodes, including the ones without any (significant) tag
20 #report_all_nodes=yes
21
22 # uncomment to report all ways, including the ones without any (significant) tag
23 #report_all_ways=yes
24
25 # uncomment to specify the the format for the all_tags/other_tags field should be JSON
26 # instead of the default HSTORE formatting.
27 # Valid values for tags_format are "hstore" and "json"
28 #tags_format=json
29
30 [points]
31 # common attributes
32 osm_id=yes
33 osm_version=no
34 osm_timestamp=no
35 osm_uid=no
36 osm_user=no
37 osm_changeset=no
38
39 # keys to report as OGR fields
40 attributes=name,barrier,highway,ref,address,is_in,place,man_made
41 # keys that, alone, are not significant enough to report a node as a OGR point
42 unsignificant=created_by,converted_by,source,time,ele,attribution
43 # keys that should NOT be reported in the "other_tags" field
44 ignore=created_by,converted_by,source,time,ele,note,todo,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
50 [lines]
51 # common attributes
52 osm_id=yes
53 osm_version=no
54 osm_timestamp=no
55 osm_uid=no
56 osm_user=no
57 osm_changeset=no
58
59 # keys to report as OGR fields
60 attributes=name,highway,waterway,aerialway,barrier,man_made,railway
61
62 # type of attribute 'foo' can be changed with something like
63 #foo_type=Integer/Real/String/DateTime
64
65 # keys that should NOT be reported in the "other_tags" field
66 ignore=created_by,converted_by,source,time,ele,note,todo,openGeoDB:,fixme,FIXME
67 # uncomment to avoid creation of "other_tags" field
68 #other_tags=no
69 # uncomment to create "all_tags" field. "all_tags" and "other_tags" are exclusive
70 #all_tags=yes
71
72 #computed_attributes must appear before the keywords _type and _sql
73 computed_attributes=z_order
74 z_order_type=Integer
75 # Formula based on https://github.com/openstreetmap/osm2pgsql/blob/master/style.lua#L13
76 # [foo] is substituted by value of tag foo. When substitution is not wished, the [ character can be escaped with \[ in literals
77 # 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
78 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)"
79
80 [multipolygons]
81 # common attributes
82 # note: for multipolygons, osm_id=yes instantiates a osm_id field for the id of relations
83 # and a osm_way_id field for the id of closed ways. Both fields are exclusively set.
84 osm_id=yes
85 osm_version=no
86 osm_timestamp=no
87 osm_uid=no
88 osm_user=no
89 osm_changeset=no
90
91 # keys to report as OGR fields
92 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
93 # keys that should NOT be reported in the "other_tags" field
94 ignore=area,created_by,converted_by,source,time,ele,note,todo,openGeoDB:,fixme,FIXME
95 # uncomment to avoid creation of "other_tags" field
96 #other_tags=no
97 # uncomment to create "all_tags" field. "all_tags" and "other_tags" are exclusive
98 #all_tags=yes
99
100 [multilinestrings]
101 # common attributes
102 osm_id=yes
103 osm_version=no
104 osm_timestamp=no
105 osm_uid=no
106 osm_user=no
107 osm_changeset=no
108
109 # keys to report as OGR fields
110 attributes=name,type
111 # keys that should NOT be reported in the "other_tags" field
112 ignore=area,created_by,converted_by,source,time,ele,note,todo,openGeoDB:,fixme,FIXME
113 # uncomment to avoid creation of "other_tags" field
114 #other_tags=no
115 # uncomment to create "all_tags" field. "all_tags" and "other_tags" are exclusive
116 #all_tags=yes
117
118 [other_relations]
119 # common attributes
120 osm_id=yes
121 osm_version=no
122 osm_timestamp=no
123 osm_uid=no
124 osm_user=no
125 osm_changeset=no
126
127 # keys to report as OGR fields
128 attributes=name,type
129 # keys that should NOT be reported in the "other_tags" field
130 ignore=area,created_by,converted_by,source,time,ele,note,todo,openGeoDB:,fixme,FIXME
131 # uncomment to avoid creation of "other_tags" field
132 #other_tags=no
133 # uncomment to create "all_tags" field. "all_tags" and "other_tags" are exclusive
134 #all_tags=yes