https://issues.qgis.org/https://issues.qgis.org/favicon.ico2018-11-14T17:15:00ZQGIS Issue TrackingQGIS Application - Bug report #20487: Geometry type not detected when loading query to canvas using MakePoint for geometry (DBManager)https://issues.qgis.org/issues/20487?journal_id=960672018-11-14T17:15:00ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Feedback</i></li><li><strong>Category</strong> changed from <i>Map Canvas</i> to <i>DB Manager</i></li></ul><p>Please attach a sample of your data.</p> QGIS Application - Bug report #20487: Geometry type not detected when loading query to canvas using MakePoint for geometry (DBManager)https://issues.qgis.org/issues/20487?journal_id=960832018-11-14T18:56:35ZChris York
<ul></ul><p>Giovanni Manghi wrote:</p>
<blockquote>
<p>Please attach a sample of your data.</p>
</blockquote>
<p>A sample point from CSV (with the location 'rounded'!) - I loaded the CSV as a delimited text file as a layer and imported the layer into a GPKG database as a non-spatial table (MyTable). I have also imported directly into DBManager using a csvt file to ensure field types are correct</p>
<p><code>Number,Reason,Start-Latitude,Start-Longitude,Start-Altitude,Start-Accuracy,Photo1,P1_location-Latitude,P1_location-Longitude,P1_location-Altitude,P1_location-Accuracy<br />1,Start,56,-4,10,3,6798.jpg,56,-4,10,4<br /></code></p>
<p>Table structure (copied from DB Manager)</p>
<p>\# Name Type Null <br /> 0 fid INTEGER N <br /> 1 Number MEDIUMINT Y <br /> 2 Reason <abbr title="255">TEXT</abbr> Y <br /> 3 Start-Latitude REAL Y <br /> 4 Start-Longitude REAL Y <br /> 5 Start-Altitude MEDIUMINT Y <br /> 6 Start-Accuracy MEDIUMINT Y <br /> 7 Photo1 <abbr title="255">TEXT</abbr> Y <br /> 8 P1_location-Latitude REAL Y <br /> 9 P1_location-Longitude REAL Y <br /> 10 P1_location-Altitude MEDIUMINT Y <br /> 11 P1_location-Accuracy MEDIUMINT Y</p>
<p>My query is:</p>
<p><code>Select "Number", "Reason", "Photo1" as Image,"P1_location-Accuracy" as GPS_Accuracy, MakePoint( "P1_location-Longitude" , "P1_location-Latitude") as geometry from MyTable<br /></code><br />In DBManager I select 'load as new layer' and use "Geometry" as my Geometry column</p>
<p>This is a simplified version of my data - the actual table has many more columns... I also have a separate unique key which I add to the query, which is another column from MyTable.</p> QGIS Application - Bug report #20487: Geometry type not detected when loading query to canvas using MakePoint for geometry (DBManager)https://issues.qgis.org/issues/20487?journal_id=961362018-11-15T16:04:55ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Open</i></li></ul><p>SQL console in db manager gives empty error messages dialogs, so I give up try troubleshooting this.<br />For real work stay on 2.18 still.</p> QGIS Application - Bug report #20487: Geometry type not detected when loading query to canvas using MakePoint for geometry (DBManager)https://issues.qgis.org/issues/20487?journal_id=970852018-12-10T10:08:49ZAlessandro Pasotti
<ul></ul><p>If somebody could share a test project and data I could have a look.</p> QGIS Application - Bug report #20487: Geometry type not detected when loading query to canvas using MakePoint for geometry (DBManager)https://issues.qgis.org/issues/20487?journal_id=971512018-12-11T13:17:36ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/download/13931/test1.gpkg">test1.gpkg</a> added</li></ul><p>Alessandro Pasotti wrote:</p>
<blockquote>
<p>If somebody could share a test project and data I could have a look.</p>
</blockquote>
<p>attached</p>