fractopo.tval.trace_validation_utils module

Direct utilities of trace validation.

fractopo.tval.trace_validation_utils.determine_middle_in_triangle(segments, snap_threshold, snap_threshold_error_multiplier)

Determine the middle segment within a triangle error.

The middle segment always intersects the other two.

Return type:

List[LineString]

fractopo.tval.trace_validation_utils.determine_trace_candidates(geom, idx, traces, spatial_index)

Determine potentially intersecting traces with spatial index.

Return type:

GeoSeries

fractopo.tval.trace_validation_utils.is_underlapping(geom, trace, endpoint, snap_threshold, snap_threshold_error_multiplier)

Determine if a geom is underlapping.

Return type:

Optional[bool]

fractopo.tval.trace_validation_utils.linestring_segment(linestring, dist, threshold_length)

Get LineString segment from dist to dist + threshold_length.

fractopo.tval.trace_validation_utils.segment_within_buffer(linestring, multilinestring, snap_threshold, snap_threshold_error_multiplier, overlap_detection_multiplier, stacked_detector_buffer_multiplier)

Check if segment is within buffer of multilinestring.

First check if given linestring completely overlaps any part of multilinestring and if it does, returns True.

Next it starts to segmentize the multilinestring to smaller linestrings and consequently checks if these segments are completely within a buffer made of the given linestring. It also checks that the segment size is reasonable.

TODO: segmentize_linestring is very inefficient.

Return type:

bool

fractopo.tval.trace_validation_utils.segmentize_linestring(linestring, threshold_length)

Segmentize LineString to smaller parts.

Resulting parts are not guaranteed to be mergeable back to the original.

Return type:

List[Tuple[Tuple[float, float], Tuple[float, float]]]

fractopo.tval.trace_validation_utils.split_to_determine_triangle_errors(trace, splitter_trace, snap_threshold, triangle_error_snap_multiplier)

Split trace with splitter_trace to determine triangle intersections.

Return type:

bool