cartagen.inflexion_points#
- inflexion_points(line, min_dir=120.0)#
Detect inflexion points inside a curved line.
This algorithm extract inflexion points from a line using angles calculation. Micro inflexions are removed.
- Parameters:
line (
LineString) – The line to extract the inflexion points from.min_dir (
float, optional) – The minimum direction change (in degrees) between two consecutive inflexion points. This parameter allows to remove micro inflexions from the results. If set to 0, every micro-inflexions will be kept.
- Returns:
listofint– A list of index of the line vertices considered to be inflexion points
Examples
>>> line = LineString([(0, 0), (1, 1), (2, 0), (5, 3), (8, 5)]) >>> c4.inflexion_points(line) [2, 3]