fault_mesh.utilities.cutting

Utilities for cutting Shapely LineString objects at specific points or distances.

This module provides functions to cut LineString objects at specified points or distances, resulting in multiple LineString segments.

Functions

cut(line, distance)

Cuts a line in two at a distance from its starting point

cut_line_at_point(line, point)

Cuts a line in two at a specified point

cut_line_at_multiple_points(line, points)

Cuts a line at multiple points and returns all resulting segments.

cut_line_between_two_points(line, points)

Cuts a line between two points and returns the segment between them.

Module Contents

fault_mesh.utilities.cutting.cut(line, distance)

Cuts a line in two at a distance from its starting point

Parameters:
  • line (LineString) – The line to cut

  • distance (float) – The distance along the line at which to cut

Returns:

Two LineString objects representing the portions of the line before and after the cut

Return type:

tuple[LineString, LineString]

fault_mesh.utilities.cutting.cut_line_at_point(line, point)

Cuts a line in two at a specified point

Parameters:
  • line (LineString) – The line to cut

  • point (Point) – The point at which to cut the line

Returns:

Two LineString objects representing the portions of the line before and after the cut

Return type:

tuple[LineString, LineString]

fault_mesh.utilities.cutting.cut_line_at_multiple_points(line, points)

Cuts a line at multiple points and returns all resulting segments.

Parameters:
  • line (LineString) – The line to cut

  • points (List[Point]) – List of points at which to cut the line

Returns:

List of LineString objects representing the segments of the cut line

Return type:

List[LineString]

fault_mesh.utilities.cutting.cut_line_between_two_points(line, points)

Cuts a line between two points and returns the segment between them.

Parameters:
  • line (LineString) – The line to cut

  • points (List[Point]) – List of two points at which to cut the line

Returns:

LineString object representing the segment between the two points

Return type:

LineString