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, area, name, allow_fix, SNAP_THRESHOLD=0.01, SNAP_THRESHOLD_ERROR_MULTIPLIER=1.1, AREA_EDGE_SNAP_MULTIPLIER=1.5, TRIANGLE_ERROR_SNAP_MULTIPLIER=10.0, OVERLAP_DETECTION_MULTIPLIER=50.0, STACKED_DETECTOR_BUFFER_MULTIPLIER=5.0, SHARP_AVG_THRESHOLD=135.0, SHARP_PREV_SEG_THRESHOLD=100.0, ERROR_COLUMN='VALIDATION_ERRORS', GEOMETRY_COLUMN='geometry', determine_validation_nodes=True)
Bases:
object
Validate 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=True, choose_validators=None, allow_empty_area=True)
Run validation.
Main entrypoint for validation. Returns validated traces GeoDataFrame.
- Return type:
GeoDataFrame
- set_general_nodes()
Set _intersect_nodes and _endpoint_nodes attributes.
- property spatial_index: Any | None
Get geopandas/pygeos spatial_index of traces.
-
traces:
GeoDataFrame
- property vnodes: Set[int] | None
Determine indexes with V-Nodes.
-
AREA_EDGE_SNAP_MULTIPLIER: