<br><br><div style="visibility: hidden; display: inline;" id="avg_ls_inline_popup"></div><style type="text/css">#avg_ls_inline_popup {  position:absolute;  z-index:9999;  padding: 0px 0px;  margin-left: 0px;  margin-top: 0px;  width: 240px;  overflow: hidden;  word-wrap: break-word;  color: black;  font-size: 10px;  text-align: left;  line-height: 13px;}</style><div class="gmail_quote">
2010/7/30 Andrey Khmelevskiy <span dir="ltr">&lt;<a href="mailto:kmelevskiy@gmail.com">kmelevskiy@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>1) I need to convert .tab file into .shp format. <br><br>I&#39;ve got error by using following command:<br>C:\Program Files\FWTools2.4.7&gt;ogr2ogr -f &quot;ESRI Shapefile&quot; test.shp SHP.shp<br><br>The error:<br>

ERROR 1: Attempt to write non-linestring (POINT) geometry to ARC type shapefile.<br>ERROR 1: Terminating translation prematurely after failed<br>translation of layer tab (use -skipfailures to skip errors)<br>C:\Program Files\FWTools2.4.7&gt;ogr2ogr -f &quot;ESRI Shapefile&quot; test.shp tab.TAB<br>

ERROR 1: test.shp is not a directory.<br>ESRI Shapefile driver failed to create test.shp<br><br>It am sure it is general practice that .tab files contain multityped data in it (points, lines, polygonds).<br>I wonder how to handle tab-&gt;shp conversion by using ogr2ogr function?<br>
</blockquote><div><br>Andrey,<br><br>You may use the -sql option to select a particuar shape type to be converted:<br><br><pre class="fragment">SELECT * FROM table WHERE OGR_GEOMETRY=<span class="stringliteral">&#39;POLYGON&#39;</span><span class="stringliteral"></span><br>
</pre>for more information about OGR sql see: <a href="http://www.gdal.org/ogr/ogr_sql.html">http://www.gdal.org/ogr/ogr_sql.html</a> <br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>Another relative issue I have:<br>2)During the same conversion tab-&gt;shp I&#39;ve got next message wich means that the field name &#39;Flood_Risk_Comment&#39;  will be reduce to &#39;Flood_Ri_1&#39; in resulting shp attribute table:<br>

C:\Program Files\FWTools2.4.7&gt;ogr2ogr -f &quot;ESRI Shapefile&quot; test_pnt.shp tab_pnt.TAB<br>Warning 6: Normalized/laundered field name: &#39;Flood_Risk_Comment&#39; to &#39;Flood_Ri_1&#39;<br>Any idea how to handle filed name reduction issue?<br>

<br></blockquote><div><br>Field names can only be maximum 10 character length with the shape format. I&#39;m not aware of any workaround to this issue. You may however rename the fields to a more reasonable &#39;short&#39; name by using the OGR sql field name alias option, see the document referred above.<br>
 <br></div></div>Best regards,<br><br>Tamas<br><br>