]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - tim/prune/function/compress/DuplicatePointAlgorithm.java
Version 11, August 2010
[GpsPrune.git] / tim / prune / function / compress / DuplicatePointAlgorithm.java
index 3fd2233fc3edee0dce42abe151736c57fb3e0f42..fa673c20df65e37797b520d9af4d0daa911b81af 100644 (file)
@@ -41,14 +41,14 @@ public class DuplicatePointAlgorithm extends CompressionAlgorithm
                        if (!inFlags[i])
                        {
                                DataPoint currPoint = _track.getPoint(i);
-                               // Don't delete any waypoints or photo points
-                               if (!currPoint.isWaypoint() && currPoint.getPhoto() == null)
+                               // Don't delete any photo points
+                               if (currPoint.getPhoto() == null)
                                {
                                        // loop over last few points before this one
                                        for (int j=i-NUM_POINTS_TO_BACKTRACK; j<i; j++)
                                        {
                                                if (j<0) {j=0;} // only look at last few points, but not before 0
-                                               if (currPoint.isDuplicate(_track.getPoint(j)))
+                                               if (!inFlags[j] && currPoint.isDuplicate(_track.getPoint(j)))
                                                {
                                                        inFlags[i] = true;
                                                        numDeleted++;