The problem setting:

I have a time series of geolocation data, namely latitude and longitude.

I want to downsampling the time series and don't know if taking mean value of latitude and longitude make sense at all geographically.

Or should I take the most frequent values within the time window.

I have very little knowledge about GIS and learning now.

  • I think this depends on what problem you are trying to solve, or what information you are trying to convey.
    – Mintx
    Commented Sep 25, 2015 at 17:38
  • @Mintx try to capture the movement of the object that being tracked and measured with GPS/Network_location geolocation data. Commented Sep 25, 2015 at 17:55
  • 1
    @WuTianchen I believe you are in the right track, although when you are tracking an objects' geolocation, it must be a function of both position and time. Only using the objects' position is using the assumption that the object was at every point an equal amount of time, which may not be the case. Commented Sep 25, 2015 at 18:34
  • See related question here: stackoverflow.com/questions/1134579/smooth-gps-data Commented Sep 26, 2015 at 22:18

1 Answer 1


Generally stated, taking the mean of many measurements is the way towards higher confidence in the result. And if the measurements differ in their own reliability, a weighted mean is in order.

It is a common technique to mean several GPS observations over time, at a static location, to gain higher accuracy. In your case, however, you are moving so it is no longer a simple case of averaging over a (relatively long) time interval.

Depending on how fast you are moving and how frequent your observations are being made, what you could do is compute a weighted, moving average of the latest N observations. Suppose N is four (you may need a very different number depending on the speed of movement and frequency of observation), then

WMA P(T) = 10% P(T-3) + 20% P(T-2) + 30% P(T-1) + 40% P(T)

where WMA is weighted moving average
and P(T) is position at time T

There are much more statistically rigorous methods, Kalman filtering and smoothing, for example, but the above should give you a basic idea on how to weight your observations -- lat and long -- as you progress in time, giving higher weight to the most recent ones.

One simple improvement, if you can accept post processing, is to also use future observations. In that case, at any given time, you use the N previous observations and the N next observations, again, weighting the more recent ones more heavily. (Just make sure your weights add up properly.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.