<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.Shkpostityyli17
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 2.0cm 70.85pt 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FI" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">You need to have both: include all_tags in osmconf.ini and define with the ogr2ogr command that field “all_tags” in PostGIS
should be initialized as hstore. If you do not define column type all_tags will probably become text type column. Make a test and you will see it.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">-Jukka Rahkonen-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">Djordje Spasic wrote:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">Re: [gdal-dev] Why are fields required in osmconf.ini file?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:black">Thank you for the useful reply Jukka!<br>
<br>
The command you gave me:<br>
<br>
<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div id="yui_3_16_0_ym19_1_1479459858398_9547">
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:black">ogr2ogr -f PostgreSQL "PG:dbname=osm" test.pbf -lco<br id="yui_3_16_0_ym19_1_1479459858398_9588">
COLUMN_TYPES=all_tags=hstore<o:p></o:p></span></p>
</div>
</blockquote>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:black">does the same thing as "all_tags=yes" in the osmconf.ini file:<br>
<br>
<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div id="yui_3_16_0_ym19_1_1479459858398_9542">
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#5B8828"># uncomment to create "all_tags" field. "all_tags" and "other_tags" are exclusive</span><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:black"><br id="yui_3_16_0_ym19_1_1479459858398_9761">
all_tags=yes<o:p></o:p></span></p>
</div>
</blockquote>
<div id="yui_3_16_0_ym19_1_1479459858398_9541">
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:black">?<br>
<br>
If not, then what is the difference between these two?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt;background:white"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black">On Friday, November 18, 2016 8:55 AM, jratike80 <</span><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black"><a href="mailto:jukka.rahkonen@maanmittauslaitos.fi"><span lang="EN-US">jukka.rahkonen@maanmittauslaitos.fi</span></a></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black">>
wrote:</span><span lang="EN-US" style="font-family:"Helvetica",sans-serif;color:black"><o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt;background:white"><span lang="EN-US" style="font-family:"Helvetica",sans-serif;color:black"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica",sans-serif;color:black">georges wrote<o:p></o:p></span></p>
<div id="yqtfd25069">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica",sans-serif;color:black"><br>
> Thank you for the quick reply Even!<br>
> <br>
> So this required predefined set of fields is a necessary step for any .osm<br>
> file conversion with ogr2ogr.exe?<br>
> Not only conversion from .osm to .shp?<br>
> But also to .pbf, geojson etc. ?<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt;background:white"><span style="font-family:"Helvetica",sans-serif;color:black"><br>
<br>
Only exception and highly recommended if you want to get all the tags is to<br>
use PostGIS and "all_tags" which puts everything into hstore:<br>
<br>
ogr2ogr -f PostgreSQL "PG:dbname=osm" test.pbf -lco<br>
COLUMN_TYPES=all_tags=hstore<br>
<br>
-Jukka Rahkonen-<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/gdal-dev-Why-are-fields-required-in-osmconf-ini-file-tp5296342p5296397.html" target="_blank">
http://osgeo-org.1560.x6.nabble.com/gdal-dev-Why-are-fields-required-in-osmconf-ini-file-tp5296342p5296397.html</a><br>
Sent from the GDAL - Dev mailing list archive at Nabble.com.<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>