[gdal-dev] Add "all_tags" option into OSM driver

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Sun Sep 15 07:48:34 PDT 2013


Hi,

Currently it is possible to select which OSM tags are converted into normal
OGR fiels and select that the rest will be written into "other_tags" field,
except the ones from the ignore list.

In case of PostGIS and hstore it would be sometimes good to have all the
tags written into the hstore fiels, also those which are converted into OGR
fields.

I suggest to add an "all_tags" option which would concatenate all the tags
into a common field except those which are in the ingore list. Alternatively
there could be switch to change the "other_tags" behavious between "all tags
which are not OGR tags of ignored" vs. "all tags which are not ignored"

Adding a new "all_tags" option feels easier to implement but I can not
really imagine why any user would like to select both "other_tags" and
"all_tags" options at the same time.

Osmconf.ini which would support the easy but perhaps stupid alternative
would then look like this:

# keys to report as OGR fields
attributes=[list]
# keys that should NOT be reported in the "other_tags" and "all_tags" fields
ignore=[list]
# uncomment to avoid creation of "other_tags" field
#other_tags=no
# uncomment to avoid creation of "all_tags" field
all_tags=no


The "all_tags" option is how osm2pgsql works with the -k parameter and
having that in GDAL would help in using those two programs side by side.

-Jukka Rahkonen-




More information about the gdal-dev mailing list