Geometric Functions#

This module provides utility functions for geometric computations, including line equations, line segments, intersections, angle computations, and related geometric operations.

cartesienne

Fonction equation cartesienne

dist_point_droite

dist_point_to_segment

distance_to_segment

Function to compute distance between a point and a segment

projection_droite

Fonction projection orthogonale sur une droite

proj_segment

proj_polyligne

detect_side

triangle_area

aire_visval

isSegmentIntersects

intersection

intersects

inclusion

transform

transform_inverse

azimut

collinear

Parameters p1, p2, p3 : [x, y]

angleBetweenThreePoints

Compute angle between three points (the angle is calculated for the middle point).

Function to compute distance between a point and a segment#

util.geometry.distance_to_segment(x0, y0, x1, y1, x2, y2)[source]#

Function to compute distance between a point and a segment

Parameters:
  • x0 (float) – point coordinate X

  • y0 (float) – point coordinate Y

  • x1 (float) – segment first point X

  • y1 (float) – segment first point Y

  • x2 (float) – segment second point X

  • y2 (float) – segment second point Y

Return type:

float

Returns:

Distance between point and projection coordinates