<html><head></head><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1478869614109_27911"><span></span></div> <div class="qtdSeparateBR" id="yui_3_16_0_ym19_1_1478869614109_27778">Thank you for the reply Jukka.<br><div id="yui_3_16_0_ym19_1_1478869614109_27960"><br></div><blockquote id="yui_3_16_0_ym19_1_1478869614109_33437"><div dir="ltr" id="yui_3_16_0_ym19_1_1478869614109_27864"><font id="yui_3_16_0_ym19_1_1478869614109_33837" color="#808080"><span style="font-size:10.0pt;" id="yui_3_16_0_ym19_1_1478869614109_27850" lang="EN-US">> and you must run the query 
separately for all the layers ( points, lines, multilinestrings, 
multipolygons).</span></font></div></blockquote><div id="yui_3_16_0_ym19_1_1478869614109_31455">What does this part mean?<br>That I need to call ogr2ogr.exe four times:</div><blockquote id="yui_3_16_0_ym19_1_1478869614109_33366"><div dir="ltr" id="yui_3_16_0_ym19_1_1478869614109_33321">ogr2ogr.exe --config OSM_USE_CUSTOM_INDEXING NO -skipfailures -f "ESRI Shapefile" -dialect sqlite –sql "select geometry, building as bldg from <b>multipolygons</b>” output.shp input.osm<br id="yui_3_16_0_ym19_1_1478869614109_33315"><br id="yui_3_16_0_ym19_1_1478869614109_33316">ogr2ogr.exe --config OSM_USE_CUSTOM_INDEXING NO -skipfailures -f "ESRI Shapefile" -dialect sqlite –sql "select geometry, building as bldg from <b>points</b>” output.shp input.osm<br id="yui_3_16_0_ym19_1_1478869614109_33317"><br id="yui_3_16_0_ym19_1_1478869614109_33318">ogr2ogr.exe --config OSM_USE_CUSTOM_INDEXING NO -skipfailures -f "ESRI Shapefile" -dialect sqlite –sql "select geometry, building as bldg from <b>lines</b>” output.shp input.osm<br id="yui_3_16_0_ym19_1_1478869614109_33319"><br id="yui_3_16_0_ym19_1_1478869614109_33320">ogr2ogr.exe --config OSM_USE_CUSTOM_INDEXING NO -skipfailures -f "ESRI Shapefile" -dialect sqlite –sql "select geometry, building as bldg from <b>multilinestrings</b>” output.shp input.osm</div></blockquote><div dir="ltr" id="yui_3_16_0_ym19_1_1478869614109_33341">?<br></div><div id="yui_3_16_0_ym19_1_1478869614109_29719">Doesn't "building:..." key (field) only exist among the multipolygons?<br></div><div id="yui_3_16_0_ym19_1_1478869614109_29720"><br></div><div id="yui_3_16_0_ym19_1_1478869614109_29718"><br></div><div id="yui_3_16_0_ym19_1_1478869614109_33558"><br></div><blockquote id="yui_3_16_0_ym19_1_1478869614109_33577"><div dir="ltr" id="yui_3_16_0_ym19_1_1478869614109_33478"><font id="yui_3_16_0_ym19_1_1478869614109_33700" color="#808080">> You must edit the SQL parameter to include all the fields that you want to get into the result  "select geometry, building as bldg, another_attribute as attr_2 …”</font></div></blockquote><div dir="ltr" id="yui_3_16_0_ym19_1_1478869614109_33455">I didn't understand you this part either.<br><br>The <i id="yui_3_16_0_ym19_1_1478869614109_33796">"select geometry, building as bldg, another_attribute as attr_2 …”</i> part needs to include only those keys (fields) which I would like to get changed? Not all the others which I would like to have them remain the same as in original .osm file?<br><br>If I misunderstood you, can you please provide an example syntax?<br><br>Thank you, and my apology for further disturbance.<br><br>Djordje<br></div><div id="yui_3_16_0_ym19_1_1478869614109_33496"><br></div><div id="yui_3_16_0_ym19_1_1478869614109_33842"><br></div><div id="yui_3_16_0_ym19_1_1478869614109_29666">----------------</div></div><div class="yahoo_quoted" id="yui_3_16_0_ym19_1_1478869614109_27777" style="display: block;"> <div style="font-family: verdana, helvetica, sans-serif; font-size: 13px;" id="yui_3_16_0_ym19_1_1478869614109_27776"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1478869614109_27775"> <div dir="ltr" id="yui_3_16_0_ym19_1_1478869614109_27774"><font id="yui_3_16_0_ym19_1_1478869614109_29665" size="2" face="Arial"> On Friday, November 11, 2016 3:14 PM, Rahkonen Jukka (MML) <jukka.rahkonen@maanmittauslaitos.fi> wrote:<br></font></div>  <br> <div class="y_msg_container" id="yui_3_16_0_ym19_1_1478869614109_27783"><div id="yiv4201955791"><style>#yiv4201955791 #yiv4201955791 --
 
 _filtered #yiv4201955791 {font-family:Helvetica;panose-1:2 11 6 4 2 2 2 2 2 4;}
 _filtered #yiv4201955791 {panose-1:2 4 5 3 5 4 6 3 2 4;}
 _filtered #yiv4201955791 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}
 _filtered #yiv4201955791 {font-family:Verdana;panose-1:2 11 6 4 3 5 4 4 2 4;}
#yiv4201955791  
#yiv4201955791 p.yiv4201955791MsoNormal, #yiv4201955791 li.yiv4201955791MsoNormal, #yiv4201955791 div.yiv4201955791MsoNormal
        {margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;}
#yiv4201955791 a:link, #yiv4201955791 span.yiv4201955791MsoHyperlink
        {color:blue;text-decoration:underline;}
#yiv4201955791 a:visited, #yiv4201955791 span.yiv4201955791MsoHyperlinkFollowed
        {color:purple;text-decoration:underline;}
#yiv4201955791 span.yiv4201955791Shkpostityyli17
        {color:#1F497D;}
#yiv4201955791 .yiv4201955791MsoChpDefault
        {font-size:10.0pt;}
 _filtered #yiv4201955791 {margin:70.85pt 2.0cm 70.85pt 2.0cm;}
#yiv4201955791 div.yiv4201955791WordSection1
        {}
#yiv4201955791 </style><div id="yui_3_16_0_ym19_1_1478869614109_27782">
<div class="yiv4201955791WordSection1" id="yui_3_16_0_ym19_1_1478869614109_27781">
<div class="yiv4201955791MsoNormal" id="yui_3_16_0_ym19_1_1478869614109_29717"><span style="font-size:11.0pt;" lang="EN-US">Hi,</span></div> 
<div class="yiv4201955791MsoNormal" id="yui_3_16_0_ym19_1_1478869614109_27925"><span style="font-size:11.0pt;" lang="EN-US">  </span></div> 
<div class="yiv4201955791MsoNormal" id="yui_3_16_0_ym19_1_1478869614109_27780"><span style="font-size:11.0pt;" id="yui_3_16_0_ym19_1_1478869614109_27779" lang="EN-US">Ogrinfo and ogr2ogr usually accept the same syntax and therefore I gave the ogrinfo example. I apologize, it can’t be
 self-evident for all GDAL users.</span></div> 
<div class="yiv4201955791MsoNormal" id="yui_3_16_0_ym19_1_1478869614109_31470"><span style="font-size:11.0pt;" lang="EN-US">  </span></div> 
<div class="yiv4201955791MsoNormal" id="yui_3_16_0_ym19_1_1478869614109_31457"><span style="font-size:11.0pt;" id="yui_3_16_0_ym19_1_1478869614109_31456" lang="EN-US">You can do the whole thing with one command like this:
</span></div> 
<div class="yiv4201955791MsoNormal" id="yui_3_16_0_ym19_1_1478869614109_29716"><span style="font-size:11.0pt;" lang="EN-US">  </span></div> 
<div class="yiv4201955791MsoNormal" style="background:white;" id="yui_3_16_0_ym19_1_1478869614109_27927"><span style="font-size:10.0pt;" id="yui_3_16_0_ym19_1_1478869614109_27926" lang="EN-US">ogr2ogr.exe --config OSM_USE_CUSTOM_INDEXING NO -skipfailures -f "ESRI Shapefile"
</span></div> 
<div class="yiv4201955791MsoNormal" style="background:white;" id="yui_3_16_0_ym19_1_1478869614109_31459"><span style="font-size:10.0pt;" id="yui_3_16_0_ym19_1_1478869614109_31458" lang="EN-US">-dialect sqlite –sql "select geometry, building as bldg from multipolygons” output.shp input.osm</span></div> 
<div class="yiv4201955791MsoNormal" style="background:white;" id="yui_3_16_0_ym19_1_1478869614109_31460"><span style="font-size:10.0pt;" lang="EN-US">  </span></div> 
<div class="yiv4201955791MsoNormal" style="background:white;" id="yui_3_16_0_ym19_1_1478869614109_27785"><span style="font-size:10.0pt;" id="yui_3_16_0_ym19_1_1478869614109_27784" lang="EN-US">You must edit the SQL parameter to include all the fields that you want to get into the result  "select geometry, building
 as bldg, another_attribute as attr_2 …” and you must run the query separately for all the layers ( points, lines, multilinestrings, multipolygons).</span></div> 
<div class="yiv4201955791MsoNormal" style="background:white;" id="yui_3_16_0_ym19_1_1478869614109_27827"><span style="font-size:10.0pt;" lang="EN-US">  </span></div> 
<div class="yiv4201955791MsoNormal" style="background:white;" id="yui_3_16_0_ym19_1_1478869614109_27828"><span style="font-size:10.0pt;" id="yui_3_16_0_ym19_1_1478869614109_27829">-Jukka Rahkonen-</span></div> 
</div>
</div></div><br><br></div>  </div> </div>  </div></div></body></html>