Experimental

Automatically applies safe, auditable fixes to topology violations detected by topology_rule_validate.

data-tools vector topology fix quality

## Parameters

Name | Description | Required | Default
--- | --- | --- | ---
`input` | Input vector path. | Required | `input.gpkg`
`rule_set` | Rule configuration as JSON array/object, CSV string, or file path. Applies fixes for supported rules only: line_endpoints_must_snap_within_tolerance, point_must_be_covered_by_line, polygon_must_not_have_gaps, line_must_not_have_dangles. | Optional | `['line_endpoints_must_snap_within_tolerance', 'point_must_be_covered_by_line', 'polygon_must_not_have_gaps', 'line_must_not_have_dangles']`
`snap_tolerance` | Tolerance for snapping operations in coordinate units. Defaults to 0.01. | Optional | `0.01`
`dry_run` | If true (default), emits change report without modifying input. If false, applies changes. | Optional | `True`
`output` | Output vector path for fixed features. If omitted, derived beside input. | Optional | `topology_fixed.gpkg`
`change_report` | Optional JSON change audit-trail report path. | Optional | —

## Examples

Preview endpoint snapping fixes in dry-run mode with change audit trail.

    wbe.topology_rule_autofix(change_report='network_changes.json', dry_run=False, input='network_violations.gpkg', output='network_fixed.gpkg', rule_set=['line_endpoints_must_snap_within_tolerance'], snap_tolerance=0.01)

## Project Links

WbW Homepage User Manual Support WbW