Exporting to an ESRI Shapefile while selecting relevant field contents

Hello everybody:

Some time ago i was kindly helped in this forum to export form an .osm.pdf file to an ERSI Shapefile. Here is the link to the thread: http://forum.openstreetmap.org/viewtopic.php?id=21539
The result of this was a Shapefile with all the power grid of germany. But still there is one thing that I would like to improve but I couldnt find you how.
The exported ESRI Shapefile contains the field “other_tags”. The porblem is that lots of unused information is witten into the field “other_taks” in the shapefile. Here one example of one element of the field “other_tags”:

“cycleway”=>“track”,“maxspeed”=>“50”,“oneway”=>“yes”,“surface”=>“paved”,“voltage”=>“110000”

Now the question: Is it possible to export from the osm.pbf file in a way that only the element “voltage”=> and its value(here: 110000) is wirtten into the field “other_tags”??? I tryed to find a way to amend the “select * from …” function but didnt get any good result. I am lerning how to use GDAL propperly so I am happy for any kind of help.

Thanks to everybody
Alex

Hi,

I would skip the other_tags totally by editing the osmconf.ini file from here

uncomment to avoid creation of “other_tags” field

#other_tags=no

Then add voltage to the normal attributes here

keys to report as OGR fields

attributes=name,barrier,highway,ref,address,is_in,place,man_made

You cannot select the fields which are included in the other_tags, but you can prevent writing a list of tags here

keys that should NOT be reported in the “other_tags” field

ignore=created_by,converted_by,source,time,ele,note,openGeoDB:,fixme,FIXME

However, in your case I guess you will be happy withour other_tags.