fractopo.tval.trace_validation module
Contains main entrypoint class for validating trace data, Validation.
Create Validation objects from traces and their target areas to validate
the traces for further analysis (fractopo.analysis.network.Network).
- class fractopo.tval.trace_validation.Validation(traces: GeoDataFrame, area: GeoDataFrame, name: str, allow_fix: bool, SNAP_THRESHOLD: float = 0.01, SNAP_THRESHOLD_ERROR_MULTIPLIER: float = 1.1, AREA_EDGE_SNAP_MULTIPLIER: float = 1.5, TRIANGLE_ERROR_SNAP_MULTIPLIER: float = 10.0, OVERLAP_DETECTION_MULTIPLIER: float = 50.0, STACKED_DETECTOR_BUFFER_MULTIPLIER: float = 5.0, SHARP_AVG_THRESHOLD: float = 135.0, SHARP_PREV_SEG_THRESHOLD: float = 100.0, ERROR_COLUMN: str = 'VALIDATION_ERRORS', GEOMETRY_COLUMN: str = 'geometry', determine_validation_nodes: bool = True)
Bases:
objectValidate traces data delineated by target area(s).
If allow_fix is True, some automatic fixing will be done to e.g. convert MultiLineStrings to LineStrings.
- AREA_EDGE_SNAP_MULTIPLIER: float = 1.5
- ERROR_COLUMN: str = 'VALIDATION_ERRORS'
- GEOMETRY_COLUMN: str = 'geometry'
- OVERLAP_DETECTION_MULTIPLIER: float = 50.0
- SHARP_AVG_THRESHOLD: float = 135.0
- SHARP_PREV_SEG_THRESHOLD: float = 100.0
- SNAP_THRESHOLD: float = 0.01
- SNAP_THRESHOLD_ERROR_MULTIPLIER: float = 1.1
- STACKED_DETECTOR_BUFFER_MULTIPLIER: float = 5.0
- TRIANGLE_ERROR_SNAP_MULTIPLIER: float = 10.0
- allow_fix: bool
- area: GeoDataFrame
- determine_validation_nodes: bool = True
- property endpoint_nodes: list[tuple[Point, ...]]
Get endpoints of all traces.
Returned as a list of tuples wherein each tuple represents the nodes of a trace in traces i.e. endpoint_nodes[index] are the nodes for traces[index].
- property faulty_junctions: set[int] | None
Determine indexes with Multi Junctions.
- property intersect_nodes: list[tuple[Point, ...]]
Get intersection nodes of all traces.
Returned as a list of tuples wherein each tuple represents the nodes of a trace in traces i.e. intersect_nodes[index] are the nodes for traces[index].
- name: str
- run_validation(first_pass: bool = True, choose_validators: tuple[type[BaseValidator]] | None = None, allow_empty_area: bool = True) GeoDataFrame
Run validation.
Main entrypoint for validation. Returns validated traces GeoDataFrame.
- set_general_nodes()
Set _intersect_nodes and _endpoint_nodes attributes.
- property spatial_index: Any | None
Get geopandas spatial index of traces.
- traces: GeoDataFrame
- property vnodes: set[int] | None
Determine indexes with V-Nodes.