Bug report #1865

ftools "Union" gives wrong results with non overlapping polygons

Added by Giovanni Manghi over 14 years ago. Updated over 14 years ago.

Status:Closed
Priority:Low
Assignee:cfarmer -
Category:Python plugins
Affected QGIS version: Regression?:No
Operating System:All Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:11925

Description

I'm not sure to classify this as "critical" but as the resulting attribute tables are wrong seems to me "data corruption". If I'm wrong please change the priority of the ticket.

I noticed that applying the ftools "Union" tool to non overlapping polygons (if the polygons do overlap then results are ok) returns always a wrong attribute table.

The "old" geoprocessing tool plugin gives better results, as it does GRASS v.overlay.or

I was playing around with different polygon layers with different table of attributes (that for the "Union" operation does not make a lot of difference), so I also noticed that in the same case (non overlapping polygons) when the two attribute tables have different column names but same types then both the "old" geoprocessing tool plugin and GRASS v.overlay.or do an error.

I compared with the results given by the Union tool of Arcgis 9.x and gvSIG and in this case the results are ok with both software, so if ftools is going to be fixed then would be better to avoid the error made by the other two qgis solutions.

See attached files.

union_non_overlapping.zip (11 KB) Giovanni Manghi, 2009-08-10 05:42 AM

Screenshot.png (22.6 KB) Giovanni Manghi, 2009-08-11 01:16 AM

History

#1 Updated by cfarmer - over 14 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

This has been fixed in 724bd28a (SVN r11342). Note: Results should coincide with those from ArcGIS and gvSIG.

- Carson

#2 Updated by Giovanni Manghi over 14 years ago

  • Resolution deleted (fixed)
  • Status changed from Closed to Feedback

Replying to [comment:1 cfarmer]:

This has been fixed in 724bd28a (SVN r11342). Note: Results should coincide with those from ArcGIS and gvSIG.

- Carson

Hi Carson,
thanks for the effort.

I gave it a look and it seems to have yet a problem when using Union with two layers with identical attribute tables. What seems to do is to "delete" the first feature of the first layer used. See attached image.

#3 Updated by cfarmer - over 14 years ago

  • Resolution set to fixed
  • Status changed from Feedback to Closed

Replying to [comment:2 lutra]:

I gave it a look and it seems to have yet a problem when using Union with two layers with identical attribute tables. What seems to do is to "delete" the first feature of the first layer used. See attached image.

This should be fixed in b5eefa52 (SVN r11348). There was a problem when the bounding boxes of features intersected, but their geometries did not. Please test with your previous dataset to ensure this has been fixed properly...

-Carson

Also available in: Atom PDF