3

The dissolve tool (vector>geoprocessing tools>dissolve) renders some artifacts on shapes with high number of polygons. I’m using a shapefile with 3222 polygons and I’m trying to dissolve it using the field “municipio”, but when the dissolve tool ends calculating the new shape has some artifacts

enter image description here

Does anyone had a similar problem? How to work around it?

I’ve also used v.dissolve from GRASS and the dissolve polygon from SAGA, but the problem persists. I’ve used the same shapefile on ArcGIS 9.3 with the dissolve tool. None artifact/error was produced.

Edit 1

I'm trying to use the v.clean tool as sugested by WhiteboxDev. However I'm getting this error:

An error has occured while executing Python code:

Traceback (most recent call last): File "C:/PROGRA~1/QGISCH~1/apps/qgis/./python/plugins\processing\gui\ProcessingToolbox.py", line 181, in executeAlgorithm File "C:/PROGRA~1/QGISCH~1/apps/qgis/./python/plugins\processing\algs\grass7\Grass7Algorithm.py", line 511, in checkBeforeOpeningParametersDialog File "C:/PROGRA~1/QGISCH~1/apps/qgis/./python/plugins\processing\algs\grass7\Grass7Utils.py", line 361, in checkGrass7IsInstalled File "C:\PROGRA~1\QGISCH~1\apps\Python27\lib\ntpath.py", line 96, in join TypeError: object of type 'NoneType' has no len()

Python version: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]

QGIS version: 2.4.0-Chugiak Chugiak, 8fdd08a

Python path: ['C:/PROGRA~1/QGISCH~1/apps/qgis/./python/plugins\processing', 'C:/PROGRA~1/QGISCH~1/apps/qgis/./python', u'C:/Users/CERCOTRICHAS/.qgis2/python', u'C:/Users/CERCOTRICHAS/.qgis2/python/plugins', 'C:/PROGRA~1/QGISCH~1/apps/qgis/./python/plugins', 'C:\PROGRA~1\QGISCH~1\bin\python27.zip', 'C:\PROGRA~1\QGISCH~1\apps\Python27\DLLs', 'C:\PROGRA~1\QGISCH~1\apps\Python27\lib', 'C:\PROGRA~1\QGISCH~1\apps\Python27\lib\plat-win', 'C:\PROGRA~1\QGISCH~1\apps\Python27\lib\lib-tk', 'C:\PROGRA~1\QGISCH~1\bin', 'C:\PROGRA~1\QGISCH~1\apps\Python27', 'C:\PROGRA~1\QGISCH~1\apps\Python27\lib\site-packages', 'C:\PROGRA~1\QGISCH~1\apps\Python27\lib\site-packages\GDAL-1.11.0-py2.7-win32.egg', 'C:\PROGRA~1\QGISCH~1\apps\Python27\lib\site-packages\PIL', 'C:\PROGRA~1\QGISCH~1\apps\Python27\lib\site-packages\jinja2-2.7.2-py2.7.egg', 'C:\PROGRA~1\QGISCH~1\apps\Python27\lib\site-packages\markupsafe-0.23-py2.7-win32.egg', 'C:\PROGRA~1\QGISCH~1\apps\Python27\lib\site-packages\python_dateutil-2.2-py2.7.egg', 'C:\PROGRA~1\QGISCH~1\apps\Python27\lib\site-packages\pytz-2014.2-py2.7.egg', 'C:\PROGRA~1\QGISCH~1\apps\Python27\lib\site-packages\win32', 'C:\PROGRA~1\QGISCH~1\apps\Python27\lib\site-packages\win32\lib', 'C:\PROGRA~1\QGISCH~1\apps\Python27\lib\site-packages\Pythonwin', 'C:\PROGRA~1\QGISCH~1\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win32.egg', 'C:\PROGRA~1\QGISCH~1\apps\Python27\lib\site-packages\six-1.6.1-py2.7.egg', 'C:\PROGRA~1\QGISCH~1\apps\Python27\lib\site-packages\wx-2.8-msw-unicode', 'C:\PROGRA~1\QGISCH~1\apps\qgis\python\plugins\fTools\tools', 'C:\Program Files\SpiderOak\shell_extension_lib\shared.zip']

Not entirely sure if this error is QGIS related... Any idea why I'm getting this error and how can I solve it?

2

1 Answer 1

3

This is likely the result of topological errors in your shapefile. You need to run a vector cleaning function, like the v.clean tool in the GRASS plugin to repair your topology before running Dissolve.

2
  • yep, that is just what it looks like. Sep 24, 2014 at 13:25
  • @usertwoseventwothreenine user two, I can't tell you how many times I've seen this pattern myself and think afterwards, 'I need to clean my topology!' You'd think I'd eventually remember to do it beforehand ;) Sep 24, 2014 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.