map2loop.utils#

Functions

calculate_endpoints(start_point, ...)

Calculate the endpoints of a line segment given a start point, azimuth angle, distance, and bounding box.

create_points(xy)

Creates a list of shapely Point objects from a list, tuple, or numpy array of coordinates.

find_segment_strike_from_pt(line, point, ...)

Finds the strike of a line segment (contact) closest to a given point (structural measurement).

generate_grid(bounding_box[, grid_resolution])

Setup the grid for interpolation

generate_random_hex_colors(n[, seed])

Generate a list of unique random hex color codes.

hex_to_rgb(hex_color)

Convert a hex color code to an RGBA tuple.

multiline_to_line(geometry)

Converts a multiline geometry to a single line geometry.

normal_vector_to_dipdirection_dip(normal_vector)

Calculates the dip and dip direction from a normal vector.

rebuild_sampled_basal_contacts(...)

Rebuilds the basal contacts as linestrings --> sampled_basal_contacts, based on the existing sampled contact points.

strike_dip_vector(strike, dip)

Calculates the strike-dip vector from the given strike and dip angles.