TransWikia.com

What dissolve tool in QGIS allows me to summarize statistics for multiple attributes?

Geographic Information Systems Asked on July 26, 2021

Is there a tool or plugin in QGIS that resembles ArcGIS 10’s Dissolve tool? I’m trying to dissolve several polygons (parks) around the boundaries of another layer of polygons (cities), while performing various calculations for multiple attribute fields (like summing their total area, doing a count of features, etc).

I looked into an earlier question (Batch Dissolve Polygons based on Attributes in QGIS or FWTools) where ftools was recommended, but ftools doesn’t allow you to specify the way you would like to summarize statistics for multiple attribute fields. Is there one tool that allows me to summarize statistics for multiple attributes, like the ArcGIS Dissolve tool?

3 Answers

You can also try SQLite/Spatialite (comes with QGIS) or PostgreSQL/PostGIS where dissolve "a la ArcGIS" is done by the combination of the ST_Union() function on the geometry and a group by on the attribute to be summarized.

Something like this:

SELECT ST_Union(the_geom),
    sum(st_area(the_geom)) as aggregate_area, 
    count(the_geom) as number_geoms 
INTO dissolved_polygons 
FROM your_table 
GROUP BY your_attribute;

Answered by Stefan on July 26, 2021

There is a new QGIS plugin called dissolve with stats, which provides the functionality you are looking for.

Answered by Ryan Garnett on July 26, 2021

In QGIS 2.10, there is a feature for computing the statistics by categories (like ArcGIS summary statistics). Go to processing > toolbox, the geoalgorithms > vector > Statistics > statistics by categories. You can the join the resulting table with the dissolved layer. I must warn that after the join the numeric fields are interpreted as text fields, so this is not so handy (you need to compute a new field with to_real() or to_int() )

Answered by radouxju on July 26, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP