geo-registry

Dissolve

Merges features into one per value of the given fields, or into one shape for everything.

Pitfall. Other attributes are dropped or summarized; decide how before dissolving.
About this operation
Also called Pairwise Dissolve, merge by attribute, aggregate, union by field
Group vector/aggregation
Checks geometry.valid
Pitfalls 1 listed above
Columbus tool vector_op · dissolve
Notes Not stated
Status active
Broader Not stated
Narrower Not stated
Related Not stated

Parameters

Name Type Required Default Values Note
by fields no Not stated Not stated Field or fields to group by; omit to merge everything.

Inputs and outputs

Direction Name Type Geometry Note
Input layer vector Not stated Not stated
Output output vector Not stated Not stated

In each engine

Engine Tool Parameters Differences
apache-sedona sedona.sql.ST_Union_Aggr
  • by An aggregate: dissolve by fields with GROUP BY.
  • layer → geometry
  • A Spark SQL function: arguments are columns or column names, run over a Spark DataFrame.
geopandas geopandas.GeoDataFrame.dissolve
  • by → by
  • Other columns keep the first row's value per group unless aggfunc says otherwise.
grass v.dissolve
  • by → column
  • layer → input
  • output → output
  • Without a column it dissolves areas sharing the same category number.
postgis st_union
  • by Use the aggregate form with GROUP BY the fields.
  • layer → #1
  • Dissolving is the aggregate form, ST_Union(geom) with GROUP BY; the two-argument form unions just two geometries.
qgis native:dissolve
  • by → FIELD
  • layer → INPUT
  • output → OUTPUT
  • SEPARATE_DISJOINT keeps parts that do not touch as separate features.
sf sf::st_union
  • by st_union merges everything into one geometry and drops the attributes; to dissolve by a field, group with aggregate() or dplyr's group_by and summarise.
  • layer → x
  • Returns geometry only (an sfc), not a layer with attributes.
shapely shapely.union_all
  • by Merges everything into one geometry; group the geometries first to dissolve by field.
  • layer → geometries
None noted
terra terra::aggregate
  • by → by
  • layer → x
  • On a SpatVector, dissolve = TRUE (the default) merges the shapes of each group; without by, everything becomes one.
turf-js turf.dissolve
  • by → options.propertyName : One property only.
  • layer → fc
  • Polygons only.
  • Turf works on GeoJSON in longitude/latitude (WGS 84); data in another CRS must be reprojected first.
whiteboxtools Dissolve
  • by → field
  • layer → input
  • output → output
None noted