<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Brent,</p>
    <p><br>
    </p>
    <p>I've reproduced this issue. ogrinfo/ogr2ogr works, but QGIS is
      unable to read it properly.</p>
    <p><br>
    </p>
    <p>Please fill a bug report.</p>
    <p><br>
    </p>
    <p>Regards,</p>
    <p><br>
    </p>
    <p>Jorge Gustavo<br>
    </p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 20/12/21 02:11, Brent Wood wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:SY4PR01MB70766B1277B26C28A7F6CA5BA17B9@SY4PR01MB7076.ausprd01.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        Hi,</div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        I'm looking to open a sqlite3 (not spatialite) database in QGIS.</div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        I have a table in the db with a lat column & a lon column
        with EPSG:4326 coordinates<br>
      </div>
      <div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          <br>
        </div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          I have written a VRT file to enable opening the table with a
          virtual geometry column. This works fine with ogrinfo on the
          command line, but creates an empty layer with no geometry
          type, columns or features in QGIS.
          <br>
        </div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          <br>
        </div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          The VRT file contains:</div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          <br>
        </div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          <OGRVRTDataSource>
          <div>    <OGRVRTLayer name="test"></div>
          <div>       
            <SrcDataSource>test.db</SrcDataSource> </div>
          <div>        <SrcLayer>test</SrcLayer> </div>
          <div>        <GeometryType>wkbPoint</GeometryType></div>
          <div>            <LayerSRS>WGS84</LayerSRS></div>
          <div>        <GeometryField encoding="PointFromColumns"
            x="lon" y="lat"/> </div>
          <div>    </OGRVRTLayer></div>
          </OGRVRTDataSource><br>
        </div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          <br>
        </div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          Testing with ogrinfo is successful, the text returned is
          below. <br>
        </div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          <br>
        </div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          The table contents are:</div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          sqlite> select * from test;
          <div>id|lat|lon</div>
          1|-41.354|174.567<br>
        </div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          <br>
        </div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          Can anyone explain why this fails in QGIS? <br>
        </div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          I'm running QGIS v3.16.11 on Linux (deb platform)<br>
        </div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          <br>
        </div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          Thanks,</div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          <br>
        </div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          Brent Wood<br>
        </div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          <br>
        </div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          <br>
        </div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          <br>
        </div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          ogrinfo result:<br>
        </div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          <br>
        </div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          <span style="font-family: "Courier New", monospace;">ogrinfo
            -geom=YES -al test.vrt</span>
          <div><span style="font-family: "Courier New",
              monospace;">INFO: Open of `test.vrt'</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">      using driver `OGR_VRT' successful.</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">- 'VirtualXPath' [XML Path Language - XPath]</span></div>
          <div><br>
          </div>
          <div><span style="font-family: "Courier New",
              monospace;">Layer name: test</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">Geometry: Point</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">Feature Count: 1</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">Extent: (-41.354000, 174.567000) -
              (-41.354000, 174.567000)</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">Layer SRS WKT:</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">GEOGCRS["WGS 84",</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">    DATUM["World Geodetic System 1984",</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">        ELLIPSOID["WGS
              84",6378137,298.257223563,</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">            LENGTHUNIT["metre",1]]],</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">    PRIMEM["Greenwich",0,</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">       
              ANGLEUNIT["degree",0.0174532925199433]],</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">    CS[ellipsoidal,2],</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">        AXIS["geodetic latitude (Lat)",north,</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">            ORDER[1],</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">           
              ANGLEUNIT["degree",0.0174532925199433]],</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">        AXIS["geodetic longitude (Lon)",east,</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">            ORDER[2],</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">           
              ANGLEUNIT["degree",0.0174532925199433]],</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">    ID["EPSG",4326]]</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">Data axis to CRS axis mapping: 2,1</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">FID Column = rowid</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">id: Integer (0.0)</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">lat: Real (0.0)</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">lon: Real (0.0)</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">OGRFeature(test):1</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">  id (Integer) = 1</span></div>
          <div><span style="font-family: "Courier New",
              monospace;">  lat (Real) = <span>-41.354</span></span></div>
          <div><span style="font-family: "Courier New",
              monospace;">  lon (Real) = <span>174.567</span></span></div>
          <span style="font-family: "Courier New", monospace;"> 
            POINT (-41.354 174.567)</span><br>
        </div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          <br>
        </div>
        <br>
      </div>
      <table style="width: 600px; font-size: 8pt; font-family: Arial"
        cellspacing="20">
        <tbody>
          <tr>
            <td><a href="https://www.niwa.co.nz" moz-do-not-send="true"><img
src="https://www.niwa.co.nz/static/niwa-2018-horizontal-180.png"
                  moz-do-not-send="true">
              </a></td>
            <td>
              <span>Brent Wood <br>
                <font color="#1793d2">Principal Technician - GIS and
                  Spatial Data Management</font><br>
                <font color="#1793d2">Programme Leader - Environmental
                  Information Delivery</font><br>
                +64-4-386-0529<br>
                <br>
                National Institute of Water & Atmospheric Research
                Ltd (NIWA)<br>
                301 Evans Bay Parade Hataitai Wellington New Zealand<br>
                <b>Connect with NIWA:</b> <a
                  href="https://www.niwa.co.nz" moz-do-not-send="true">niwa.co.nz</a>
                <a href="https://www.facebook.com/nzniwa"
                  moz-do-not-send="true">
                  Facebook</a> <a
                  href="https://www.linkedin.com/company/niwa"
                  moz-do-not-send="true">LinkedIn</a> <a
                  href="https://twitter.com/niwa_nz"
                  moz-do-not-send="true">
                  Twitter</a> <a
                  href="https://www.instagram.com/niwa_science"
                  moz-do-not-send="true">Instagram</a> </span>
              <table style="width: 500px">
                <tbody>
                </tbody>
              </table>
            </td>
          </tr>
        </tbody>
      </table>
      <font size="1" face="Arial">To ensure compliance with legal
        requirements and to maintain cyber security standards, NIWA's IT
        systems are subject to ongoing monitoring, activity logging and
        auditing. This monitoring and auditing service may be provided
        by third parties. Such third parties can access information
        transmitted to, processed by and stored on NIWA's IT systems</font>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-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>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
</pre>
    </blockquote>
  </body>
</html>