Bug report #8287
WFS server loses features if source layer is PostGIS (works ok with shapes)
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||17087|
I have seen this with a lot different layers, so I attach a sample one.
- take the attached "aa" shape and import it into a postgis DB
- create a project with the "aa" vector both as shape and postgis
- activate the server/wfs parameters
- connect to the wfs server and add both versions of the "aa" vector
- the wfs layer that has as source the shape layer has the same number of features as the source layer, 1991 in this case
- the wfs layer that has as source the postgis layer has just 1960 features
I attached a vector representing the missing features.
There is another issue that I don't know if it should be filed separately:
while trying to filter the missing features I noticed that the geometries in the wfs layer and in the source layer are slightly different. I attached also a vector representing the geometric difference between the two.
As far as I remember this is a regression as in 1.8 it was ok.
wfs related fixes:
- wfs server: only filter by bbox if there was one given (fixes #8287)
- wfs provider: make feature attribute field types stick to the values
- vector layer properties, field properties: add (Qt) type column
- attribute table: sort Date and DateTime as such
- spatialindex: return false when an exception on insertion occured
#3 Updated by Giovanni Manghi over 6 years ago
Salvatore Larosa wrote:
I am not sure if this may be considered as blocker it looks like a specific case.
I can confirm using the sample data but I also tried using other different layers and I can't replicate it.
The attached dataset is perfectly good, and I would be able to attach many more others where the issue surface and others where does not*.
The bottom line is that if I have to create WFS services with QGIS server (and I have really to do, like probably many others) I must be sure that what is downloaded via WFS is identical to the original layers, both as number and as geometry (see second part of the original description).
At this moment I can't rely on QGIS server.
- I can't find a pattern, it seems that above a certain number of features the issue start to surface.