[GIS] Splitting other_tags from .osm file

ogr2ogropenstreetmapother-tags

I am converting an .osm file to a .shp file with OGR2OGR:

ogr2ogr.exe --config OSM_USE_CUSTOM_INDEXING NO -skipfailures -f "ESRI Shapefile" output.shp input.osm

In osmconf.ini the other_tags is set to "yes" (other_tags=yes).

This creates an attribute other_tags which consists of a huge block of text, containing a lot of different tags.

Is it possible to somehow tell the OGR2OGR to split the other_tags into all of those tags it contains?

I searched, and found out that both in ArcGIS and QGIS there are options on how this can be done. but I am interested in doing it from OGR2OGR only.

Best Answer

In QGIS 3.6, it is now possible to explode the "other_tags" HStore field. The algorithm will create one field for each unique key.

explode hstore field algorithm

Related Question