Bug report #20547

Spatialite point layers are not displayed when the primary key is created in text type and a spatial index exists at the same time

Added by Claas Leiner about 6 years ago. Updated almost 6 years ago.

Status:Closed
Priority:High
Assignee:Julien Cabieces
Category:Data Provider
Affected QGIS version:3.4.1 Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:28367

Description

In QGIS 3.41, SpatiaLite point layers will not be displayed if there is a spatial index.
It is possible to zoom to the layer und the data in the attribute-table is correct. But I can't see any points.

When I remove the spatial index, the I can load the Layer and see the points.

With Polygon-Layers is no problem.

Greetings, Claas

test.sqlite.zip (414 KB) Claas Leiner, 2018-11-19 02:32 PM

Associated revisions

Revision c478ba9c
Added by Julien Cabieces almost 6 years ago

fixes #20547 : Fix error when using a spatialite layer with a non-int primary key an a spatial index

Revision b61d6f8f
Added by Matthias Kuhn almost 6 years ago

Merge pull request #8832 from troopa81/fix_20547

fixes #20547 : Fix error when using a spatialite layer with a non-int primary key an a spatial index

Revision 5c24b4e4
Added by Julien Cabieces almost 6 years ago

Backport fixes #20547 : Fix error when using a spatialite layer with a non-int primary key an a spatial index

History

#1 Updated by Giovanni Manghi about 6 years ago

  • Status changed from Open to Feedback

I cannot confirm here with my own data, can you attach a sample dataset?

#2 Updated by Claas Leiner about 6 years ago

The problem occurs when the primary key is created in text type and a spatial index exists at the same time. (in test.sqlite the table kunden1 with the primary key knr)
In the table kunden2, the primary key is the field nr (integer). This layer is displayed correctly in qgis 3.4.1.
In QGIS 2.18.25 both layers are displayed correctly.

#3 Updated by Claas Leiner about 6 years ago

sample dataset test.sqlite

#4 Updated by Giovanni Manghi about 6 years ago

  • Status changed from Feedback to Open
  • Subject changed from Spatialite point layers are not displayed if there is a spatial index to Spatialite point layers are not displayed when the primary key is created in text type and a spatial index exists at the same time

#5 Updated by Julien Cabieces almost 6 years ago

  • Assignee set to Julien Cabieces
  • Pull Request or Patch supplied changed from No to Yes
  • Status changed from Open to In Progress

#6 Updated by Julien Cabieces almost 6 years ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Closed

Also available in: Atom PDF