Bug report #7990

labelling/selection of WFS multi part geometries fails

Added by Giovanni Manghi over 6 years ago. Updated about 6 years ago.

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.

curso.zip (373 KB) Giovanni Manghi, 2013-06-03 01:55 PM

label-every-feature-part_works-w-shp.png (23.3 KB) Larry Shaffer, 2013-06-03 04:13 PM

issue-7990_select-mlutipart.png (16.2 KB) Larry Shaffer, 2013-06-04 05:45 PM

issue-7990_call-tree.png (162 KB) Larry Shaffer, 2013-06-04 05:45 PM


Related issues

Related to QGIS Application - Bug report #7928: SIGABRT when adding labels Closed 2013-05-28

History

#1 Updated by Larry Shaffer over 6 years ago

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 6 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.

#4 Updated by Larry Shaffer over 6 years ago

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.

  1. Load WFS layer 'multipart' from URL mentioned above
  2. 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 6 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.

  1. Load WFS layer 'multipart' from URL mentioned above
  2. 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 6 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 6 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

Also available in: Atom PDF