[gdal-dev] splitting other_tags from .osm file

Etienne Trimaille etienne.trimaille at gmail.com
Sat Oct 29 21:05:16 PDT 2016


As Even said, there is no way to get all tags as a separate field only with
ogr2ogr.
The 'all_tags' flag will use the HSTORE only.

You can have a look to the QGIS QuickOSM plugin. With this plugin, you can
open a local OSM file like yours and ask the plugin to parse every fields
available. The plugin will manage to create a field for each OSM tag.

2016-10-30 4:27 GMT+07:00 Even Rouault <even.rouault at spatialys.com>:

> Le samedi 29 octobre 2016 23:21:00, Djordje Spasic a écrit :
> > Thank you for the quick reply Even.
> >
> > > You could as well putaddr:postcode as value in attribute=
> >
> > This means that the name of the key (field) will be:"addr:postc", to
> > accommodate those 10 maximal characters reserved for shapefile key
> (field)
> > names?
>
> Yes. You could also do renaming with:
>
> ogr2ogr points.shp your.osm -sql "select \"addr:postcode\" as postcode from
> points"
>
> Or create a computed field in the osmconf.ini (untested, but should
> hopefully
> work):
>
> computed_attributes=postcode
> postcode=String
> postcode_sql="SELECT [addr:postcode]"
>
>
> > Even do you mind if I ask you what is the difference
> > betweenother_tags, and all_tags?There is an exaplanation in the
> > osmconf.ini: "all_tags" and"other_tags" are exclusive
> > But I do not understand it.
>
> Why not just experimenting ? This would be clearer than any explanations.
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20161030/e30efa0e/attachment.html>


More information about the gdal-dev mailing list