NOTE : I'm not sure if this is the right forum for this question. if not, please advice.

Context : I am collecting a huge amount of data using an android app that is placed on a vehicle. I collect the data at ~1second intervals for about 2 hours, which gives almost 7200 data sets. These are the parameters :

  1. Timestamp (milliseconds)
  2. Latitude
  3. Longitude
  4. Speed
  5. Acceleration

Now I was looking at ways to simplify this data, as processing and rendering these many date points, especially on mobile devices is not a good idea.

EDIT : as answer to Spacedman's comment : I want to simplify the data because most of it is redundant. The data is collected every 1 second regardless of whether the values are constant or changing. Accuracy is not crucial as its only used for displaying visual graphs on a website, drawing a polyline on a map. etc. So I want to keep only the minimum necessary data points required to reproduce the graph/line.

While searching, I came across the Ramer–Douglas–Peucker algorithm and also found a library that implements this.

The issue : I am a bit confused as to how to simplify this data. I could :

  1. Somehow simply the entire thing by considering each data as a 5D point , or
  2. Generate three sets of arrays, namely : [Lat, Long, time], [Speed, time] and [acceleration, time].

So my question is :

Are there any advantages/disadvantages of using either of the two approaches?

I was thinking that - as each metric will have different patterns of variations, will combining them reduce the efficiency of the whole simplification process?

Or is it best to keep the metrics separate, so that each will be simplified to its maximum efficiency?

I am a Java/Obj-C developer, normally active on SO, and I am not an expert on these things, So I would like to know what you guys think.

Thanks in advance

  • $\begingroup$ This question is completely unanswerable unless you tell us what you want to do with the data. $\endgroup$ – Spacedman Feb 15 '16 at 14:18
  • $\begingroup$ @Spacedman. updated question. $\endgroup$ – ShahiM Feb 15 '16 at 21:02
  • $\begingroup$ So you don't care at all about the speed or acceleration? Only the line travelled. If the person loitered in one spot for ten minutes, you don't care, you can drop all those points? $\endgroup$ – Spacedman Feb 16 '16 at 14:24
  • $\begingroup$ no i need all the 5 metrics, but I want to optimize the size. douglas-peucker is perfect. I am asking if I should separate the components before optim. $\endgroup$ – ShahiM Feb 17 '16 at 6:34
  • 1
    $\begingroup$ DP is only appropriate for simplifying lines defined by points by thinning out certain points. It doesn't care what other data you have defined at each point. What you can do is recompute the speed and acceleration from the simplified points (noting that speed is only computable between two points, and acceleration only computable between three points) $\endgroup$ – Spacedman Feb 17 '16 at 8:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.