Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ftools dissolve (on master) produces empty output if input has invalid geometries #21779

Closed
qgib opened this issue Nov 4, 2015 · 9 comments
Closed
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption High Priority Processing Relating to QGIS Processing framework or individual Processing algorithms

Comments

@qgib
Copy link
Contributor

qgib commented Nov 4, 2015

Author Name: Michele Mor (@Michele100)
Original Redmine Issue: 13752
Affected QGIS version: master
Redmine category:processing/qgis


New description, see #21779 (comment)


Old description:

Hi.
Using QGIS 2.8.3 Wien I use Vector/Geoprocessing Tools/Dissolve to merge together polygons.
Unfortunately my new layer has an hole (missing polygons) where my original layer has polygons.
I am not able to add a screenshot within this text, so I attached it as a file.

The original layer is Units, the dissolved layer is sectors.
To dissolve the original layer I have used field PCSECTOR.

I have attached 2 zip files.

Note: using QGIS 2.12 dissolve does not work!

Thanks.
Michele


@qgib
Copy link
Contributor Author

qgib commented Nov 5, 2015

Author Name: Giovanni Manghi (@gioman)


The real issue in now another: on QGIS > 2.8.3 with the provided sample data dissolve produces an empty output.

The problem with the "hole" on qgis <= 2.8.3 is somehow expected: the input file has invalid geometries (you can see it clearly also in the attached screenshot) and ftools dissolve (as any other tool in ftools) is fragile in this cases. Anyway in QGIS we have robust alternatives, try the grass or saga dissolve in the Processing toolbox and you'll get the expected results.


  • crashes_corrupts_data was changed from 0 to 1
  • subject was changed from QGIS Dissolve creates holes (polygons disappear) to ftools dissolve (on master) produces empty output if input has invalid geometries
  • category_id was configured as 44
  • priority_id was changed from Normal to Severe/Regression
  • fixed_version_id was configured as Future Release - High Priority
  • version was changed from 2.8.3 to master

@qgib
Copy link
Contributor Author

qgib commented Nov 9, 2015

Author Name: Michele Mor (@Michele100)


Hi Giovanni,

I have tried with GRASS and it had the same issue.
It worked with SAGA.
I am confused thou, because I cannot understand what is wrong with that layer.
I am not trying to modify any polygons, just to merge some if they have the same sector and if they are adjacent, otherwise they should simply become "islands" with the same name.

@qgib
Copy link
Contributor Author

qgib commented Nov 9, 2015

Author Name: Giovanni Manghi (@gioman)


I have tried with GRASS and it had the same issue.

weird, it works ok here.

I am confused thou, because I cannot understand what is wrong with that layer.
I am not trying to modify any polygons, just to merge some if they have the same sector and if they are adjacent, otherwise they should simply become "islands" with the same name.

your layer has a few geometry errors (see below), said that recently the qgis geometry support has been rewritten and a few native tools (geoprocessing tools) have now to be updated to cope with this changes.

