airbornegeo.create_intersection_table#
- create_intersection_table(data, *, exclude_ints=None, cutoff_dist=None, buffer_dist=None, grid_size=1, plot_map=True, plot_hist=True, size=10)[source]#
create a dataframe which contains the intersections between provided flight and tie lines. For each intersection point, find the distance to the closest data point of each line. If the further of these two distances is greater than βcutoff_distβ, the intersection is excluded. The intersections are calculated by representing the point data as lines, and finding the hypothetical crossover. By default crossovers will only be between the first and last point of a line. If there is an expected crossover just beyond the end of a line which should be included, use the buffer_dist arg to extend the line representation of the data, but note that extrapolation of data at these points will likely be inaccurate if buffer distance is too large.
- Parameters:
data (
GeoDataFrame) β Dataframe with both tie lines and flight lines.exclude_ints (
list[list[float,float] |list[float] |float] |None) β List of tuples where each tuple is either a single line number to exclude from all intersections, or a pair of line numbers specifying specific intersections to exclude, by default Nonecutoff_dist (
float|None) β The maximum allowed distance from a theoretical intersection to the further of nearest data point of each intersecting line, by default Nonebuffer_dist (
float|None) β The distance to extend the line representation of the data points, useful for creating intersection which are just beyond the end of a line, by default Nonegrid_size (
float) β The resolution to snap the intersection coordinates to. by default 1plot_map (
bool) β Plot a map of the resulting intersection points colored by distance to the further of the two nearest data points, by default Trueplot_hist (
bool) β Plot a histogram of the max distances to the nearest points, by default True,size (
float) β Size of the points for plotting, by default 10
- Returns:
An intersection table containing the locations of the theoretical intersections, the line and tie numbers, and the distance to the further of the two nearest datapoints of each line, and a geometry column.
- Return type:
GeoDataFrame