[gdal-dev] splitting other_tags from .osm file

jratike80 jukka.rahkonen at maanmittauslaitos.fi
Sun Oct 30 10:04:56 PDT 2016


I apologize that I did not remember right what -all_tags is doing. The
difference is as written in http://www.gdal.org/drv_osm.html

"Similar to "other_tags", except that it contains both keys specifically
identified to be reported as dedicated fields, as well as other keys."

Thus all_tags concatenates all tag/value pairs into one attribute (which is
designed for PostGIS HSTORE type) even if some keys are especially picked to
be written into regular attribute fields. Other_tags option concatenates
only those tag/value pairs which are not already converted into regular
attributes.  First option writes the selected attributes two times into
output data which does make sense with PostGIS hstore when it can be handy
to have everything queryable from hstore, but having same data as normal
attribute makes is also possible to use special index for the field, cast
strings to other datatypes etc. for some specialized queries and processing
of data.

If you need to get access to all the tag/value pairs in the data you may
bang your head on the wall with ogr2ogr and shapefiles. Some suggestions: 
- Use ogr2ogr and PostGIS with hstore + all_tags
- Try OpenJUMP which creates fields for all the tags it finds.
- QGIS was already suggested
- Try Spatialite OSM raw tool

-Jukka Rahkonen-

View this message in context: http://osgeo-org.1560.x6.nabble.com/gdal-dev-splitting-other-tags-from-osm-file-tp5293451p5293505.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.

More information about the gdal-dev mailing list