Gap check: TopologyException: Input geom 0 is invalid: Self-intersection at or near point -2.4302612316084109 52.445251349342556 at -2.4302612316084109 52.445251349342556
Duplicate check between features 132 and 129: TopologyException: Input geom 0 is invalid: Self-intersection at or near point -2.4302612316084109 52.445251349342556 at -2.4302612316084109 52.445251349342556
Duplicate check between features 132 and 130: TopologyException: Input geom 0 is invalid: Self-intersection at or near point -2.4302612316084109 52.445251349342556 at -2.4302612316084109 52.445251349342556
Duplicate check between features 132 and 131: TopologyException: Input geom 0 is invalid: Self-intersection at or near point -2.4302612316084109 52.445251349342556 at -2.4302612316084109 52.445251349342556
Duplicate check between features 133 and 132: TopologyException: Input geom 1 is invalid: Self-intersection at or near point -2.4302612316084109 52.445251349342556 at -2.4302612316084109 52.445251349342556
Duplicate check between features 134 and 132: TopologyException: Input geom 1 is invalid: Self-intersection at or near point -2.4302612316084109 52.445251349342556 at -2.4302612316084109 52.445251349342556
Duplicate check between features 137 and 132: TopologyException: Input geom 1 is invalid: Self-intersection at or near point -2.4302612316084109 52.445251349342556 at -2.4302612316084109 52.445251349342556
Duplicate check between features 138 and 132: TopologyException: Input geom 1 is invalid: Self-intersection at or near point -2.4302612316084109 52.445251349342556 at -2.4302612316084109 52.445251349342556
Duplicate check between features 139 and 137: TopologyException: Input geom 0 is invalid: Self-intersection at or near point -2.4302612316084109 52.445251349342556 at -2.4302612316084109 52.445251349342556
Duplicate check between features 139 and 10: TopologyException: Input geom 0 is invalid: Self-intersection at or near point -2.4302612316084109 52.445251349342556 at -2.4302612316084109 52.445251349342556
Duplicate check between features 139 and 61: TopologyException: Input geom 0 is invalid: Self-intersection at or near point -2.4302612316084109 52.445251349342556 at -2.4302612316084109 52.445251349342556
Duplicate check between features 139 and 131: TopologyException: Input geom 0 is invalid: Self-intersection at or near point -2.4302612316084109 52.445251349342556 at -2.4302612316084109 52.445251349342556
Duplicate check between features 139 and 132: TopologyException: Input geom 0 is invalid: Self-intersection at or near point -2.4302612316084109 52.445251349342556 at -2.4302612316084109 52.445251349342556
Duplicate check between features 139 and 133: TopologyException: Input geom 0 is invalid: Self-intersection at or near point -2.4302612316084109 52.445251349342556 at -2.4302612316084109 52.445251349342556
Duplicate check between features 143 and 139: TopologyException: Input geom 1 is invalid: Self-intersection at or near point -2.4302612316084109 52.445251349342556 at -2.4302612316084109 52.445251349342556
Duplicate check between features 143 and 132: TopologyException: Input geom 1 is invalid: Self-intersection at or near point -2.4302612316084109 52.445251349342556 at -2.4302612316084109 52.445251349342556
Duplicate check between features 147 and 132: TopologyException: Input geom 1 is invalid: Self-intersection at or near point -2.4302612316084109 52.445251349342556 at -2.4302612316084109 52.445251349342556

@qgib
Copy link
Contributor Author

qgib commented Nov 10, 2015

Author Name: Michele Mor (@Michele100)


Hi Giovanni,
thanks for your feedback.
If I'll have time I'll try again with GRASS.
I will try to remember to do some testing/repair for my layer next time before applying a dissolve.

@qgib
Copy link
Contributor Author

qgib commented Jan 18, 2016

Author Name: Alexander Bruy (@alexbruy)


Fixed in changeset "62a571d6dd3dbdaa97f35cc6795dc064d18b7a82".


  • status_id was changed from Open to Closed

@qgib
Copy link
Contributor Author

qgib commented Jan 18, 2016

Author Name: Alexander Bruy (@alexbruy)


  • resolution was changed from to fixed/implemented

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Giovanni Manghi (@gioman)


The "ftools" category is being removed from the tracker, changing the category of this ticket to "Processing/QGIS" to not leave the category orphaned.

@qgib
Copy link
Contributor Author

qgib commented May 19, 2017

Author Name: Jürgen Fischer (@jef-n)



Old description:

Hi.
Using QGIS 2.8.3 Wien I use Vector/Geoprocessing Tools/Dissolve to merge together polygons.
Unfortunately my new layer has an hole (missing polygons) where my original layer has polygons.
I am not able to add a screenshot within this text, so I attached it as a file.

The original layer is Units, the dissolved layer is sectors.
To dissolve the original layer I have used field PCSECTOR.

I have attached 2 zip files.

Note: using QGIS 2.12 dissolve does not work!

Thanks.
Michele
to New description, see #21779 (comment)


Old description:

Hi.
Using QGIS 2.8.3 Wien I use Vector/Geoprocessing Tools/Dissolve to merge together polygons.
Unfortunately my new layer has an hole (missing polygons) where my original layer has polygons.
I am not able to add a screenshot within this text, so I attached it as a file.

The original layer is Units, the dissolved layer is sectors.
To dissolve the original layer I have used field PCSECTOR.

I have attached 2 zip files.

Note: using QGIS 2.12 dissolve does not work!

Thanks.
Michele

  • priority_id was changed from Severe/Regression to Low

@qgib
Copy link
Contributor Author

qgib commented May 19, 2017

Author Name: Jürgen Fischer (@jef-n)


  • priority_id was changed from Low to High

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Processing Relating to QGIS Processing framework or individual Processing algorithms Crash/Data Corruption labels May 25, 2019
@qgib qgib added this to the Future Release - High Priority milestone May 25, 2019
@qgib qgib closed this as completed May 25, 2019
rouault pushed a commit to rouault/QGIS that referenced this issue May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption High Priority Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

No branches or pull requests

1 participant