Skip to content

Add merge policies (Request in QGIS) #9766

Open
@qgis-bot

Description

@qgis-bot

Request for documentation

From pull request qgis/QGIS#60710
Author: @JuhoErvasti
QGIS version: 3.44

Add merge policies

PR Description:

Fixes #59494.

Similarly to already existing Split and Duplicate "policies" this PR implements Merge Policies, which determine the initial values in the Merge Features dialog. The PR includes the following merge policies:

From the existing Qgis::FieldDomainMergePolicy enum:

  • Sum: numeric fields only
  • Geometry Weighted: numeric fields only, uses weighted average by geometry
  • Default Value: uses the default value set in QGIS

New policies:

  • Unset Field: similarly to Split & Duplicate policies clears the field and lets the data provider populate any default value if one exists. If it doesn't the first feature is used (this is the behavior which is currently implemented)
  • Largest Geometry: use the value from the feature with the biggest geometry (length/area/number of parts for multipoints)
  • Minimum Value: numeric fields only
  • Maximum Value: numeric fields only
  • Skip Attribute: sets the initial state to "Skip", if not modified manually value will be NULL

Initial merge dialog before PR:
MERGEPOLICY_BEFORE

Initial merge dialog after PR:
MERGEPOLICY_AFTER

Configuring the policies:
image

Funded by the National Land Survey of Finland.

Commits tagged with [need-docs] or [FEATURE]

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.44QGIS 3.44 new featuresPropertiesShowcase/ScreenshotsAdd or update a QGIS GUI image or an illustration of the featureVector

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions