<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Ibad -<br>
      <br>
      The problem is that MapInfo tab files can contain several types of
      geometry object all mixed together - lines, polygons, points ...
      in a single file. This is not allowed in Postgis tables used by
      QGIS.<br>
      You have to split your "multi-type" tab file into several postgis
      tables, where each table only contains one type of geoobject<br>
      <br>
      Try the following on a command line (in windows):<br>
       <br>
      <b>for %a in (multilinestring multipolygon linestring polygon
        point multipoint none) do ogr2ogr -where "OGR_GEOMETRY='%a'" -f
        "PostgreSQL" PG:"host=</b><b><i>myserver</i></b><b><i></i></b><b>
        user=</b><b><i>myuser</i></b><b><i></i></b><b> dbname=</b><b><i>mydatabase</i></b><b><i></i></b><b>
        password=</b><b><i>mypassword</i></b><b><i></i></b><b>" -nlt %a
        -nln </b><b><i>tablename</i></b><b><i></i></b><b>_%a </b><b><i>mytabfile.tab</i></b><br>
      <br>
      - Replace italic text as needed<br>
      - If the commandline is put into a .cmd file: Replace every
      occurence of %a with %%a<br>
       <br>
      The command will create 7 new layers for each tabfile. Each new
      table will only contain one type of object (Depending on the
      contents of the tabfile, some or most of the tables will be empty)
      <br>
      <br>
      Regards<br>
      Bo Victor Thomsen<br>
      Aestas-GIS<br>
      Denmark<br>
      <br>
      <br>
      Den 04-09-2013 21:03, ibad raza skrev:<br>
    </div>
    <blockquote
cite="mid:CAD0k_tejayra=dNO0ejCdrAyBQgScrM+oUQUz7GKSgs7nCg7+Q@mail.gmail.com"
      type="cite">
      <div dir="ltr">hello list
        <div><br>
        </div>
        <div>I am trying to add a mapinfo file to postgis</div>
        <div>I have tried the fwtool ogr2ogr function</div>
        <div>but the problem is that everytime I add the file, some
          records are missing</div>
        <div>these are the records with no geometry which do not get
          added in the final table</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>can anyone tell me that firstlly how can I add the rows
          without geometry in the table as well.</div>
        <div><br>
        </div>
        <div>and is there another easy way to get mapinfo file into
          postgis</div>
        <div><br>
        </div>
        <div>Thanks</div>
        <div>Ibad Raza</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a></pre>
    </blockquote>
    <br>
  </body>
</html>