I am trying to import an sqlite file to the QGIS DB Manager with default import settings. While the layer displays fine in the graphical interface, the DB Manager only partially loads it, stopping after 2K of 500K rows, citing that the table "violates Geometry constraint [geom-type or SRID not allowed]". What am I doing wrong?
update your_table set geometry=ST_Centroid(geometry);or saferCREATE TABLE centroids AS SELECT ST_Centroid(geometry) as geometry, attribute_1, attribute_2 ... FROM your_table. You must also register the geometry column of the new table before QGIS finds it. Spatialite-gui has tools for that.