I have a PBF file containing only rivers information (extracted using osmosis when waterway=river).

A conversion of this PBF to SHP works fine with ogr2ogr when I am selecting fields like "osm_id" and "name". However, I would like to have the name of the rivers in different languages in the attribute table. The available translations appears in the "other_tags" column like this example: "name:en"=>"The Thames","name:fr"=>"La Tamise".

Is it possible to create a SHP (or any other format) where the different translation of the rivers name would appear in different columns (eg. name:en, name:fr)?

This gdal command:

ogr2ogr -f 'ESRI Shapefile' -sql 'select osm_id,name,"name:en" from lines where waterway="river"' rivers.shp rivers.osm.pbf --config ogr_interleaved_reading yes -lco ENCODING=UTF-8

returns the following error: ERROR 1: Unrecognized field name name:en

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.