0

I am trying to load a point layer in QGIS (3.0.2) using DB Manager. I have a non-spatial table, which I imported to the Geopackage from CSV (and needed to implement the .csvt approach to import the column types correctly - https://anitagraser.com/2011/03/07/how-to-specify-data-types-of-csv-columns-for-use-in-qgis/ )

Using SQL, I have worked out how to create a geometry column from two in my table (lat, long) using makepoint(), which means I should be able to create a point layer with a subset of my table columns and load in QGIS:

Select Mykey, makepoint( "P1_location_Longitude" , "P1_location_Latitude") as geometry, "Photo1" from MyTable

However, when I load the layer it does not render any points (even though the attribute table has all values from the parent table). When checking the layer properties the symbology tab is blank (i.e. no symbol rendering is possible) and the Error console shows the message no renderer for this layer.

Same behaviour in QGIS 2.18.3.

How do I specify a symbology or allow the points to be rendered for this layer?

If I create an Sqlite database, and complete the same operations (i.e. import the CSV, use the same query and the same settings in DB Manager) the layer is rendered as expected, so I wonder if it is an issue with Geopackage format in QGIS?

I haven't found any reports of this being a problem / bug so I'm assuming that I'm missing something.

  • 2
    where is the geopackage in this? What sort of database are you using in DB Manager? how do you create the points using SQL? what projection is your data/map in? – Ian Turton Jun 28 '18 at 11:44
  • In answer to the 'where is the geopackage' question, I am using geopackage format to store my (vector) data and querying it to load points from a non-spatial table (that was imported from CSV) within the geopackage. However, I've just 'solved' this by trying to get the console error to be displayed. If I open the 'layer labelling' dialogue and select 'show labels for this layer', then the layer instantly changes to a point layer, displays a label and point at the expected location. So I think this might be a bug with rendering? – SeeWhy Jun 28 '18 at 13:11
  • So if I get a crash and want to report it, but can't remember my password for issues.qgis.org how do I do it? I can't find a way of resetting the password, and I can't register again as my email address is already allocated. I last logged in in 2016... The crash occurs when changing the symbology from none to 'single' using the above described method of loading a layer (doesn't occur if I show labels first). – SeeWhy Jun 28 '18 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.