Tuesday 23 May 2017

qgis - "Singleparts to multipart" vs. "Dissolve"


It seems to me that the vector tools "Singleparts to multipart" and "Dissolve" do the same things. Can someone confirm this, please? Or do I overlook something?



Answer




Dissolve may or may not create multi-part features. Features which share common geometry (such as two separate lines with a common endpoint, or two adjacent polygons with a common edge) will be combined regardless of whether multi-part creation is allowed. Multi-parts (if allowed) will result from any non-connected geometry. You will probably still end up with multiple rows/records


Singleparts to Multiparts would not combine any existing geometry. It would simply create multi-part features, collapsing the rows/records for all of the geometries into a single row. All of the geometry will still be there, independently of one another, but there will be only one attribute record for all that geometry.


There may also be additional considerations for attributes depending on implementation. Dissolve could potentially allow you to sum a certain field so that the new dissolved polygons still retain accurate data (say, an area or population field - the value for each part will be summed to fill the attribute for the resulting feature). Singleparts to multipart will likely use one of the existing attribute values (either from a geometry you select, or by a non-user specified method).


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...