Bug report #7990
labelling/selection of WFS multi part geometries fails
Status: | Closed | ||
---|---|---|---|
Priority: | Severe/Regression | ||
Assignee: | - | ||
Category: | Vectors | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | fixed |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 16842 |
Description
Hi Larry,
I'm not totally sure that this is (also) a labeling issue... but I have no other ideas so for now I'll tag it to you.
The case is simple to describe:- pick a vector (tested both shapes and postgis) with multiparts geometries (tested polygons) in it, and publish it with QGIS server as WFS.
- Then use QGIS as WFS client, load the WFS vector and enable labels: the multi-part geometries will not show.
Moreover the selection tool won't work on that multipart geometries.
When enabling labels the QGIS log will start to be flooded with GEOS messages
Exception: std::bad_alloc
The vector has no errors, and if instead is published a singlepart (using the multipart to singlepart tool in the vector menu) version of it then there are no issues.
Related issues
History
#1 Updated by Larry Shaffer over 11 years ago
- File label-every-feature-part_works-w-shp.png added
Hi Giovanni,
Also, the original data source shape file has its multi-part features labeled properly (see attachment). I do not have a server setup on this Mac, so can't test the WFS at the moment.
I'm guessing at this point, but it sounds like the WFS is may be serving the multi-part features as single part, and/or the served WFS multi-part features are not being correctly recognized by QgsPalLabeling or when registering the feature in QgsPalLayerSettings.
Or, GEOS just doesn't like the WFS served features, for whatever reason.
Do you have a public URL for the WFS I can test?
#2 Updated by Giovanni Manghi over 11 years ago
Larry Shaffer wrote:
Hi Giovanni,
Also, the original data source shape file has its multi-part features labeled properly (see attachment). I do not have a server setup on this Mac, so can't test the WFS at the moment.
I'm guessing at this point, but it sounds like the WFS is may be serving the multi-part features as single part, and/or the served WFS multi-part features are not being correctly recognized by QgsPalLabeling or when registering the feature in QgsPalLayerSettings.
Or, GEOS just doesn't like the WFS served features, for whatever reason.
Do you have a public URL for the WFS I can test?
I will provide a URL as soon as possible.
#3 Updated by Giovanni Manghi over 11 years ago
Do you have a public URL for the WFS I can test?
http://mapserver.uevora.pt/cgi-bin/qgis_mapserv.fcgi?map=/var/www/wfs_labels/wfs_labels.qgs
#4 Updated by Larry Shaffer over 11 years ago
- Category changed from Labelling to Vectors
- Assignee deleted (
Larry Shaffer) - File issue-7990_call-tree.png added
- File issue-7990_select-mlutipart.png added
Thanks for the URL.
This appears to be related to issue #7928. There is something wrong in the way QgsGeometry::exportWkbToGeos() interacts with GEOS. Similar to #7928, it is (I believe) unrelated to labeling.
- Load WFS layer 'multipart' from URL mentioned above
- Try to select the feature shown in issue-7990_select-mlutipart.png -> leads to same immediate use of available RAM as noted in issue #7928
Similar call stack noted in Mac Instruments profiling tool, see issue-7990_call-tree.png
I am unsure how to fix this (unfamiliar with this part of source code), so unassigned myself from issue.
#5 Updated by Giovanni Manghi over 11 years ago
Larry Shaffer wrote:
Thanks for the URL.
This appears to be related to issue #7928. There is something wrong in the way QgsGeometry::exportWkbToGeos() interacts with GEOS. Similar to 7928, it is (I believe) unrelated to labeling.
- Load WFS layer 'multipart' from URL mentioned above
- Try to select the feature shown in issue-7990_select-mlutipart.png -> leads to same immediate use of available RAM as noted in issue #7928
Similar call stack noted in Mac Instruments profiling tool, see issue-7990_call-tree.png
I am unsure how to fix this (unfamiliar with this part of source code), so unassigned myself from issue.
The fix for #7928 does not seems to have fixed also this.
Do you think is a qgis (wfs) server issue?
#6 Updated by Jürgen Fischer about 11 years ago
- Status changed from Open to Feedback
Giovanni Manghi wrote:
Do you think is a qgis (wfs) server issue?
Not reproducable here. Maybe cb35c894007 or f3d79a88 fixed it.
#7 Updated by Giovanni Manghi about 11 years ago
- Status changed from Feedback to Closed
- Resolution set to fixed
Jürgen Fischer wrote:
Giovanni Manghi wrote:
Do you think is a qgis (wfs) server issue?
Not reproducable here. Maybe cb35c894007 or f3d79a88 fixed it.
seems fixed, probably by f3d79a88