pandas.DataFrame.xyz.reduced_point_index

DataFrame.xyz.reduced_point_index(**kwargs)[source]

Detect GPS coordinates that are too close together.

Returns a boolean same-sized list indicating subsampled GPS coordinates that are far enough apart from each other.

No matter how closely spaced the points, always returns the start and end points.

Originally developed in my mapmatching package; an old version still exists there.

Parameters
  • **lat (scalar) – column label in the record DataFrame containing latitude coordinates along the route in degrees N (-90, 90). Must be numeric dtype. If a label is not provided, the parameter name itself is used.

  • **lon (scalar) – column label in the record DataFrame containing longitude coordinates along the route in degrees E (-180, 180). Must be numeric dtype. If a label is not provided, the parameter name itself is used.

  • **min_dist (float) – The minimum distance (meters) between the resulting downsampled GPS coordinates. Default 15.

Returns

A boolean array that can be used to subsample a pandas.Series corresponding to this GPS trace, based on this minimum distance scheme.

Return type

list