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