3.16. cpforager.processing.interpolate_lat_lon
- cpforager.processing.interpolate_lat_lon(df, interp_datetime, add_proxy=False)
Interpolate longitude and latitude at a given datetime.
- Parameters:
df (pandas.DataFrame) – dataframe with
datetime
,longitude``and ``latitude
columns.interp_datetime (pandas.DatetimeIndex) – desired datetime for interpolation.
add_proxy (bool) – add an
interp_proxy
column to the resulting dataframe if True.
- Returns:
a dataframe with
datetime
,longitude
andlatitude
interpolated at the desired datetime.- Return type:
pandas.DataFrame
Inerpolation is performed using NumPy. The interpolation proxy is computed as the duration in seconds between the desired datetime and the closest mesured position.
Warning
Computing the interpolation proxy significantly slows down the computation.