Experimental

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

data-tools vector topology fix quality

Parameters

NameDescriptionRequiredDefault
inputInput vector path.Requiredinput.gpkg
rule_setRule 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_toleranceTolerance for snapping operations in coordinate units. Defaults to 0.01.Optional0.01
dry_runIf true (default), emits change report without modifying input. If false, applies changes.OptionalTrue
outputOutput vector path for fixed features. If omitted, derived beside input.Optionaltopology_fixed.gpkg
change_reportOptional 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 Learn More