<html><head></head><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:13px"><div id="yiv9851596120"><div id="yui_3_16_0_ym19_1_1479139023307_3466"><div style="color:#000;background-color:#fff;font-family:verdana, helvetica, sans-serif;font-size:13px;" id="yui_3_16_0_ym19_1_1479139023307_3465"><div dir="ltr" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3533"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3735">Thank you Jukka,</span></div><div dir="ltr" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4207"><br clear="none"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3735"></span></div><blockquote id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4239"><div dir="ltr" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4208"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3735"></span><font id="yui_3_16_0_ym19_1_1479139023307_3478" color="#808080"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3735">> If you plan to follow the SQL route I really recommend you to read some SQL tutorials and exercise at home. I am sure that you will learn the basics soon and tutorials are always in the web while I am not. SQL is so close to English and that you can think that you are making a (comma separated) shopping list</span><br id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3733" clear="none"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3735"></span><br id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3734" clear="none"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3735">“SELECT milk,bread,juice FROM Wal-Mart”.</span></font></div></blockquote><div dir="ltr" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3769"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3735">I will definitely have to do this. It's just I need a quick solution to this specific issue, for now.<br clear="none"></span></div><div dir="ltr" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4384"><br clear="none"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3735"></span></div><blockquote id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4413"><div dir="ltr" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4383"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3735"><br clear="none"></span></div><div dir="ltr" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4398"><font id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4445" color="#808080"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3735">> If your version and environment requires escaping, then you need to do <br id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4070" clear="none"><br id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4071" clear="none">"select geometry, \"building\" as bldg,\"building:levels\" as bldg_levels,\”height\” as height from multipolygons ... "</span></font></div><div dir="ltr" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4399"><font color="#808080"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3735"><br clear="none"></span></font></div><div dir="ltr" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4077"><font id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4448" color="#808080"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3735">It may work also without escaping as</span></font></div><div dir="ltr" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4116"><font id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4497" color="#808080"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3735">"select geometry, "building" as bldg,"building:levels" as bldg_levels,height as height from multipolygons ... "</span></font></div><div dir="ltr" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4449"><font color="#808080"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3735"><br clear="none"></span></font></div></blockquote><div dir="ltr" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4118"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3735">We tried something similar few days ago:</span></div><div dir="ltr" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4582"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3735"><br clear="none"></span></div><blockquote id="yui_3_16_0_ym19_1_1479139023307_6277"><div dir="ltr" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4629"><div dir="ltr" id="yui_3_16_0_ym19_1_1479139023307_4012"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3735">"C:\gdal\ogr2ogr.exe" --config OSM_USE_CUSTOM_INDEXING NO -skipfailures -f "ESRI Shapefile" <b id="yui_3_16_0_ym19_1_1479139023307_10707">-dialect sqlite -sql "select geometry, building as bldg, \"building:levels\" as bldg_level, height as height from multipolygons"</b> "C:\output_shp_files" "C:\input.osm"<br clear="none"></span></div></div></blockquote><div dir="ltr" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4584"><div id="yui_3_16_0_ym19_1_1479139023307_8222"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3735">and it created a .shp file with invalid "building:level" values.</span></div><div id="yui_3_16_0_ym19_1_1479139023307_8227" dir="ltr">What confuses me now is where to insert the newly added "<span id="yui_3_16_0_ym19_1_1479139023307_8434"><b id="yui_3_16_0_ym19_1_1479139023307_8435">is not null limit 1" </b>part.<b id="yui_3_16_0_ym19_1_1479139023307_8435"><br></b></span></div><div id="yui_3_16_0_ym19_1_1479139023307_8221"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3735"><br></span></div><div id="yui_3_16_0_ym19_1_1479139023307_8466"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3735"><br></span></div><div id="yui_3_16_0_ym19_1_1479139023307_6437"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3735">By the way, I have just tested the syntax you gave me today, with "building:levels" field:</span></div><blockquote id="yui_3_16_0_ym19_1_1479139023307_8563"><div id="yui_3_16_0_ym19_1_1479139023307_8541" dir="ltr"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3735">"C:\gdal\ogr2ogr.exe" --config OSM_USE_CUSTOM_INDEXING NO -skipfailures -f "ESRI Shapefile" <b id="yui_3_16_0_ym19_1_1479139023307_8687">-dialect sqlite -sql "select geometry, \"building:levels\" as bldg_level from multipolygons where \"building:levels\" is not null limit 1"</b> "C:\output_shp_files" "C:\input.osm"<br></span></div></blockquote><div dir="ltr" id="yui_3_16_0_ym19_1_1479139023307_6475"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3735">and it again creates shapes with "bldg_level" field, and a value "building:levels" for each shape</span>, under the "bldg_level" key.<br><br>I used ogr2ogr.exe from both GDAL 1.11.4 and GDAL 2.1.0 (downloaded from gisinternals.com).<br id="yui_3_16_0_ym19_1_1479139023307_10928"><br id="yui_3_16_0_ym19_1_1479139023307_10929">They both resulted in the same error of all shapes having the "building:levels" value for "bldg_level" key.<br><br>I tried testing on a couple of .osm files, and got the same errors on all of them.<br id="yui_3_16_0_ym19_1_1479139023307_10930"><br id="yui_3_16_0_ym19_1_1479139023307_10931">Is this a bug in ogr2ogr.exe?<br id="yui_3_16_0_ym19_1_1479139023307_10932"><br id="yui_3_16_0_ym19_1_1479139023307_10933">If it is, whom do I need to contact?<br><br>Or is this a conflict with the osmconf.ini file's settings?<br>I uploaded it in here:<br><a href="https://www.dropbox.com/s/rp242or1lhwggoo/osmconf.ini?dl=0" id="yui_3_16_0_ym19_1_1479139023307_13182" class="">https://www.dropbox.com/s/rp242or1lhwggoo/osmconf.ini?dl=0</a><br id="yui_3_16_0_ym19_1_1479139023307_10934"><br id="yui_3_16_0_ym19_1_1479139023307_10935">Thank you and my apologies for further disturbance.<br></div><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3735"></span></div> <div class="qtdSeparateBR"><br><br></div><div class="yiv9851596120yqt7226834154" id="yiv9851596120yqt41667"><div class="yiv9851596120qtdSeparateBR" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3724"><br clear="none">----------------<br clear="none"></div></div></div></div></div><div class=".yiv9851596120yahoo_quoted"> <div id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3585" style="font-family:verdana, helvetica, sans-serif;font-size:13px;"> <div id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3584" style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"> <div dir="ltr" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3603"><font id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3602" size="2" face="Arial"> On Monday, November 14, 2016 4:44 PM, Rahkonen Jukka (MML) <jukka.rahkonen@maanmittauslaitos.fi> wrote:<br clear="none"></font></div>  <br clear="none"><br clear="none"> <div class="yiv9851596120y_msg_container" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3583"><div id="yiv9851596120">

 
 
<style>#yiv9851596120 #yiv9851596120 --
  
 filtered  {font-family:Helvetica;panose-1:2 11 6 4 2 2 2 2 2 4;}
#yiv9851596120 filtered  {panose-1:2 4 5 3 5 4 6 3 2 4;}
#yiv9851596120 filtered  {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}
#yiv9851596120 filtered  {font-family:Verdana;panose-1:2 11 6 4 3 5 4 4 2 4;}
#yiv9851596120   
 p.yiv9851596120MsoNormal, #yiv9851596120  li.yiv9851596120MsoNormal, #yiv9851596120  div.yiv9851596120MsoNormal
        {margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;}
#yiv9851596120  a:link, #yiv9851596120  span.yiv9851596120MsoHyperlink
        {
color:blue;text-decoration:underline;}
#yiv9851596120  a:visited, #yiv9851596120  span.yiv9851596120MsoHyperlinkFollowed
        {
color:purple;text-decoration:underline;}
#yiv9851596120  p.yiv9851596120msonormal, #yiv9851596120  li.yiv9851596120msonormal, #yiv9851596120  div.yiv9851596120msonormal
        {

margin-right:0cm;
margin-left:0cm;font-size:12.0pt;}
#yiv9851596120  p.yiv9851596120msochpdefault, #yiv9851596120  li.yiv9851596120msochpdefault, #yiv9851596120  div.yiv9851596120msochpdefault
        {

margin-right:0cm;
margin-left:0cm;font-size:12.0pt;}
#yiv9851596120  p.yiv9851596120msonormal1, #yiv9851596120  li.yiv9851596120msonormal1, #yiv9851596120  div.yiv9851596120msonormal1
        {
margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;}
#yiv9851596120  p.yiv9851596120msochpdefault1, #yiv9851596120  li.yiv9851596120msochpdefault1, #yiv9851596120  div.yiv9851596120msochpdefault1
        {

margin-right:0cm;
margin-left:0cm;font-size:10.0pt;}
#yiv9851596120  span.yiv9851596120msohyperlink
        {}
#yiv9851596120  span.yiv9851596120msohyperlinkfollowed
        {}
#yiv9851596120  span.yiv9851596120shkpostityyli17
        {}
#yiv9851596120  span.yiv9851596120shkpostityyli18
        {}
#yiv9851596120  span.yiv9851596120msohyperlink1
        {
color:blue;text-decoration:underline;}
#yiv9851596120  span.yiv9851596120msohyperlinkfollowed1
        {
color:purple;text-decoration:underline;}
#yiv9851596120  span.yiv9851596120shkpostityyli171
        {
color:#1F497D;}
#yiv9851596120  span.yiv9851596120shkpostityyli181
        {
color:windowtext;}
#yiv9851596120  span.yiv9851596120Shkpostityyli29
        {
color:#1F497D;}
#yiv9851596120  span.yiv9851596120Shkpostityyli30
        {
color:#1F497D;}
#yiv9851596120  .yiv9851596120MsoChpDefault
        {
font-size:10.0pt;}
#yiv9851596120 filtered  {
margin:70.85pt 2.0cm 70.85pt 2.0cm;}
#yiv9851596120  div.yiv9851596120WordSection1
        {}
#yiv9851596120 </style>

<div id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3582">
<div class="yiv9851596120WordSection1" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3581">
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3580"><span style="font-size:11.0pt;color:#1F497D;" lang="EN-US">Hi,</span></div> 
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4501"><span style="font-size:11.0pt;color:#1F497D;" lang="EN-US">  </span></div> 
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3786"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3785" style="font-size:11.0pt;color:#1F497D;" lang="EN-US">If your version and environment requires escaping, then you need to do</span></div> 
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3604"><span style="font-size:11.0pt;color:#1F497D;" lang="EN-US">  </span></div> 
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3780"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3779" style="font-size:11.0pt;color:#1F497D;" lang="EN-US">"select geometry, \"building\" as bldg,\"building:levels\" as bldg_levels,\”height\” as height from multipolygons ...
 "</span></div> 
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3782"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3781" style="font-size:11.0pt;color:#1F497D;" lang="EN-US">It may work also without escaping as</span></div> 
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3784"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3783" style="font-size:11.0pt;color:#1F497D;" lang="EN-US">"select geometry, "building" as bldg,"building:levels" as bldg_levels,height as height from multipolygons ... "</span></div> 
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3913"><span style="font-size:11.0pt;color:#1F497D;" lang="EN-US">  </span></div> 
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3910"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3909" style="font-size:11.0pt;color:#1F497D;" lang="EN-US">If you plan to follow the SQL route I really recommend you to read some SQL tutorials and exercise at home. I am sure
 that you will learn the basics soon and tutorials are always in the web while I am not. SQL is so close to English and that you can think that you are making a (comma separated) shopping list</span></div> 
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3912"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3911" style="font-size:11.0pt;color:#1F497D;" lang="EN-US">“SELECT milk,bread,juice FROM Wal-Mart”.</span></div> 
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4632"><span style="font-size:11.0pt;color:#1F497D;" lang="EN-US">  </span></div> 
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3606"><span style="font-size:11.0pt;color:#1F497D;" lang="EN-US">-Jukka-</span></div> 
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3605"><span style="font-size:11.0pt;color:#1F497D;" lang="EN-US">  </span></div> 
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4558"><span style="font-size:11.0pt;color:#1F497D;" lang="EN-US">  </span></div> 
<div class="yiv9851596120MsoNormal"><span style="font-size:11.0pt;color:#1F497D;" lang="EN-US">  </span></div> 
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4633"><span style="font-size:11.0pt;color:#1F497D;" lang="EN-US">  </span></div> 
<div id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3617">
<div id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3616" style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm;">
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3615"><b><span style="font-size:11.0pt;">Lähettäjä:</span></b><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4502" style="font-size:11.0pt;"> Djordje Spasic [<a rel="nofollow" shape="rect" ymailto="mailto:issworld2000@yahoo.com" target="_blank" href="mailto:issworld2000@yahoo.com">mailto:issworld2000@yahoo.com</a>]
<br clear="none">
<b>Lähetetty:</b> 14. marraskuuta 2016 17:21<br clear="none">
<b>Vastaanottaja:</b> Rahkonen Jukka (MML) <<a rel="nofollow" shape="rect" ymailto="mailto:jukka.rahkonen@maanmittauslaitos.fi" target="_blank" href="mailto:jukka.rahkonen@maanmittauslaitos.fi">jukka.rahkonen@maanmittauslaitos.fi</a>>;
<a rel="nofollow" shape="rect" ymailto="mailto:gdal-dev@lists.osgeo.org" target="_blank" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br clear="none">
<b>Aihe:</b> Re: VS: [gdal-dev] How to replace an osm key?</span></div> 
</div>
</div>
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4557">  </div> 
<div id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3637">
<div id="yiv9851596120yui_3_16_0_ym19_1_1479135998950_10027">
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3636" style="margin-bottom:12.0pt;background:white;"><span style="font-size:10.0pt;color:black;">Thank you Jukka,<br clear="none">
<br clear="none">
How should I edit the command you gave me:</span></div> 
</div>
<blockquote id="yiv9851596120yui_3_16_0_ym19_1_1479135998950_11970" style="margin-top:5.0pt;margin-bottom:5.0pt;">
<div id="yiv9851596120yui_3_16_0_ym19_1_1479135998950_10081">
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_3638" style="margin-bottom:12.0pt;background:white;"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4503" style="font-size:10.0pt;color:black;">"C:\gdal\ogr2ogr.exe" --config OSM_USE_CUSTOM_INDEXING NO -skipfailures -f "ESRI Shapefile"
<b id="yiv9851596120yui_3_16_0_ym19_1_1479135998950_12008">-dialect sqlite -sql "select geometry, \"building\" as bldg from multipolygons where \"building\" is not null limit 1"</b> "C:\output_shp_files" "C:\input.osm"</span></div> 
</div>
</blockquote>
<div id="yiv9851596120yui_3_16_0_ym19_1_1479135998950_11918">
<div class="yiv9851596120MsoNormal" style="margin-bottom:12.0pt;background:white;"><span style="font-size:10.0pt;color:black;">so that "building", "building:levels", and "height" fields are included, not only the "building" field?</span></div> 
</div>
<div id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4636">
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4635" style="margin-bottom:12.0pt;background:white;"><span style="font-size:10.0pt;color:black;">  </span></div> 
</div>
<div id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4533">
<div id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4532">
<div id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4531">
<div id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4530">
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4529" style="background:white;"><span style="font-size:10.0pt;color:black;" lang="EN-US">On Monday, November 14, 2016 2:10 PM, Rahkonen Jukka (MML) <</span><span style="font-size:10.0pt;color:black;"><a rel="nofollow" shape="rect" ymailto="mailto:jukka.rahkonen@maanmittauslaitos.fi" target="_blank" href="mailto:jukka.rahkonen@maanmittauslaitos.fi"><span lang="EN-US">jukka.rahkonen@maanmittauslaitos.fi</span></a></span><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4634" style="font-size:10.0pt;color:black;" lang="EN-US">>
 wrote:</span><span style="color:black;" lang="EN-US"></span></div> 
</div>
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4637" style="margin-bottom:12.0pt;background:white;"><span style="color:black;" lang="EN-US">  </span></div> 
<div id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4642">
<div id="yiv9851596120">
<div id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4641">
<div id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4640">
<div>
<div class="yiv9851596120MsoNormal" style="background:white;"><span style="font-size:11.0pt;color:black;" lang="EN-US">Hi,</span><span style="color:black;"></span></div> 
</div>
<div>
<div class="yiv9851596120MsoNormal" style="background:white;"><span style="font-size:11.0pt;color:black;" lang="EN-US"> </span><span style="color:black;"></span></div> 
</div>
<div>
<div class="yiv9851596120MsoNormal" style="background:white;"><span style="font-size:11.0pt;color:black;" lang="EN-US">If you enclose something between single quotes in SQL it becomes a string. 
</span><span style="color:black;"></span></div> 
</div>
<div>
<div class="yiv9851596120MsoNormal" style="background:white;"><span style="font-size:11.0pt;color:black;" lang="EN-US">SELECT ’building’  -> selects literally the given *<b>string</b>* –building—</span><span style="color:black;"></span></div> 
</div>
<div>
<div class="yiv9851596120MsoNormal" style="background:white;"><span style="font-size:11.0pt;color:black;" lang="EN-US">However,</span><span style="color:black;"></span></div> 
</div>
<div>
<div class="yiv9851596120MsoNormal" style="background:white;"><span style="font-size:11.0pt;color:black;" lang="EN-US"> </span><span style="color:black;"></span></div> 
</div>
<div id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4639">
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4638" style="background:white;"><span style="font-size:11.0pt;color:black;" lang="EN-US">SELECT "building" -> selects the *<b>value</b>* of *<b>field</b>* –building-- (or “identifier” as is it called in SQL)</span><span style="color:black;"></span></div> 
</div>
<div>
<div class="yiv9851596120MsoNormal" style="background:white;"><span style="font-size:11.0pt;color:black;" lang="EN-US"> </span><span style="color:black;"></span></div> 
</div>
<div>
<div class="yiv9851596120MsoNormal" style="background:white;"><span style="font-size:11.0pt;color:black;" lang="EN-US">See for example
<a rel="nofollow" shape="rect" target="_blank" href="https://www.sqlite.org/lang_keywords.html">https://www.sqlite.org/lang_keywords.html</a></span><span style="color:black;"></span></div> 
</div>
<div>
<div class="yiv9851596120MsoNormal" style="background:white;"><span style="font-size:11.0pt;color:black;" lang="EN-US"> </span><span style="color:black;"></span></div> 
</div>
<div>
<div class="yiv9851596120MsoNormal" style="background:white;"><span style="font-size:11.0pt;color:black;" lang="EN-US">I tested on Windows with trunk version of GDAL that this syntax works:</span><span style="color:black;"></span></div> 
</div>
<div id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4653">
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4652" style="background:white;"><span style="font-size:11.0pt;color:black;" lang="EN-US"> </span><span style="color:black;"></span></div> 
</div>
<div id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4655">
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4654" style="background:white;"><span style="font-size:11.0pt;color:black;" lang="EN-US">ogrinfo -dialect sqlite -sql "select geometry, "building" as bldg
</span><span style="color:black;"></span></div> 
</div>
<div>
<div class="yiv9851596120MsoNormal" style="background:white;"><span style="font-size:11.0pt;color:black;" lang="EN-US">from multipolygons where "building" is not null limit 1" hamburg-latest.osm.pbf</span><span style="color:black;"></span></div> 
</div>
<div>
<div class="yiv9851596120MsoNormal" style="background:white;"><span style="font-size:11.0pt;color:black;" lang="EN-US"> </span><span style="color:black;"></span></div> 
</div>
<div id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4648">
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4647" style="background:white;"><span id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4646" style="font-size:11.0pt;color:black;" lang="EN-US">By reading this old thread
<a rel="nofollow" shape="rect" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4645" target="_blank" href="http://osgeo-org.1560.x6.nabble.com/gdal-dev-OGR-SQL-Excecuting-select-where-column-name-contains-quot-quot-td5006377.html">
http://osgeo-org.1560.x6.nabble.com/gdal-dev-OGR-SQL-Excecuting-select-where-column-name-contains-quot-quot-td5006377.html</a> some older GDAL versions may need some more tweaking and inner double quotes must be escaped by back slash as \”</span><span style="color:black;"></span></div> 
</div>
<div id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4644">
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4643" style="background:white;"><span style="font-size:11.0pt;color:black;" lang="EN-US"> </span><span style="color:black;"></span></div> 
</div>
<div>
<div class="yiv9851596120MsoNormal" style="background:white;"><span style="font-size:11.0pt;color:black;" lang="EN-US">ogrinfo -dialect sqlite -sql "select geometry, \"building\" as bldg
</span><span style="color:black;"></span></div> 
</div>
<div>
<div class="yiv9851596120MsoNormal" style="background:white;"><span style="font-size:11.0pt;color:black;" lang="EN-US">from multipolygons where \"building\" is not null limit 1" hamburg-latest.osm.pbf</span><span style="color:black;"></span></div> 
</div>
<div>
<div class="yiv9851596120MsoNormal" style="background:white;"><span style="font-size:11.0pt;color:black;" lang="EN-US"> </span><span style="color:black;"></span></div> 
</div>
<div>
<div class="yiv9851596120MsoNormal" style="background:white;"><span style="font-size:11.0pt;color:black;" lang="EN-US"> </span><span style="color:black;"></span></div> 
</div>
<div>
<div class="yiv9851596120MsoNormal" style="background:white;"><span style="font-size:11.0pt;color:black;" lang="EN-US">-Jukka Rahkonen-</span><span style="color:black;"></span></div> 
</div>
<div id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4688">
<div class="yiv9851596120MsoNormal" id="yiv9851596120yui_3_16_0_ym19_1_1479138578364_4687" style="background:white;"><span style="font-size:11.0pt;color:black;" lang="EN-US"> </span><span style="color:black;"></span></div> 
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

</div><br clear="none"><br clear="none"></div>  </div> </div>  </div></div></body></html>