airbornegeo.split_at_turns#
- split_at_turns(data, *, track_column, distance_column, groupby_column=None, max_turn_rate=0.5, smoothing_distance=10000.0, min_length=None, keep_turns=True)[source]#
Split flights into lines wherever the aircraft turns.
A released survey often gives a whole flight one line number, so an out-and-back flight is a single line that doubles back on itself. Anything defined along the line â a filter, a trend, a levelling correction â then treats the two legs as far apart when on the ground they are side by side. This cuts each flight into the straight runs between its turns.
Unlike
split_into_segments, which cuts at an isolated jump in one column, turning is a condition sustained over many points, so it is found from the smoothed turn rate rather than from a single difference. Seeairbornegeo.turn_rate.- Parameters:
data (
DataFrame) â Dataframe containing the data points, which must have the columns given bytrack_columnanddistance_column.track_column (
str) â Name of the column holding the track angle in degrees clockwise from north, for example as calculated byairbornegeo.track.distance_column (
str) â Name of the column holding the cumulative along-track distance in metres.groupby_column (
str|None) â The existing flight or line column. The first line of each flight keeps its name and later ones extend it, so flight12becomes12,12_1,12_2and so on, by default Nonemax_turn_rate (
float) â Degrees per kilometre above which the aircraft counts as turning. Straight survey flight holds well below 0.5, by default 0.5smoothing_distance (
float) â Passed toairbornegeo.turn_rate, by default 10e3min_length (
float|None) â Runs shorter than this, in metres, are given a line name of NaN, by default None which keeps them allkeep_turns (
bool) â If True each turn becomes a line of its own, so an out-and-back flight gives an outward leg, a turn, and a return leg. If False the turns are given NaN and only the straight runs are named, by default True
- Returns:
The new line name for each row, NaN where a row belongs to no line.
- Return type:
See also
airbornegeo.turn_ratethe turn rate this thresholds.
airbornegeo.split_into_segmentssplit at a gap in time, distance or angle.