airbornegeo.calculate_crossover_errors#
- calculate_crossover_errors(data, intersections, *, data_col, plot_map=False, plot_hist=True, robust=True, warn_if_unchanged=False)[source]#
Calculate mistie values for all intersections. For each intersection, find the data values for the line and tie from the survey dataframe and add those values to the intersection table as line_value and tie_value. If they exist, overwrite them. Calculate the mistie value as line_value - tie_value, and save this to a column mistie_0. If mistie_0 exists, make a new column mistie_1, and keep incrementing the number. If the new mistie values exactly match previous, donβt make a new column. This allow to run the function multiple times without changing anything and not building up a large number of mistie columns.
- Parameters:
intersections (
GeoDataFrame) β Intersections table created by create_intersection_table(), then supplied to add_intersections().data (
GeoDataFrame) β Survey dataframe with intersection rows added by add_intersections() and interpolated with interpolate_intersections().data_col (
str) β Column name for data values to calculate misties forplot_map (
bool) β Plot the resulting mistie points on a map, by default Falseplot_hist (
bool) β Plot the resulting mistie histogram, by default Truerobust (
bool) β Use robust color limits for the map, by default Truewarn_if_unchanged (
bool) β If true, raise a UserWarning if misties havenβt changed from previous column, by default False.
- Returns:
An intersections table with new columns line_value, tie_value and mistie_x where x is incremented each time a new mistie is calculated.
- Return type:
GeoDataFrame